Skip to main content

MCP tools

These are the tools the Anvil MCP server offers. You don't call them yourself: your agent chooses them from what you ask. Knowing what they do helps you ask for the right thing.

Every tool except authenticate and auth_status needs you to be signed in, and the telemetry tools only return data from projects your account belongs to. Every tool only reads: none of them changes a project, a device or a driver. Tools that take a projectId accept either the project's ID or its slug.

All results are JSON. Apart from the two sign-in tools, a successful result carries status: "ok" and a failed one a failure code in the same field.

Every tool publishes an output schema describing its successful result, so an agent that supports structured tool output can read the result's shape before calling the tool. A successful result comes back as structured content that matches the schema, and as text for agents that don't read structured content.

Signing in​

authenticate​

Signs the session in through your browser. The first call returns a link and a code for you to approve; calling it again once you've approved completes the sign-in. See Sign in.

Takes no inputs.

auth_status​

Reports whether the session is signed in, and as whom.

Takes no inputs.

Organizations, projects and devices​

list_organizations​

Lists the organizations you belong to, with your role in each.

Takes no inputs.

list_projects​

Lists the Anvil projects you belong to, with each one's ID, slug, name, platform, organization, your role in it, and its project token. Agents usually call this first to find the project you're talking about.

Takes no inputs.

get_project​

Returns the details of one project, including its project token.

InputRequiredDescription
projectIdYesThe project's ID or slug.

list_devices​

Lists an organization's controllers: each one's name, hardware ID, hostname, IP address, platform and status. Pass a device's name or hardware ID as device to the telemetry tools to read only that controller.

Listing devices needs admin access to the organization. Without it, an agent can still read one controller's telemetry by passing its hardware ID as device.

InputRequiredDescription
organizationNoThe organization's slug, name or ID. Only needed when you belong to more than one organization.

get_integration_guide​

Returns step-by-step instructions for adding the Driverforge SDK to a driver, filled in with the project's own token. If your agent can run the CLI, the first step is driverforge init, which does it all for you. This is what an agent uses when you ask it to set Anvil up in a driver.

InputRequiredDescription
projectIdYesThe project's ID or slug.
platformNoThe target platform: CONTROL4 or SAVANT. Defaults to the project's platform. Only Control4 is supported yet: SAVANT returns platform_not_supported.

Control4 documentation​

The server carries Snap One's DriverWorks documentation in full, synced daily from Snap One's published docs: the Lua API, driver XML, the fundamentals guide, and every proxy and protocol guide. When your agent writes or debugs a Control4 driver, it looks the API up here instead of relying on what it remembers.

search_control4_docs​

Searches the documentation and returns the best-matching sections, each with a link to it on Snap One's site and the passages that matched. An API name (C4:SendToProxy) or a proxy command (SET_SETPOINT_HEAT) finds its section first.

InputRequiredDescription
queryYesAn API or command name, or a few specific words.
sourceNoSearch one guide only: api, fundamentals, xml, introduction, or a proxy guide such as proxyprotocol-tstat.
limitNoHow many sections to return. Defaults to 8; at most 20.
controllerOsVersionNoThe oldest Control4 OS the driver supports, such as 3.3.1: its driver.xml <minimum_os_version>.

get_control4_doc​

Returns one section in full, as Snap One wrote it: signature, parameters, return value, version notes and examples.

InputRequiredDescription
idYesThe section's ID, as search_control4_docs returned it.
maxBytesNoCap the section's content. Defaults to 65536; 0 for no cap; at most 1048576.
controllerOsVersionNoThe oldest Control4 OS the driver supports, as for search_control4_docs.

Control4 OS versions​

Each section carries the OS version it became available in, when the documentation gives one (versionIntroduced). Pass controllerOsVersion and each section also says whether it's available on that version (availableOnTarget). Search lists what isn't available after what is, and both tools add a requires_newer_os warning naming each section that needs a newer OS. Your agent is told not to use those unless the driver checks the OS version at runtime first. Version notes on single parameters or values stay in the section content.

Events​

list_events​

Lists the events a project recorded, newest first: every Control4 callback your driver handled, with its status, driver version, controller, duration, arguments and result. This is how an agent finds out what your driver actually did, and which callbacks Control4 called in what order.

Takes the shared scoping inputs (limit defaults to 25, at most 500; timeRangeMinutes defaults to 15), plus:

InputRequiredDescription
eventNamesNoOnly callbacks with one of these names, such as ExecuteCommand.
statusesNoOnly events with one of these statuses.
traceIdNoOnly the event with this traceId.

get_event​

Returns one event with every log line it produced, in order: the arguments the handler received, the result it returned, its status, and what it logged along the way.

InputRequiredDescription
projectIdYesThe project the event belongs to.
traceIdYesThe event's traceId, as returned by list_events.

