Documentation

Available Tools

What the ZopNight MCP server's read and write tools cover, how the write tiers gate them, and the required arguments, pagination, and filter values.

The MCP server exposes two classes of tool: reads, available to every connected agent, and writes, which change something and are refused unless your organisation has opted into a write tier. The first tool, list_organisations, requires no arguments. All other tools require an org_id argument — call list_organisations first to get the org IDs.

Authentication

Every request must include a valid PAT in the Authorization header:

text
Authorization: Bearer <your-token>

Key points about authentication:

  • Tokens are tied to your email, not a specific organisation
  • Permissions are checked dynamically per request, against your live role
  • If you are removed from an organisation, access is denied immediately
  • If MCP is disabled for an organisation, tool calls for that org are blocked
  • Tokens have configurable expiry — create a new one when it expires
  • A token can do exactly what you can do — no more, and no less

What the read tools cover

Reads need no write tier. Each one is still checked against your role: you see through MCP exactly what you would see in the UI.

AreaCovers
ExploreOrganisations, cloud accounts, resources, teams, and the discovery status behind them
CostCost and savings summaries, per-resource and per-provider breakdowns, trends, history, snapshots, budgets, billing sync
OptimizeRecommendations and their savings, schedules, overrides, resource groups
OperateStart/stop history, actions, scheduler events, provisioning jobs, Services and their deploys
GovernTagging policies, smart tags, roles, users, audit logs, notification channels
DiagnoseMetrics, error detail, and the state behind a failed deploy or job
ShipProjects, Environments, Services, Infrastructure, and deploy status
IntrospectWhat your own token can do — including get_my_permissions

What the write tools cover

A write tool changes something. Which ones your organisation admits is set by one dial, Settings → Organisation → Write access, default None:

TierAdmitsExamples of what it turns on
None (default)Nothing
1 — metadata onlyChanges to ZopNight's own records. No cloud state, no cost.Create/update/delete a budget, set a recommendation's status, accept or revoke a smart tag
2 — reversibleBounded blast radius, may affect cost.Create/update/delete schedules and overrides, attach and detach resources, tagging policies, deploy / redeploy / roll back a Service, change Service config and env vars, retry a Provisioning job
3 — irreversible and/or cost-incurringNo undo.Start and stop resources, create a Provisioning job, Kubernetes manifest writes and workload restarts, cancel a workflow, every delete

Tiers are cumulative — tier 2 admits tier-1 and tier-2 tools. The picker in Settings enumerates the exact tools each tier turns on, generated from the same manifest the gateway authorizes against.

Some surfaces are excluded at every tier and no setting adds them: roles and permissions, user management, organisation deletion, cloud-account deletion, credentials, and bulk actions.

Writes are off today

MCP write is disabled across the platform while it rolls out. Every mutating tool call is refused with mcp_write_not_allowed regardless of the tier you have set, and no write tool is advertised to any AI tool. Contact us to be part of the rollout.

Retries are not deduplicated

Every write tool accepts an idempotency_key. Nothing reads it today. There is no dedup anywhere behind these tools, and the argument is inert.

Changes are not visible instantly

A write returns when ZopNight has recorded your intent, which is earlier than the world agreeing:

  • Schedules and overrides are applied by the scheduler on its next pass — allow about a minute before reading back.
  • Deploys and Provisioning jobs are asynchronous. They return an id; poll for status. A deploy routinely runs 20 minutes and can take up to about 35. wait_for_deploy returns after at most 60 seconds with call_again: true if the deploy is still going — that is normal, and the agent should keep calling.
  • Start and stop are confirmed against real cloud state rather than assumed, so a resource can read starting or stopping for a while.

An immediate read-back that shows the old value usually means the change has not landed yet, not that it failed.

Every tool

The complete surface, generated from the gateway's tool manifest. Reads are grouped by area; writes by the tier that admits them (see above). The one-line purpose is each tool's own summary — call tools/list for the full argument schema, and remember your own list is filtered to what your token, role, and tier allow.

