跳到主要內容

ARC developer documentation

Tools

Eight generic AFS tools are always present. Three content tools appear only when the blocklet declares collections, and their schemas name those collections.

A blocklet publishes two kinds of MCP tools. The generic AFS tools are always registered. The content tools are registered only when the blocklet declares content collections, and their input schemas name the collections it declared.

Both kinds run over the same data plane. The content tools are wrappers over AFS search, list, and read. There is no second store behind them.

Generic AFS tools

ToolRequiredOther parametersAnonymous
afs_readnonepath, entries, startLine, endLineYes
afs_listpathdepth, pattern, limitYes
afs_searchpath, querypattern, limit, explainYes
afs_statpathnoneYes
afs_explainpathnoneYes
afs_writenonepath, content, mode, patches, ifMatch, entriesNo
afs_deletenonepath, recursive, ifMatch, entriesNo
afs_execpathargsNo

afs_read, afs_write, and afs_delete show no required field because they accept either a single path or an entries array; one of the two is mandatory. Batch the array rather than looping single calls; afs_read accepts up to 16 entries per call.

afs_exec runs a declared action. Discover the available actions and their input schemas by listing {path}/.actions.

For what these paths and operations mean, and which operations a given provider actually implements, see AFS.

A tool being listed and callable does not mean it will succeed on a given path: the blocklet's path policy is checked inside the call. See Access tiers.

Content tools

ToolRequiredOther parameters
search_contentcollection, queryfilters, locale, limit
list_contentcollectionfilters, locale, limit
get_contentcollection, idlocale

These three appear only when the blocklet declares collections. A blocklet with no declaration registers none of them. The gate is fail-closed, so a partial or empty declaration does not produce a tool with an empty collection list.

The declared collection names are written into each tool's description and into the collection parameter, so a client sees them in tools/list without probing. A blocklet that declares four collections produces descriptions ending in a list of those four names.

Whether they are callable anonymously depends on the read role the blocklet declared for the collection. The tool names themselves are on the anonymous allowlist; the collections visible inside them are decided at registration time.

Which set a host returns

tools/list returns eight tools from a blocklet with no declared collections, and eleven from a blocklet that declares them. The difference is the blocklet's own declaration, not the caller's credential: an anonymous client and an authenticated client see the same list.

What changes with a credential is which of those tools answer. See Connect a client.

Declaring collections

The declaration lives in the blocklet's own manifest, alongside the rest of its capabilities. That surface is documented with the manifest, not here; see Blocklets.