Skip to main content
Glama

get_pricing

Retrieve domain registration, renewal, and transfer pricing for any TLD. Specify a TLD like 'com' for specific rates, or omit to get pricing for all available TLDs.

Instructions

Get domain registration, renewal, and transfer pricing. Omit tld for all TLDs, or specify one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tldNoSpecific TLD to get pricing for (e.g., 'com', 'io'). Omit for all TLDs.

Implementation Reference

  • Main handler function for the get_pricing tool. Calls GET /domains/pricing or GET /domains/pricing/:tld, formats the response into a human-readable table (single TLD or all TLDs).
    export async function getPricing(
      client: BloomfilterClient,
      params: { tld?: string },
    ): Promise<McpToolResult> {
      try {
        const url = params.tld
          ? `/domains/pricing/${encodeURIComponent(params.tld)}`
          : "/domains/pricing";
    
        const { data } = await client.http.get(url);
    
        // Single TLD
        if (params.tld) {
          const p = data as TldPricing;
          const text = [
            `Pricing for .${p.tld}:`,
            `  Registration: $${p.registration_price_usd}`,
            `  Renewal:      $${p.renewal_price_usd}`,
            `  Transfer:     $${p.transfer_price_usd}`,
          ].join("\n");
    
          return { content: [{ type: "text", text }] };
        }
    
        // All TLDs
        const pricing = (Array.isArray(data) ? data : (data.pricing ?? [])) as TldPricing[];
    
        if (pricing.length === 0) {
          return { content: [{ type: "text", text: "No pricing data available." }] };
        }
    
        const header = "TLD        Registration   Renewal        Transfer";
        const divider = "\u2500".repeat(header.length);
    
        const rows = pricing.map((p) => {
          const tld = `.${p.tld}`.padEnd(11);
          const reg = `$${p.registration_price_usd}`.padEnd(15);
          const renew = `$${p.renewal_price_usd}`.padEnd(15);
          const transfer = `$${p.transfer_price_usd}`;
          return `${tld}${reg}${renew}${transfer}`;
        });
    
        const text = `Domain Pricing:\n\n${header}\n${divider}\n${rows.join("\n")}`;
    
        return { content: [{ type: "text", text }] };
      } catch (error) {
        return formatToolError(error);
      }
    }
  • Type definition for TldPricing, used to type the pricing data returned from the API.
    export interface TldPricing {
      tld: string;
      registration_price_usd: string;
      renewal_price_usd: string;
      transfer_price_usd: string;
    }
  • PricingResponse type, representing the response shape when querying pricing for all TLDs.
    export interface PricingResponse {
      tld?: string;
      pricing: TldPricing | TldPricing[];
    }
  • src/index.ts:94-105 (registration)
    Registers the get_pricing tool with the MCP server, including schema (optional tld string) and handler binding.
    // 2. get_pricing
    server.tool(
      "get_pricing",
      "Get domain registration, renewal, and transfer pricing. Omit tld for all TLDs, or specify one.",
      {
        tld: z
          .string()
          .optional()
          .describe("Specific TLD to get pricing for (e.g., 'com', 'io'). Omit for all TLDs."),
      },
      async (params) => getPricing(client, params),
    );
  • Imports used by the getPricing handler: BloomfilterClient, formatToolError, McpToolResult, and TldPricing.
    import type { BloomfilterClient } from "../client.js";
    import { formatToolError } from "../client.js";
    import type { McpToolResult, TldPricing } from "../types.js";
Behavior3/5

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

No annotations are provided. The description implies a read-only operation ('Get pricing'), but does not disclose any behavioral details such as real-time vs cached data, cost implications, rate limits, or required permissions. It is adequate but not rich.

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 two concise sentences with no unnecessary words. It is front-loaded with the core purpose and includes a clear usage instruction.

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 simple pricing lookup tool with one optional parameter and no output schema, the description covers the purpose and usage enough. It could mention currency or update frequency, but it is generally sufficient for an AI agent to understand the tool's basic function.

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?

The input schema has one parameter (tld) with 100% description coverage. The tool description ('Omit tld for all TLDs') adds similar information to the schema's description ('Omit for all TLDs'), so it does not significantly enhance understanding beyond what the schema already provides.

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 'Get domain registration, renewal, and transfer pricing' with a specific verb and resource. It distinguishes from sibling tools which are about DNS records, account info, domain info, and domain actions (register, renew, search).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a usage tip ('Omit tld for all TLDs, or specify one') but does not explicitly state when to use this tool versus alternatives like register_domain or renew_domain. The context is somewhat implied but not explicit.

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/BloomFilter-Labs/mcp-server-bloomfilter'

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