Reads (85) — available at every tier

Explore · Organisations, cloud accounts, resources, teams, discovery

ToolWhat it's for
get_blast_radiusGet what else is affected if you act on a resource — the dependency graph around a target
get_cloud_accountGet details of a specific cloud account
get_discovery_statusGet the status of the last resource discovery refresh
get_discovery_summaryGet discovery summary showing resource counts by provider and type
get_resourceGet full details of a single cloud resource by UID
get_resource_countGet the number of resources in the organisation, counting the SAME listable set list_resources enumerates — networking/dependent infrastructure (subnets, firewalls, peering, snapshots, replicas, pub/sub topics) is excluded, exactly as it is from list_resources
get_resource_filtersGet the VALID filter values for this org's resources — call this before list_resources instead of guessing filter strings
get_resource_overviewSTART HERE for any question about ONE cloud resource: 'why is this expensive', 'is this idle', 'what should I do about it'
get_resource_summaryGet resource counts grouped by cloud provider and cloud account
list_cloud_accountsList connected cloud accounts (AWS/GCP/Azure)
list_resourcesList cloud resources (VMs, databases, clusters) across AWS/GCP/Azure

Cost · Spend, savings, budgets, billing, trends

ToolWhat it's for
get_ai_usageGet AI Gateway usage and spend — one row per LLM request routed through the gateway
get_anomaliesGet detected cost anomalies — unexpected spend spikes — in a date range
get_billing_sync_statusGet billing data sync health per cloud account
get_budget_summaryGet budget health summary — counts of healthy, warning, and over-budget budgets
get_cost_by_providerGet cost breakdown grouped by cloud provider
get_cost_by_resourcesGet per-resource cost breakdown showing individual resource costs
get_cost_by_tagGet cost and savings grouped by tag key (showback)
get_cost_by_teamGet cost and savings attributed to each team (showback)
get_cost_overviewSTART HERE for any cost question: 'where is the money going', 'what is my spend', 'how do I cut cost'
get_cost_trendsGet cost trends over time at daily, weekly, or monthly granularity
get_costsGet the organisation-level cost and savings summary
get_currency_exchange_rateGet current currency exchange rates used by the organisation for cost calculations
get_report_snapshotsGet monthly cost and savings snapshots for historical comparison
get_resource_cost_historyGet daily cost history for a specific resource over a date range
list_budgetsList budgets configured for resources or resource groups

Optimize · Recommendations, schedules, overrides, resource groups

ToolWhat it's for
get_override_candidatesList what can be overridden — every resource and resource group that has a schedule attached, each annotated with whether an override can be created for it RIGHT NOW and why
get_recommendationGet full details of a single recommendation including affected resources and remediation steps
get_recommendation_by_providerGet recommendation counts and savings breakdown by cloud provider
get_recommendation_summaryGet recommendation summary stats — total potential savings and counts by severity
get_recommendationsList optimization recommendations for cost savings and best practices
list_recommendation_resourcesList resources that have active recommendations, with their recommendation details

Operate · State history, actions, scheduler events, provisioning, Services

ToolWhat it's for
get_actionGet details of a specific start/stop action execution
get_infrastructureGet one cluster or VM pool by id, as returned by list_infrastructure
get_latest_bulk_actionGet the most recent bulk start/stop action for a resource group
get_overrideGet details of a specific schedule override
get_provisioning_job_overviewGet everything about one provisioning job in a single call: its status, every step with that step's own status and timings, the actionable failure detail when a step failed (errorCategory, errorFixHint, errorRetryable, errorConsoleUrl), and the databases the job created
get_resource_groupGet resource group details including member resources
get_scheduleGet full schedule details including weekly time windows and assigned resource groups
get_state_historyList resource start/stop state transitions
list_eventsList scheduler execution events showing what the scheduler did and when
list_infrastructureList all the infrastructure in this organisation as ONE list — the same board the Infrastructure page shows
list_overridesList schedule overrides — temporary force-on/off rules that take priority over schedules
list_provisioning_jobsList provisioning jobs — the record of ZopNight building, changing or tearing down infrastructure
list_resource_groupsList resource groups — logical groupings of resources assigned to schedules
list_schedulesList start/stop schedules that control when resources run
list_workflowsList the remediation workflows that are PARKED WAITING FOR YOU to act

