Skip to main content
A tool call returns the result as text, and as structured content when the result is JSON. Errors arrive the same way — as a result marked isError, with a label naming what went wrong — so an agent can read a failure and decide what to do rather than losing the turn to a transport error.

Exit codes

Every result carries the exit code of the work behind it, in _meta and in the error text.

Metadata

Each result carries _meta keys under the cohesive.ai/ prefix:

Size limits

Output is capped at 256 KiB. Past that, the result is truncated, cohesive.ai/truncated is set, and the text ends with a note saying so — narrow the request with node_ids, bounds, or limit, or page through with before and limit. Images come back inline up to 3 MiB. A capture above that isn’t returned as bytes: the result tells the agent to call cohesive_file_get and use the signed download_url instead. Narrowing a capture with node_ids or bounds is usually the better move. Request bodies are capped at 8 MiB.

Time limits

A tool call gets 120 seconds by default. Tools that routinely take longer, like a canvas render, carry their own budget, and nothing runs past 15 minutes whatever it asks for. A call that runs out of time comes back as an error saying so, with the same advice: narrow the request. Fewer nodes, tighter bounds. If your client hangs up mid-call, the run is cancelled rather than left to burn its budget.
Read-only tools are marked read-only and destructive ones destructive on every tool’s page and in the annotations on the wire. Clients that ask for approval before acting use those hints — they’re worth honoring if you’re building one.