Skip to main content
Glama

check_grant

Check if a grant allows spending a specified amount on a target program, verifying allowlist, cap, and root configuration before consumption.

Instructions

Agent consume path. Agent signs. Increments spent_lamports. Does not move SOL. Empty allowlist is denied. cap 0 requires amount 0. Optional root if not in config. Relayer submits if you also call pay.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootNoRoot pubkey if GROKCHAIN_ROOT_KEYPAIR is unset
agentNoAgent pubkey if GROKCHAIN_AGENT_KEYPAIR is unset (unsigned-tx path)
dry_runNo
target_programYesTarget program id (v1 router mode: local-only INTENTS on localnet; grokchain-devnet INTENTS EYhYtq… on devnet).
amount_lamportsYesAmount to consume from the cap counter. 0 is valid (call-only).
Install Server

TDQS

C2.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose several behaviors: 'Agent signs', 'Increments spent_lamports', 'Does not move SOL', 'Empty allowlist is denied', and 'cap 0 requires amount 0'. However, these are cryptic and not explained in plain language, and no return behavior or error conditions are mentioned.

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

Conciseness2/5

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

The description is extremely short, but it is not effectively structured. It is a series of cryptic fragments without a clear introductory sentence stating the purpose. The information is not front-loaded with a plain-language summary, making it more under-specified than concise.

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

Completeness2/5

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

For a tool with 5 parameters, no output schema, and no annotations, the description is inadequate. It does not explain return values, error conditions, prerequisite setup, or the relationship to other grant tools beyond a vague reference to pay. Several edge cases are mentioned but not elaborated.

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 description coverage is 80%, so the baseline is 3. The description adds some nuance beyond the schema: it explains that root is optional if not in config, and that cap 0 requires amount 0. However, it does not explain dry_run, which is the only undocumented parameter, and the added context is terse.

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

Purpose2/5

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

The description begins with 'Agent consume path' which is not a clear verb+resource statement. It mentions 'Increments spent_lamports' but does not explicitly state that this tool checks and consumes a grant allowance. Sibling tools like issue_grant and revoke_grant are not clearly differentiated.

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

Usage Guidelines2/5

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

The only usage hint is 'Relayer submits if you also call pay', which implies a combination with pay but does not explain when to use this tool versus others like check_grant, get_grant, or issue_grant. No explicit when-to-use or when-not-to-use guidance is provided.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/grokloop/grokchain-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server