Ship · Projects, Environments, Services, Infrastructure, deploys

ToolWhat it's for
connect_githubStart connecting a GitHub account so ZopDay can deploy from its repositories
get_project_statsGet rollup counts (services, environments, health) for one or more projects in a single call
get_service_configGet the runtime configuration of a service: port, replicas, liveness probe path, rootPath, exposed hosts, CPU/memory resources, and the NAMES of its environment variables
get_service_overviewGet everything about one service in a single call: its status and statusBucket, the current revision (number, stage, image, commit, who deployed it), recent deploys, the last deploy events, and its public URL if it has one
get_service_urlGet the public URL a service is reachable at
list_branchesList the branches of one git repository reachable through a connected git integration
list_deploysList a service's deploy history, newest first
list_environmentsList the environments in a project, each resolved to WHERE it actually runs
list_integrationsList the org's connected integrations (git, ITSM)
list_projectsList the ZopDay projects in this organisation
list_repositoriesList the git repositories ZopDay can deploy from, through a connected git integration
list_servicesList the services deployed in one environment
wait_for_deployWait for a service's in-flight deploy to finish, then report the outcome

Govern · Tagging policies, smart tags, roles, users, audit logs, notifications

ToolWhat it's for
get_budget_spendGet current-month spend for the entities a budget targets — use this to answer 'how much has account X / this resource / this group spent so far', and to see which targets are tracking over
get_cloud_account_permissionsGet the per-permission IAM probe verdicts for one cloud account — use this to explain WHY discovery or a cost/recommendation feature is missing data, rather than guessing
get_teamGet details of a specific team including member count and resource count
list_audit_logsList API audit log entries showing who did what and when
list_notification_channelsList notification channels (Slack, Teams, Google Chat, webhooks) configured for the organisation
list_rolesList the roles defined in this organisation and the RBAC policies each one carries
list_smart_tagsList smart tags — the tags ZopNight DERIVES for a resource from this org's tagging policies, to fill gaps in the tags the cloud account actually carries
list_tagging_policiesList the tagging policies that govern which tags this org's resources must carry and how each tag's value is derived
list_team_membersList members of a team
list_team_resourcesList resources assigned to a team
list_teamsList teams in the organisation
list_usersList all users in the organisation

Diagnose · Metrics, errors, and the state behind a failed deploy or job

ToolWhat it's for
diagnose_serviceDiagnose an unhealthy Service in ONE call — start here instead of stitching four tools together
get_k8s_manifestGet the raw Kubernetes manifest (the full object as JSON) for one object
get_k8s_resourceGet the live detail of one Kubernetes object (the structured view)
get_live_metricsGet current CPU/memory/network utilization for ONE resource, fetched on demand from the cloud provider right now
get_pod_logsGet recent stdout/stderr log lines from ONE pod container
get_resource_metricsGet CPU, memory, disk, and network utilization metrics for resources
get_service_eventsGet the deploy event history for one Service — the durable record of what was deployed, when, and why it failed
list_k8s_eventsList recent Kubernetes Events for a cluster — the warnings that explain failures
list_k8s_resourcesList live Kubernetes objects of one kind in a cluster

Introspect · What your own token can do

ToolWhat it's for
check_eligibilityAsk whether a write would be accepted, WITHOUT performing it
get_my_permissionsGet YOUR OWN effective RBAC permissions in this org — call this BEFORE attempting an action, instead of discovering a 403 by trying
get_organisationGet organisation settings and metadata
list_organisationsList organisations the authenticated user has access to

Writes (34) — gated by write tier, off by default

