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(

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