Skip to main content
Glama

speak

Convert text to speech on macOS using customizable voice options, rate control, and background mode for uninterrupted MCP server interactions.

Instructions

Use macOS text-to-speech to speak text aloud

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backgroundNoRun speech in background to unblock further MCP interaction
rateNoSpeaking rate (words per minute)
textYesText to speak
voiceNoVoice to use (e.g., "Alex", "Victoria", "Daniel")Alex

Implementation Reference

  • Handler for the 'speak' tool: destructures arguments, executes macOS 'say' command asynchronously, returns success message or throws error.
    case 'speak': {
      const { text, voice = 'Alex', rate = 175, background = false } = request.params.arguments as {
        text: string;
        voice?: string;
        rate?: number;
        background?: boolean;
      };
    
      try {
        await execAsync(`say -v "${voice}" -r ${rate} "${text.replace(/"/g, '\"')}"${background ? ' &' : ''}`);
        return {
          content: [
            {
              type: 'text',
              text: `Successfully spoke text using voice "${voice}" at ${rate} words per minute${background ? ' (in background)' : ''}`,
            },
          ],
        };
      } catch (error: any) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to speak text: ${error.message}`
        );
      }
    }
  • src/index.ts:45-74 (registration)
    Tool registration in ListToolsRequestHandler response: defines name, description, and detailed input schema with properties, defaults, and requirements.
      name: 'speak',
      description: 'Use macOS text-to-speech to speak text aloud',
      inputSchema: {
        type: 'object',
        properties: {
          text: {
            type: 'string',
            description: 'Text to speak',
          },
          voice: {
            type: 'string',
            description: 'Voice to use (e.g., "Alex", "Victoria", "Daniel")',
            default: 'Alex',
          },
          rate: {
            type: 'number',
            description: 'Speaking rate (words per minute)',
            minimum: 1,
            maximum: 500,
            default: 175,
          },
          background: {
            type: 'boolean',
            description: 'Run speech in background to unblock further MCP interaction',
            default: false,
          },
        },
        required: ['text'],
      },
    },
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the core behavior (speaking text aloud) but lacks details about permissions needed, whether speech blocks interaction (though the 'background' parameter hints at this), error conditions, or what happens on completion. The description doesn't contradict any annotations since none exist.

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 front-loads the core purpose. Every word earns its place with no redundancy or unnecessary elaboration.

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?

For a tool with 4 parameters, 100% schema coverage, and no output schema, the description provides adequate context about what the tool does but lacks details about behavioral aspects like error handling, platform dependencies, or interaction blocking. It's minimally complete but could be more informative given the absence of annotations.

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%, so the schema already documents all four parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema, meeting the baseline for high schema coverage.

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 the specific action ('speak text aloud'), the technology used ('macOS text-to-speech'), and the resource ('text'). It distinguishes from the sibling tool 'list_voices' by focusing on speech output rather than voice enumeration.

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 implies usage context (macOS text-to-speech functionality) but doesn't explicitly state when to use this tool versus alternatives or any prerequisites. It mentions the sibling tool 'list_voices' only indirectly through the voice parameter example.

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

Related 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/bmorphism/say-mcp-server'

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