Skip to content

Error codes

A tool call that fails returns a result with isError: true. Its structuredContent is {code, message, suggestions?}, and some codes add fields of their own. Only a malformed request, such as an unknown tool, is a protocol error instead.

Asked for an Element with a typo in its id, get_element over the Kitchen sink returns:

{
"code": "not_found",
"message": "No Element \"sink:ap\".",
"suggestions": [
"sink:api"
]
}
Code Meaning
invalid_input The arguments don’t fit the tool’s input: a field is missing, has the wrong type or isn’t a valid id, or a write tool was given at.
not_found An id, a Project, a View, a Deployment or a point in history (at, from, since) names nothing in the Model.
ambiguous A name matches more than one thing: a history scope that is both a Project and an Element, or a write that could mean more than one Relationship or Deployment.
validation_failed A write would add a check error, or remove something still referenced. Nothing was written.
read_only A write tool was called on a server that can’t write: one reading a published Workspace Bundle, or one over HTTP started without --allow-writes.
source_unavailable The server could not read the Workspace or the Workspace Bundle, or could not write the checkout.
history_unavailable The call needs the Model’s history (at, get_changes, list_history), and the source has none: no git repository, or a published site without a Revision index.

The arguments don’t fit the tool’s input: a field is missing, has the wrong type or isn’t a valid id, or a write tool was given at.

What to do: Read message, which names the field, and call again with corrected arguments.

An id, a Project, a View, a Deployment or a point in history (at, from, since) names nothing in the Model.

What to do: Use one of suggestions if there are any. Otherwise find the id with search_elements, list_views or list_history.

A name matches more than one thing: a history scope that is both a Project and an Element, or a write that could mean more than one Relationship or Deployment.

What to do: Narrow the call: pass scope_kind, or the Relationship’s id. suggestions lists the candidates when there are any.

A write would add a check error, or remove something still referenced. Nothing was written.

What to do: Fix what issues or references lists, each issue with a link to its rule’s page, then write again.

A write tool was called on a server that can’t write: one reading a published Workspace Bundle, or one over HTTP started without --allow-writes.

What to do: Run archidocs mcp over a Workspace checkout, and add --allow-writes over HTTP.

The server could not read the Workspace or the Workspace Bundle, or could not write the checkout.

What to do: Check that the folder or URL the server was started with exists and is readable, then call again: each call tries anew.

The call needs the Model’s history (at, get_changes, list_history), and the source has none: no git repository, or a published site without a Revision index.

What to do: Run the server over a git checkout with its full history, or publish the site with its Revisions.

Documents Archidocs v1.4.0, the latest release.