Skip to main content
Glama

retell_get_voice

Retrieve voice configuration details from Retell AI's platform to manage AI phone agents and conversation flows.

Instructions

Retrieve details of a specific voice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
voice_idYesThe voice ID to retrieve

Implementation Reference

  • Switch case in executeTool function that handles the retell_get_voice tool by making a GET request to the Retell API endpoint `/get-voice/{voice_id}`.
    case "retell_get_voice":
      return retellRequest(`/get-voice/${args.voice_id}`, "GET");
  • Tool definition in the tools array, including name, description, and input schema requiring 'voice_id'.
    {
      name: "retell_get_voice",
      description: "Retrieve details of a specific voice.",
      inputSchema: {
        type: "object",
        properties: {
          voice_id: {
            type: "string",
            description: "The voice ID to retrieve"
          }
        },
        required: ["voice_id"]
      }
    },
  • Generic helper function that performs authenticated HTTP requests to the Retell AI API, used by all tool handlers including retell_get_voice.
    async function retellRequest(
      endpoint: string,
      method: string = "GET",
      body?: Record<string, unknown>
    ): Promise<unknown> {
      const apiKey = getApiKey();
    
      const headers: Record<string, string> = {
        "Authorization": `Bearer ${apiKey}`,
        "Content-Type": "application/json",
      };
    
      const options: RequestInit = {
        method,
        headers,
      };
    
      if (body && method !== "GET") {
        options.body = JSON.stringify(body);
      }
    
      const response = await fetch(`${RETELL_API_BASE}${endpoint}`, options);
    
      if (!response.ok) {
        const errorText = await response.text();
        throw new Error(`Retell API error (${response.status}): ${errorText}`);
      }
    
      // Handle 204 No Content
      if (response.status === 204) {
        return { success: true };
      }
    
      return response.json();
    }
  • src/index.ts:1283-1285 (registration)
    Registration of the ListToolsRequestSchema handler that returns the full list of tools, including retell_get_voice.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • src/index.ts:1287-1313 (registration)
    Registration of the CallToolRequestSchema handler which dispatches to executeTool based on tool name, enabling execution of retell_get_voice.
    // Register tool execution handler
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      try {
        const result = await executeTool(name, args as Record<string, unknown>);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        return {
          content: [
            {
              type: "text",
              text: `Error: ${errorMessage}`,
            },
          ],
          isError: true,
        };
      }
    });
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without behavioral details. It doesn't disclose if this is a read-only operation, requires authentication, has rate limits, or what the response format might be, which are critical for a retrieval tool.

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 a single, efficient sentence that directly states the tool's purpose without any fluff or redundancy. It is appropriately sized and front-loaded, making it easy to parse quickly.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete for a retrieval tool. It lacks details on behavioral traits, response format, and usage context, which are essential for an agent to understand how to invoke and interpret results effectively.

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%, with the single parameter 'voice_id' well-documented in the schema. The description adds no additional meaning beyond what the schema provides, such as format examples or sourcing guidance, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('retrieve details') and target resource ('specific voice'), which is a specific verb+resource combination. However, it doesn't distinguish this tool from other 'get' siblings like 'retell_get_agent' or 'retell_get_call' beyond the resource type, missing explicit differentiation.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't mention if this should be used after listing voices with 'retell_list_voices' or in what contexts retrieval is needed, leaving the agent without usage context.

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/itsanamune/retellsimp'

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