Skip to main content
Glama

Sato Hub: Build Onchain & Crypto Agents

Create a runnable agent repo from a checked template

onchain_agent_create_agent
Read-onlyIdempotent

USE WHEN someone wants the code for an onchain agent, not advice: describe the goal and get a runnable TypeScript repo generated from a template that is re-checked every night. Same handler as POST /api/create and the create-sato-agent CLI. NOT FOR choosing a stack or advice (use onchain_agent_recommend_stack or onchain_agent_build_plan instead) or a plan with no repo (use onchain_agent_scaffold_plan).

The goal picks the template; it never changes a template code file. A goal no template answers returns no_template with the nearest templates instead of improvised code — each with its id, framework, intents, chains and mismatched (what differs from the request), so the next call can name one.

TEMPLATES, as template (intents: frameworks): base-guarded-trader (trading, swap: agentkit, ai-sdk, claude-agent-sdk, openai-agents, plain-ts); persona-agent (general, payments: claude-agent-sdk); research-report (data, research: plain-ts); solana-guarded-swapper (trading, swap: plain-ts); token-launch-prep (launch: plain-ts); treasury-monitor (data, treasury: plain-ts); x402-seller (payments: plain-ts). Any other intent × framework pair answers no_template.

The repo carries policy.json (spending caps, allowed chains and tokens), sato.lock.json (dependency custody readings) and sato.create.json (the manifest, signed when a key is configured). It generates for a local fork by default and testnet on request; mainnet is refused unless network is "mainnet" and mainnet_risk_accepted is true, and a template that does not run on the network says so.

RULE ENFORCED: the goal is not stored or logged. A refusal names its error code and, where one applies, the rule. last_green is the day the template last passed its nightly checks, or null — never invented. Nothing is audited, and nothing here signs, holds keys or moves funds.

RETURNS (json): { schema: "sato.create.response/v1", ok: true, template: { id, version, digest, framework }, files: [{ path, encoding, content }], zip_base64?, env_names, next_commands, manifest, last_green, status_url, cli } or { ok: false, error, message, rule?, nearest?, blocked? }. Writes nothing.

Example: { goal: "swap USDC to ETH on Base with a per-trade cap", framework: "plain-ts" }

Input Schema

NameRequiredDescriptionDefault
goalYesWhat the agent should do, in plain words, e.g. 'swap USDC to ETH on Base with a per-trade cap'. Not stored.
chainNoChain the agent runs on.
formatNofiles (default) or zip (adds zip_base64).
networkNoWhere it may sign. Default fork. mainnet needs mainnet_risk_accepted: true.
templateNoPin a template id.
frameworkNoAgent framework. Templates exist for agentkit, ai-sdk, claude-agent-sdk, openai-agents, plain-ts; any other answers no_template with the nearest.
mainnet_risk_acceptedNoExplicit acceptance of mainnet risk. Only read when network is mainnet.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / chain / enum
      Previous value: -[
      -  "base",
      -  "base-sepolia"
      -]New value: +[
      +  "base",
      +  "base-sepolia",
      +  "solana"
      +]
  2. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed1 schema field changed
    • changedInput schema / properties / framework / description
      Previous value: -"Agent framework. Templates exist for agentkit, claude-agent-sdk, openai-agents, plain-ts; any other answers no_template with the nearest."New value: +"Agent framework. Templates exist for agentkit, ai-sdk, claude-agent-sdk, openai-agents, plain-ts; any other answers no_template with the nearest."
  4. Changed1 schema field changed
    • changedInput schema / properties / framework / description
      Previous value: -"Agent framework. Templates exist for plain-ts; any other answers no_template with the nearest."New value: +"Agent framework. Templates exist for agentkit, claude-agent-sdk, openai-agents, plain-ts; any other answers no_template with the nearest."
  5. Added

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnly/idempotent/openWorld annotations: it documents the no_template refusal shape (id, framework, intents, chains, mismatched), the mainnet gating rule (network=mainnet plus mainnet_risk_accepted), that last_green is never invented, that the goal is not stored or logged, and that nothing signs, holds keys or moves funds. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with USE WHEN / NOT FOR before the mechanics, and each block (templates, policy files, enforced rule, returns) carries distinct information. It is long and dense, with the template list and returns block bordering on over-stuffing, but no sentence is pure filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description supplies the full return contract (schema id, ok true/false branches, template/files/env_names/manifest/last_green fields) and an example call. For a 7-parameter generation tool this leaves nothing an agent needs missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning: the full template-id list, the intent × framework matrix that determines no_template, network defaults (fork, testnet on request, mainnet refused), and the format default. It stops short of exhaustive per-parameter syntax, but clearly exceeds what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: generate a runnable TypeScript repo from a template, with the side-effect profile ('writes nothing'). It explicitly names the siblings it is not (recommend_stack, build_plan, scaffold_plan), so an agent can disambiguate it from the rest of the onchain_agent_* family without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Opens with an explicit USE WHEN trigger ('someone wants the code, not advice') and a NOT FOR clause routing to two named alternatives for advice and one for plan-without-repo. The when/when-not/alternative triad is fully specified.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.