Skip to main content
Glama

Leash

Create Leash policy

leash_policy_create

Signs a Leash policy token for an agent wallet (same rules as POST /api/policy: Safe deployed, owner and agent both owners, caps, expiry ≤ 1 year). The OWNER should create the policy. The token only limits what Leash will prepare; the agent key can still act outside Leash (see HONEST note). Limits are enforced by the Leash gateway, not on-chain. The agent is a 1-of-2 Safe owner, so if its key is used directly (outside Leash) it can bypass these limits. An audited on-chain allowance module is planned. Revoking removes the agent as owner on-chain. Chains: elysium (default), hyperevm, robinhood.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "safe": "<safe>",
      "agent": "<agent>",
      "owner": "<owner>",
      "maxPerTxWei": "<maxPerTxWei>",
      "expiresAt": "<expiresAt>"
    },
    "name": "leash_policy_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
safeYes
agentYes
chainNoelysium (default), hyperevm or robinhoodelysium
ownerYes
expiresAtYes
tokenCapsNo
maxPerTxWeiYes
maxPerDayWeiNo
uncappedTokensNoblock
allowedContractsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare the write and open-world nature; the description adds substantive context the agent cannot get elsewhere: limits are enforced by the Leash gateway rather than on-chain, the agent key can bypass them if used directly, revocation drops the agent as Safe owner on-chain, and an on-chain allowance module is only planned. The trailing revocation sentence drifts toward a different operation and adds some ambiguity, which keeps this below a 5.

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

Conciseness3/5

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

It is front-loaded with the core action, which is good, but the body mixes the security model, a revocation aside, and a pointer to an external 'HONEST note' that the agent may not be able to resolve. The parenthetical reference to POST /api/policy is useful for a human but is bulk for an agent.

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

Completeness3/5

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

For a 10-parameter, security-sensitive creation tool with no output schema and 10% schema description coverage, the description covers the trust model well but leaves most of the parameter surface and the response shape unexplained. An agent knows why the tool matters but not fully how to populate the cap and allowlist fields correctly.

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

Parameters3/5

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

Schema coverage is only 10% (only 'chain' is described), so the description must compensate more than it does. It does add real meaning for some inputs — expiry capped at 1 year, the concept of caps, and the three supported chains — but maxPerTxWei vs maxPerDayWei, tokenCaps, uncappedTokens and allowedContracts are never explained in prose.

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 — 'Signs a Leash policy token for an agent wallet' — and immediately scopes it with the rule set it mirrors (Safe deployed, owner and agent both owners, caps, expiry ≤ 1 year). An agent can distinguish this from leash_policy_read or leash_policy_usage without opening any schema.

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

Usage Guidelines4/5

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

Gives explicit actor guidance ('The OWNER should create the policy') and prerequisites (Safe deployed, owner and agent both owners), which tells the agent the precondition for a successful call. It stops short of naming sibling alternatives, e.g. that leash_policy_read should be used to inspect an existing policy rather than creating a new one.

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.

Resources