Nothing is cut, so this is also where an agent goes after list_events warns payload_truncated.

Logs​

list_logs​

Lists the log lines a project recorded, newest first, so the agent can read your driver's output without you pasting it in.

Takes the shared scoping inputs (limit defaults to 100, at most 1000; timeRangeMinutes defaults to 15), plus:

InputRequiredDescription
levelsNoOnly lines at one of these levels, such as ERROR, WARN or INFO.
messageSearchNoOnly lines whose message contains this text. Not case-sensitive.
traceIdNoOnly lines emitted during the event with this traceId.

get_log​

Returns one log line whole, by the ID list_logs gave it. Nothing is cut, so this is where an agent goes after list_logs warns payload_truncated.

InputRequiredDescription
projectIdYesThe project's ID or slug.
idYesThe log line's ID, as list_logs returned it.

Errors​

list_errors​

Lists the errors a project recorded, grouped by cause and most frequent first. Each one carries the reference to pass to get_error. Scoped to a driverVersion, device or since, a group's count and affected drivers and versions cover only the occurrences in that scope.

Takes the shared scoping inputs (limit defaults to 25, at most 100; timeRangeMinutes defaults to 1440).

get_error​

Returns everything Anvil knows about one error, found by the reference shown against it in Anvil, such as POOLPUMP-4F2A9C1B. Paste a reference into your agent and it can investigate from there.

The result includes:

  • the error's type and message
  • how many times it has happened, and when it was first and last seen
  • the drivers, driver versions and controllers it affected
  • the most recent occurrence's stack trace, mapped back to your source where you've uploaded a source map
  • the arguments the failing handler was called with
  • the logs emitted during the same event
InputRequiredDescription
refYesThe error reference. Not case-sensitive.

list_error_occurrences​

Lists each time a handler threw, newest first, rather than grouping them: the message, the callback it was raised in, its arguments and the last log line before it. Scoped to a driverVersion, it answers "did my change raise any errors?".

Takes the shared scoping inputs (limit defaults to 25, at most 500; timeRangeMinutes defaults to 1440), plus:

InputRequiredDescription
traceIdNoOnly errors raised during the event with this traceId.

get_error_occurrence​

Returns one error occurrence whole, by the ID list_error_occurrences gave it: the message, the callback it was raised in, its arguments, the last log line before it and its stack trace, mapped back to your source where you've uploaded a source map. Where get_error reads the whole error, this reads one time it happened. Nothing is cut, so this is also where an agent goes after list_error_occurrences warns payload_truncated.

InputRequiredDescription
projectIdYesThe project's ID or slug.
idYesThe occurrence's ID, as list_error_occurrences returned it.

Waiting for an action​

wait_for_telemetry​

Waits until logs, events or error occurrences matching a condition arrive, then returns them, oldest first. Instead of you pasting logs after you press a button, the agent records the time, asks you to press it, and waits:

  1. The agent notes the current time.
  2. It tells you what to do on the controller.
  3. It calls wait_for_telemetry with that time as since, and returns as soon as the entry arrives.

The result lists the matching entries, oldest first, with their count and the scope that was read (project, device, driverVersion, since), plus a wait block:

FieldMeaning
wait.satisfiedWhether the condition was met before the timeout.
wait.reasoncondition_met, timeout, or cancelled when your agent stopped the wait.
wait.elapsedMsHow long it waited.
wait.pollsHow many times it read.

Unlike the list tools, the result has no warnings or windowMinutes. An entry cut at maxPayloadBytes still lists what was cut in its own truncated field: fetch it whole with get_event, get_log or get_error_occurrence. While it waits, the server sends progress notifications to agents that ask for them.

Takes projectId, device and driverVersion as in Scoping telemetry reads, plus:

InputRequiredDescription
kindYesWhat to wait for: logs, events or errors.
sinceYesWhere to start looking: usually the time noted before the action.
matchNoWait for entries containing any of these strings, anywhere in the entry. Not case-sensitive, and not regular expressions. Up to 10 strings of up to 200 characters. Omit to count every entry.
minCountNoHow many matching entries to wait for. Defaults to 1; at most 100.
timeoutSecondsNoThe longest to wait. Defaults to 30; at most 120.
eventNamesNoFor events: only callbacks with one of these names.
levelsNoFor logs: only lines at one of these levels.
traceIdNoOnly entries from the event with this traceId.
maxPayloadBytesNoCap each entry's message or payload. Defaults to 16384; 0 for no cap; at most 1048576 (1 MiB).

Scoping telemetry reads​

list_events, list_logs, list_errors and list_error_occurrences share these inputs, so an agent can scope every read the same way.