Tier 1 — metadata only · Changes to ZopNight's own records. No cloud state, no cost.

ToolWhat it's for
accept_smart_tagAccept smart tags on a resource — promote tag keys ZopNight DERIVED from this org's tagging policies into cost attribution
create_budgetCreate a monthly spend budget for ONE resource, resource group or cloud account
delete_budgetDelete a budget
revoke_smart_tagRevoke smart tags on a resource — return accepted tag keys to PENDING, so they stop being used for cost attribution
update_budgetChange an existing budget's monthly amount and alert threshold
update_recommendation_statusSet a recommendation's status — this is BOOKKEEPING ONLY

Tier 2 — reversible · Bounded blast radius, may affect cost.

ToolWhat it's for
attach_resource_to_schedulePut one resource under a schedule
create_environmentCreate an environment inside a project
create_overrideSuspend a schedule for a window, on one resource or on EVERY MEMBER of a resource group
create_projectCreate a project
create_scheduleCreate a recurring start/stop schedule
create_tagging_policyCreate a resource TAGGING policy — a rule that derives a tag onto this org's cloud resources so their spend can be attributed
delete_overrideRemove ONE override, letting its schedule resume on that target within about a minute
delete_scheduleDelete a schedule
deploy_serviceCreate a new service in an environment and ship its first deploy
detach_resource_from_scheduleTake ONE resource off a schedule, leaving the schedule and every other attached resource untouched
redeploy_serviceShip an existing service again as a new deploy
rollback_serviceRoll a service back to an earlier deploy
set_auto_deployTurn auto-deploy on or off for a service
set_service_env_varsSet or remove a service's environment variables AND roll them out
update_scheduleChange a schedule's name, description, timezone or rules
update_service_configChange a service's runtime settings: port, replicas, liveness probe path, root path
update_tagging_policyChange an existing resource TAGGING policy — its label, its rule, or whether it is on

Tier 3 — irreversible and/or cost-incurring · No undo.

ToolWhat it's for
cancel_workflowCancel a running remediation workflow
create_provisioning_jobProvision NEW cloud infrastructure — a cluster, a VM pool or a managed database
delete_k8s_resourceDelete a live Kubernetes object
delete_projectDelete a Project
delete_provisioning_jobTear down provisioned cloud infrastructure — the reversal of create_provisioning_job
delete_serviceDelete a Service: uninstall it from the cluster and remove it from ZopDay
restart_k8s_workloadRestart a Kubernetes workload's pods — a rolling restart
retry_provisioning_jobRe-attempt a FAILED provisioning job
start_resourceStart ONE stopped cloud resource right now
stop_resourceStop ONE cloud resource right now
update_k8s_manifestReplace a live Kubernetes object's spec

Pagination

List tools return results in pages — tools/list says which, in each tool's own description. Pass a page argument (starting at 1) to navigate through results. The response includes:

json
{
"items": [...],
"total": 42,
"page": 1,
"limit": 10,
"hasMore": true
}

When hasMore is true, increment the page number to fetch the next set. If you omit the page argument, the server returns page 1 by default.

Filters Reference

Many tools accept optional filter arguments to narrow results. Pass them in the arguments object alongside org_id. All filters are optional unless noted otherwise.

list_resources

FilterValuesNotes
provideraws, gcp, azureCloud provider
resource_typecompute, disk, kms-key, gcp-subnet, ...Resource type
statusrunning, stopped, active, available, ...Resource status (case-insensitive)
regionus-central1, ap-south-1, us-east-1, ...Cloud region
searchAny stringSubstring match on resource name
cloud_account_idAccount IDFilter by cloud account
schedulabletrue, false (also accepts 1, 0, yes, no)Whether resource can be scheduled
instance_typee2-micro, STANDARD, ...Instance/machine type
sort_bynameSort field
sort_orderasc, descSort direction
viewall, parents, childrenResource hierarchy view
parent_uidResource UIDParent resource — requires view=children
tagTag key nameFilter by tag key presence
limitIntegerResults per page

