Skip to main content
Glama

discovery_add_payment_method

Idempotent

Add a Stripe payment method to your Disco account to enable credit purchases and paid plan subscriptions. Tokenize card details via Stripe's API first for secure processing.

Instructions

Attach a Stripe payment method to your Disco account.

The payment method must be tokenized via Stripe's API first — card details
never touch Disco's servers. Required before purchasing credits
or subscribing to a paid plan.

To tokenize a card, call Stripe's API directly:
POST https://api.stripe.com/v1/payment_methods
with the stripe_publishable_key from your account info.

Args:
    payment_method_id: Stripe payment method ID (pm_...) from Stripe's API.
    api_key: Disco API key (disco_...). Optional if DISCOVERY_API_KEY env var is set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payment_method_idYes
api_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description adds valuable behavioral context beyond annotations: it explains security architecture ('card details never touch Disco's servers'), clarifies the prerequisite tokenization step via Stripe's API, and mentions the optional API key with environment variable fallback. Annotations provide idempotentHint=true and destructiveHint=false, which the description doesn't contradict but supplements with practical implementation details.

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 efficiently structured with zero waste: first sentence states purpose, second explains security architecture, third gives usage context, fourth provides alternative tool guidance, and the Args section clearly documents parameters. Every sentence earns its place with essential information.

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?

Given the tool's complexity (payment integration with external dependencies), the description is complete: it covers purpose, security model, prerequisites, usage context, parameter semantics, and alternative workflows. With annotations covering idempotency and non-destructiveness, and an output schema presumably handling return values, no significant gaps remain.

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?

With 0% schema description coverage, the description fully compensates by explaining both parameters: payment_method_id is described as 'Stripe payment method ID (pm_...) from Stripe's API' and api_key as 'Disco API key (disco_...). Optional if DISCOVERY_API_KEY env var is set.' This adds crucial semantic context about format, source, and optionality that the bare schema lacks.

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 clearly states the specific action ('Attach a Stripe payment method') and target resource ('to your Disco account'), distinguishing it from siblings like discovery_purchase_credits or discovery_subscribe which involve using payment methods rather than attaching them. It explicitly mentions the purpose is required before purchasing credits or subscribing to a paid plan.

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?

The description provides explicit when-to-use guidance: 'Required before purchasing credits or subscribing to a paid plan.' It also distinguishes from alternatives by explaining that tokenization must happen via Stripe's API first, not through this tool, and gives the specific Stripe API endpoint to use instead.

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

Install Server

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/leap-laboratories/discovery-engine'

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