Docs

Calling a tool

crab call runs a tool of one of the account's services, or of another account's public one. Apps and scripts call it over HTTP, with an API key, as the API reference describes.

crab call notes echo '{"query": "hi"}'

crab call <service> <tool> [arguments] calls a tool of a service on the account the context is signed in to, and prints its result. On Cloud, <owner>/<service> calls another account's public tool, as crab call crabtalk/hackernews top; the local host has no accounts and refuses it. The arguments are a JSON object, read from stdin when omitted. It exits 2 when the tool ran and failed. It also prints what the run used and cost to run; see Cost of a call.

crab inspect <owner>/<service> prints how to call one before calling it: its README, its public tools, their arguments and what one call may use.

An agent calls it over MCP, with an API key.

What a call answers

  • A tool that ran answers whether it succeeded or failed: done with its result, or failed with the message it gave. done holds the result as JSON text, parsed a second time.
  • A call to a private service, or to a tool that is not public, from outside its account finds nothing.
  • The response says what the call used, and a deprecated tool's response says it is deprecated, and when it is sunset once that is set. See Changing an interface.

Query tools

A #[tool(query)] tool only reads, and is also called with GET, its arguments in the URL.

  • Its answer carries an ETag. Sent back, it answers "not modified" without running the tool while the service's data is unchanged.

Limits

  • Cloud applies shared account quotas to REST and MCP, plus concurrency limits. Nodes also enforce per-caller limits. See Request limits for both layers and how to handle refusals.
  • An account's services hold at most the memory its plan allows at once: a call is refused while they hold it, and one growing past it fails.