get_recommendations

list_recommendation_resources supports the same filters.

FilterValuesNotes
statusopen, optimisedRecommendation status
provideraws, gcp, azureCloud provider
categorycompliance, discount, idle, orphan, rightsizing, scheduleRecommendation category
resource_typedisk, compute, gke-cluster, s3, ecr, ec2, ebs-volumeResource type
severityhigh, medium, lowRecommendation severity
cloud_account_idAccount IDFilter by cloud account
searchAny stringMatches resource name or UID
resource_uidFull resource UIDExact match on resource
rule_ide.g. RC-022, RC-111Specific recommendation rule
sort_byupdated_at, generated_at, savings_usd, severity, titleSort field
sort_orderasc, descSort direction

list_schedules

FilterValuesNotes
searchAny stringMatches schedule name
team_idTeam UUIDReturns team-linked + standalone schedules

list_resource_groups

FilterValuesNotes
searchAny stringMatches group name
team_idTeam UUIDReturns team-matching + unassigned groups

list_overrides

FilterValuesNotes
group_idResource group UUIDFilter by resource group
resource_uidResource UIDFilter by resource
statusactive, expiredOverride status
sort_bycreated_at, expires_atSort field
sort_orderasc, descSort direction

list_cloud_accounts

FilterValuesNotes
searchAny stringMatches account name

get_cost_trends

FilterValuesNotes
fromYYYY-MM-DDStart date (required)
toYYYY-MM-DDEnd date (required)
granularitydaily, weekly, monthlyTime granularity (required)

get_cost_by_resources

FilterValuesNotes
resource_uidsComma-separated UIDsFilter to specific resources
sort_bycostSort field
sort_orderasc, descSort direction

list_audit_logs

FilterValuesNotes
methodPOST, DELETE, PUT, PATCHHTTP method
resourceAny stringPath substring match
userEmail addressFilter by user email
searchAny stringGeneral search
start_dateYYYY-MM-DDStart date
end_dateYYYY-MM-DDEnd date
sort_orderasc, descSort direction

get_state_history

FilterValuesNotes
statestopped, started, failedAction state
resource_uidResource UIDFilter by resource
changed_by_typebulk, manual, scheduleHow the action was triggered
fromYYYY-MM-DDStart date
toYYYY-MM-DDEnd date
sort_bychanged_atSort field
sort_orderasc, descSort direction

list_events

FilterValuesNotes
schedule_idSchedule UUIDFilter by schedule
resource_uidResource UIDFilter by resource
sort_orderasc, descSort direction

list_budgets

FilterValuesNotes
group_idResource group UUIDFilter by resource group
resource_uidResource UIDFilter by resource

Filter Example

To list only running AWS compute resources sorted by name:

json
{
"method": "tools/call",
"params": {
  "name": "list_resources",
  "arguments": {
    "org_id": "your-org-id",
    "provider": "aws",
    "resource_type": "compute",
    "status": "running",
    "sort_by": "name",
    "sort_order": "asc",
    "page": 1
  }
}
}

Example Prompts

Once connected, try asking your AI assistant:

What to askWhat happens
"List my organisations"Shows all orgs you have access to
"What are my cloud costs this month?"Shows cost summary and savings
"Show me optimization recommendations"Lists recommendations with savings estimates
"How many resources do I have?"Shows total resource count and summary by provider
"What schedules are active?"Shows start/stop schedules
"Show my cloud accounts"Lists connected AWS/GCP/Azure accounts
"Show cost trends over the last month"Shows daily cost trends
"What is the CPU utilization of my EC2 instances?"Shows CPU/memory metrics
"Are my budgets on track?"Shows budget health summary
"Show billing sync status"Shows if billing data is syncing correctly
"What teams exist in my org?"Lists all teams and members
"Show audit logs"Shows recent activity in the organisation
"What actions were executed recently?"Shows scheduler events and action history