Skip to main content
Glama

tollbooth-oauth2-collector

store_code

Store a sealed OAuth2 authorization code.

Called by the serverless callback function after the browser redirect. The state carries BOTH the patron npub (the lookup/retrieve key) and the operator npub (the PUBLIC key the code is sealed to) — see the SDK's pack_oauth_state. The code is sealed with NIP-44 to the operator so only that operator's nsec can open it; the Neon row is keyed by the patron npub, so retrieval (retrieve_code(state=patron_npub)) is unchanged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe authorization code from the OAuth provider.
stateYesThe packed state (``patron_npub.operator_npub``).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / code / description
      Added value: +"The authorization code from the OAuth provider."
    • addedInput schema / properties / state / description
      Added value: +"The packed state (``patron_npub.operator_npub``)."
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and does substantial work: it reveals the NIP-44 sealing to the operator, that only the operator's nsec can open it, and that the Neon row is keyed by the patron npub. It does not address overwrite/idempotency or error behavior, but the cryptographic and keying behavior is clearly disclosed.

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

Conciseness5/5

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

The description is front-loaded with the action, then adds context in a short, information-dense paragraph. Every sentence contributes: invocation context, state semantics, sealing behavior, and retrieval compatibility. No 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?

For a two-parameter store operation, the description covers everything an agent needs: when it runs, how state is structured, what sealing means, and how the row is keyed. The output schema exists to cover return shape, so the absence of return details is not a gap.

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?

Input schema coverage is 100%, so baseline is 3. The description adds real meaning beyond the schema: it explains that state encodes both patron and operator npub, that the patron is the lookup key, and that the code is sealed to the operator. This helps the agent construct state correctly.

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?

The description opens with a specific verb and object: 'Store a sealed OAuth2 authorization code.' It goes beyond the name, and the clarification that retrieval is handled by retrieve_code(state=patron_npub) differentiates it from the sibling tool.

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?

It explicitly states the exact call-site context: 'Called by the serverless callback function after the browser redirect.' It also contrasts with the counterpart retrieve_code, making when-to-store vs when-to-retrieve unambiguous.

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.