Skip to main content
Glama

retell_publish_agent

Deploy the current agent configuration as a new version to update and activate changes in your Retell AI voice and chat agent.

Instructions

Publish/deploy the current agent configuration as a new version.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe agent ID to publish

Implementation Reference

  • The switch case in executeTool function that handles the retell_publish_agent tool by calling the Retell API's publish-agent endpoint with the provided agent_id.
    case "retell_publish_agent":
      return retellRequest(`/publish-agent/${args.agent_id}`, "POST");
  • Input schema definition for the retell_publish_agent tool, specifying the required agent_id parameter.
    {
      name: "retell_publish_agent",
      description: "Publish/deploy the current agent configuration as a new version.",
      inputSchema: {
        type: "object",
        properties: {
          agent_id: {
            type: "string",
            description: "The agent ID to publish"
          }
        },
        required: ["agent_id"]
      }
    },
  • src/index.ts:1283-1285 (registration)
    Registration of the ListToolsRequest handler that returns the list of tools, including retell_publish_agent.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • src/index.ts:1287-1313 (registration)
    Registration of the CallToolRequest handler that dispatches to executeTool based on tool name, enabling execution of retell_publish_agent.
    // 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,
        };
      }
    });
  • Generic helper function for making authenticated HTTP requests to the Retell AI API, used by all tool handlers including retell_publish_agent.
    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();
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a mutation ('publish/deploy') but doesn't specify whether this is reversible, what permissions are required, if it affects live systems, or what happens after publishing. The description lacks critical behavioral details for a deployment 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 unnecessary words. It is appropriately sized and front-loaded, with every word contributing to understanding the action.

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?

For a deployment/mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'publish/deploy' entails operationally, what the new version means, or what the expected outcome is. This leaves significant gaps in understanding the tool's behavior and impact.

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 100% description coverage, with the single parameter 'agent_id' documented as 'The agent ID to publish'. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 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 ('publish/deploy') and target ('current agent configuration as a new version'), making the purpose understandable. It doesn't explicitly differentiate from siblings like 'retell_update_agent' or 'retell_get_agent_versions', but the verb 'publish/deploy' suggests a deployment action rather than modification or retrieval.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing agent configuration), exclusions, or how it differs from sibling tools like 'retell_update_agent' or 'retell_get_agent_versions', leaving the agent to infer 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