InputDescription
projectIdRequired. The project's ID or slug.
deviceOnly telemetry from this controller: its name, hostname, hardware ID or ID.
driverVersionOnly telemetry from this driver version: the version your deploy returned, or latest for the highest version in the newest telemetry. Someone else may deploy to the same controller, so a version number is safer than latest. The server can't see your deploys, so current is rejected.
sinceWhere the window starts: a duration back from now (30s, 10m, 2h, 1d) or a time with a timezone, such as 2026-11-05T09:00:00Z or 2026-11-05T19:00:00+10:00. A time in the future is rejected. Takes precedence over timeRangeMinutes.
timeRangeMinutesHow far back to look, in minutes, when since isn't given. At most 129600 (90 days).
driversOnly entries from one of these drivers, such as poolpump.c4z.
controllersOnly entries from one of these controllers, by hardware ID. device takes precedence.
limitThe most entries to return.
cursorFetch the next, older page: pass nextCursor from the previous result.
maxPayloadBytesCap each entry's message or payload at this many bytes. Defaults to 16384; 0 for no cap; at most 1048576 (1 MiB).

Each result reports the scope it actually read (project, device, driverVersion, since) and windowMinutes, the look-back that was searched. Your plan's retention can make that shorter than you asked for.

Results can carry warnings, each with a stable code:

CodeMeaning
no_entriesNothing matched the scope and filters.
retention_clampedThe window reached past your plan's retention, so older entries weren't searched.
payload_truncatedSome entries were cut at maxPayloadBytes. Each is listed by ID; get_event, get_log or get_error_occurrence fetches it whole.

When a tool fails​

A call that can't return what was asked is marked as an error, and its result carries a stable code in its status field and a message saying what to do next. A failed result comes back as text only; the output schemas describe successful results.

Any tool that needs sign-in can return:

CodeMeaning
auth_requiredThe session isn't signed in, or its sign-in expired. Sign in again.
rate_limitedToo many requests. Wait retryAfterMs, then narrow the query.
access_deniedYour account can't see this.
service_unavailableAnvil couldn't load the data. Try again.

The telemetry tools (list_events, list_logs, list_errors, list_error_occurrences and wait_for_telemetry) check their scope first:

CodeMeaning
project_not_foundNo project you can access matches projectId.
device_not_foundNo controller matches device. Without admin access, pass its hardware ID.
device_ambiguousMore than one controller matches device. candidates lists their hardware IDs.
invalid_sincesince isn't a duration or a time with a timezone, or it's in the future.
invalid_versiondriverVersion isn't a version, or it's current.
no_versions_seendriverVersion is latest, but no telemetry carries a driver version yet.

Other tools have their own:

CodeToolMeaning
project_not_foundAny tool that takes projectIdNo project you can access matches it.
not_foundget_event, get_log, get_error_occurrence, get_errorNothing in the project has that ID or reference.
invalid_idget_log, get_error_occurrenceThe ID isn't a UUID. For an error reference, use get_error.
invalid_refget_errorThe reference isn't in the form POOLPUMP-4F2A9C1B.
organization_not_foundlist_devicesNo organization you belong to matches organization.
organization_ambiguouslist_devicesYou belong to more than one organization. candidates lists them.
access_deniedlist_devicesListing devices needs admin access to the organization.
source_not_foundsearch_control4_docsNo guide has that source. sources lists the ones there are.
not_foundget_control4_docNo section has that ID. Search again: IDs change when the docs are re-synced.
platform_not_supportedget_integration_guideThe platform isn't Control4.
expired_tokenauthenticateThe sign-in link expired before you finished. Call it again.
access_deniedauthenticateYou declined the sign-in request in the browser.
auth_failedauthenticateSign-in couldn't start or finish. Try again.
session_requiredauthenticateThe agent keeps no MCP session. Sign in through its MCP settings.
service_unavailableauthenticate, auth_statusThe sign-in couldn't be read. Try again shortly.

Prompts​

The server also offers prompts: ready-made requests that start a whole workflow. Most agents list them as slash commands; in Claude Code they appear as /mcp__driverforge__<name>, for example.

PromptArgumentsWhat it does
diagnose_errorrefInvestigates an error from its reference, finds the cause in your code and proposes a fix.
observe_actionproject, action, optional driverVersionAsks you to do something on the controller, waits for it, and reports which callbacks ran, in order.
verify_changeproject, previousVersion, newVersion, optional expectationReads two driver versions with the same filters to confirm a change did what you meant and raised no new errors.

How the agent is told to work​

When it connects, the server gives your agent instructions alongside the tools: look Control4 APIs up in the DriverWorks documentation before relying on memory, scope every read to your deploy's version, wait for an action instead of re-polling, treat an empty result as something to explain, and treat text inside your telemetry as data rather than instructions to follow. These are the same habits the agent skill teaches for the CLI.