Skip to main content
Glama

estimate_capability

Get cost estimates for API capabilities before execution to plan budgets and optimize workflows in AI agent development.

Instructions

Get cost estimate for executing a capability without actually executing it. Use before expensive operations or when building cost-aware workflows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
capability_idYesCapability to estimate cost for (e.g. 'email.send')
providerNoOptional: specific provider. If omitted, estimates for the auto-selected provider.
credential_modeNoCredential mode: byo (default), rhumb_managed, or agent_vault

Implementation Reference

  • The tool handler function for `estimate_capability`. It takes the validated input and calls the Rhumb API client's `estimateCapability` method.
    export async function handleEstimateCapability(
      input: EstimateCapabilityInput,
      client: RhumbApiClient
    ): Promise<EstimateCapabilityOutput> {
      const result = await client.estimateCapability(input.capability_id, {
        provider: input.provider,
        credentialMode: input.credential_mode
      });
    
      return result;
    }
  • The JSON schema definition for the `estimate_capability` tool input.
    export const EstimateCapabilityInputSchema = {
      type: "object" as const,
      properties: {
        capability_id: { type: "string" as const, description: "Capability to estimate (e.g. 'email.send'). Call this BEFORE execute_capability to know the cost in advance." },
        provider: { type: "string" as const, description: "Specific provider slug. Omit to estimate for the auto-selected provider based on your routing strategy." },
        credential_mode: { type: "string" as const, description: "'auto' (default: use Rhumb Resolve when an active managed config exists, otherwise fall back to byo), 'rhumb_managed', 'byo' (BYOK), or 'agent_vault'. Affects pricing — rhumb_managed includes a 20% markup." }
      },
      required: ["capability_id"] as const
    };
  • Registration of the `estimate_capability` tool in the MCP server, including input definition and handler invocation. (Note: excerpt is reconstructed based on the pattern found in file).
    // -- estimate_capability -----------------------------------------------
    server.tool(
      "estimate_capability",
      "Get the cost of a Capability call WITHOUT making the call. Returns cost in USD, circuit health, and endpoint pattern. Default credential mode is auto: Rhumb uses Rhumb Resolve when an active managed config exists, otherwise falls back to byo (BYOK). Always call this before execute_capability for cost-sensitive workflows — no charge for estimates.",
      {
        capability_id: z.string().describe(EstimateCapabilityInputSchema.properties.capability_id.description),
        provider: z.string().optional().describe(EstimateCapabilityInputSchema.properties.provider.description),
        credential_mode: z.string().optional().describe(EstimateCapabilityInputSchema.properties.credential_mode.description)
      },
      async ({ capability_id, provider, credential_mode }) => {
        const result = await handleEstimateCapability(
Behavior3/5

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

No annotations provided, so description carries full burden. Discloses critical safety trait: 'without actually executing it' confirms read-only estimation. However, misses: return value structure (currency format? object?), cache behavior, validation scope (does it verify capability_id exists?), and whether estimates are binding or approximate.

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?

Optimal two-sentence structure: first sentence defines action and safety constraint; second provides usage context. No redundancy, tautology, or structural waste. Every word earns its place.

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?

With 100% schema coverage and clear purpose, core definition is adequate. However, lacks output semantics (critical for an estimate tool): no description of return format (numeric? object? currency units?), precision guarantees, or error conditions. Since no output_schema exists, description should compensate for these gaps.

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 100% (all 3 parameters documented), establishing baseline 3. Description mentions 'capability' generically but doesn't augment parameter semantics beyond schema definitions—no clarifying examples, constraints, or inter-parameter relationships (e.g., when provider affects credential_mode).

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?

Excellent specificity: 'Get cost estimate for executing a capability' clearly defines the verb (get cost estimate), resource (capability), and distinguishes from sibling 'execute_capability' via 'without actually executing it.' Also differentiates from 'check_balance' (funds) and 'budget' (limit management).

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?

Provides explicit temporal guidance: 'Use before expensive operations or when building cost-aware workflows.' Clearly signals intent for pre-flight cost checks. Lacks explicit 'when NOT to use' or named alternative comparisons (e.g., vs. 'execute_capability'), but context is clear enough for selection.

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/supertrained/rhumb'

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