Skip to main content
Glama

GhostKey — Route Paid APIs with x402

GhostKey Session Create

ghostkey_session_create

PAID tool ($0.10 USDC via x402 v2, Base). Create a short-lived, origin-scoped browser delegation session. Send the x402 PAYMENT-SIGNATURE header on the /mcp request; without payment the call returns the live x402 challenge (HTTP 402, amount 100000 = $0.10 USDC, network eip155:8453). Actions inside a minted session are unmetered. Optionally target a previously enrolled trusted device using its private 256-bit routing capability so its extension can claim the session automatically. The user still handles login/CAPTCHA and any new browser-origin permission themselves.

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": {
      "allowed_origins": "<allowed_origins>"
    },
    "name": "ghostkey_session_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
ttl_secondsNoSession lifetime in seconds (60-3600). The session expires when the TTL elapses even if unused; actions inside a live session are unmetered.
allowed_originsYesAllowlist of browser origins (1-12 origin URIs) the delegated session may act on; navigation or actions outside these origins are denied.
trusted_device_idNoOptional 43-character routing capability of a previously enrolled trusted device; when supplied, that device's extension can claim the session automatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / allowed_origins / description
      Added value: +"Allowlist of browser origins (1-12 origin URIs) the delegated session may act on; navigation or actions outside these origins are denied."
    • addedInput schema / properties / trusted_device_id / description
      Added value: +"Optional 43-character routing capability of a previously enrolled trusted device; when supplied, that device's extension can claim the session automatically."
    • addedInput schema / properties / ttl_seconds / description
      Added value: +"Session lifetime in seconds (60-3600). The session expires when the TTL elapses even if unused; actions inside a live session are unmetered."
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the $0.10 USDC cost, the x402 challenge failure mode, TTL-based expiry, origin-scoped denial, unmetered actions inside a live session, trusted-device claiming, and the fact that the user still handles login/CAPTCHA and browser-origin permissions. These details materially improve the agent's ability to invoke and handle the tool correctly.

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?

The description is front-loaded with the most important operational fact, that the tool is paid and requires the x402 header. It is generally efficient, though the $0.10 cost and the unmetered-actions point are repeated in both the description and the TTL schema field.

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

Completeness4/5

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

For a session-creation tool with no output schema, the description covers the important payment, failure, scope, and user-responsibility behavior well. It does not explain what a successful call returns, such as a session identifier or claim details, which is a notable gap given the absence of an output schema.

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 100%, so the three parameters are already fully documented, including TTL bounds, origin allowlist limits, and the trusted-device ID pattern. The description reinforces the trusted-device routing concept and origin scoping but does not add syntax or constraints beyond the schema.

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 states a specific verb and resource: create a short-lived, origin-scoped browser delegation session. It also makes the paid, x402-gated nature of the operation clear, so an agent can distinguish this from session_action, session_status, or session_revoke without opening their schemas.

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?

The description gives a clear precondition: the caller must send the x402 PAYMENT-SIGNATURE header, or it receives an HTTP 402 challenge. It also explains the optional trusted-device routing path, but it does not explicitly compare when to use this tool versus the sibling session-management tools.

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