Skip to main content
Glama

mcp_openai_transcribe

Convert speech to text using OpenAI Whisper API. Transcribe audio files with customizable options like model, language, and prompt.

Instructions

OpenAI Whisper API를 사용하여 음성을 텍스트로 변환합니다. 변환된 텍스트를 반환합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audioPathYes변환할 오디오 파일 경로
languageNo오디오 언어 (예: ko, en, ja)
modelNo사용할 모델 (예: whisper-1)
promptNo인식을 도울 힌트 텍스트

Implementation Reference

  • The inline handler function for the mcp_openai_transcribe tool. It delegates to openaiService.speechToText and handles the response or error.
    async handler(args: any): Promise<ToolResponse> {
      try {
        const result = await openaiService.speechToText(args);
        return {
          content: [{
            type: 'text',
            text: result
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: `OpenAI Whisper 오류: ${error instanceof Error ? error.message : String(error)}`
          }]
        };
      }
    }
  • The input schema defining parameters for the transcription tool: audioPath (required), model, language, prompt.
    inputSchema: {
      type: 'object',
      properties: {
        audioPath: {
          type: 'string',
          description: '변환할 오디오 파일 경로'
        },
        model: {
          type: 'string',
          description: '사용할 모델 (예: whisper-1)'
        },
        language: {
          type: 'string',
          description: '오디오 언어 (예: ko, en, ja)'
        },
        prompt: {
          type: 'string',
          description: '인식을 도울 힌트 텍스트'
        }
      },
      required: ['audioPath']
    },
  • src/index.ts:24-54 (registration)
    MCP server capabilities registration declaring mcp_openai_transcribe as available (true). The server uses imported tools array to handle calls.
    capabilities: {
      tools: {
        mcp_sparql_execute_query: true,
        mcp_sparql_update: true,
        mcp_sparql_list_repositories: true,
        mcp_sparql_list_graphs: true,
        mcp_sparql_get_resource_info: true,
        mcp_ollama_run: true,
        mcp_ollama_show: true,
        mcp_ollama_pull: true,
        mcp_ollama_list: true,
        mcp_ollama_rm: true,
        mcp_ollama_chat_completion: true,
        mcp_ollama_status: true,
        mcp_http_request: true,
        mcp_openai_chat: true,
        mcp_openai_image: true,
        mcp_openai_tts: true,
        mcp_openai_transcribe: true,
        mcp_openai_embedding: true,
        mcp_gemini_generate_text: true,
        mcp_gemini_chat_completion: true,
        mcp_gemini_list_models: true,
        mcp_gemini_generate_images: false,
        mcp_gemini_generate_image: false,
        mcp_gemini_generate_videos: false,
        mcp_gemini_generate_multimodal_content: false,
        mcp_imagen_generate: false,
        mcp_gemini_create_image: false,
        mcp_gemini_edit_image: false
      },
  • The core speechToText method in OpenAIService that performs the actual OpenAI Whisper API call for audio transcription using multipart form data.
    async speechToText(args: {
      audioPath: string;
      model?: string;
      language?: string;
      prompt?: string;
    }): Promise<string> {
      try {
        if (!OPENAI_API_KEY) {
          throw new McpError(
            ErrorCode.InternalError, 
            'OPENAI_API_KEY가 설정되지 않았습니다.'
          );
        }
    
        if (!fs.existsSync(args.audioPath)) {
          throw new McpError(
            ErrorCode.InternalError,
            `오디오 파일을 찾을 수 없습니다: ${args.audioPath}`
          );
        }
    
        const formData = new FormData();
        const fileBlob = new Blob([fs.readFileSync(args.audioPath)]);
        formData.append('file', fileBlob, path.basename(args.audioPath));
        formData.append('model', args.model || 'whisper-1');
        
        if (args.language) {
          formData.append('language', args.language);
        }
        
        if (args.prompt) {
          formData.append('prompt', args.prompt);
        }
    
        const response = await axios.post(
          `${OPENAI_API_BASE}/audio/transcriptions`,
          formData,
          {
            headers: {
              'Content-Type': 'multipart/form-data',
              'Authorization': `Bearer ${OPENAI_API_KEY}`
            }
          }
        );
    
        return JSON.stringify(response.data, null, 2);
      } catch (error) {
        if (axios.isAxiosError(error)) {
          const statusCode = error.response?.status;
          const responseData = error.response?.data;
          
          throw new McpError(
            ErrorCode.InternalError,
            `OpenAI API 오류 (${statusCode}): ${
              typeof responseData === 'object' 
                ? JSON.stringify(responseData, null, 2) 
                : responseData || error.message
            }`
          );
        }
        
        throw new McpError(ErrorCode.InternalError, `음성 인식 요청 실패: ${formatError(error)}`);
      }
    }
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 only states the basic function and return value ('변환된 텍스트를 반환합니다' - returns transcribed text). It lacks critical behavioral details: whether this is a read/write operation, rate limits, authentication requirements, error handling, or what happens with large audio files. For a tool with no annotations, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two clear sentences that state the core function and return value. It's front-loaded with the main purpose. However, it could be slightly more structured by separating functional description from behavioral aspects.

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 this is a transcription tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the return format (just '텍스트'), error conditions, performance characteristics, or limitations. For an API tool with moderate complexity, more context about behavior and output would be needed.

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 4 parameters thoroughly. The description adds no parameter information beyond what's in the schema - it doesn't explain parameter interactions, default values, or provide examples beyond what's already in the schema descriptions. Baseline 3 is appropriate when schema does the heavy lifting.

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 tool's purpose: 'OpenAI Whisper API를 사용하여 음성을 텍스트로 변환합니다' (transcribes speech to text using OpenAI Whisper API). It specifies the verb (transcribe) and resource (speech/audio), but doesn't differentiate from siblings like mcp_openai_tts (text-to-speech) or mcp_openai_chat. The purpose is clear but lacks explicit sibling 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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over other transcription tools (none in siblings) or when to use other audio-related tools like mcp_openai_tts. There's no context about prerequisites, limitations, or typical use cases.

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/bigdata-coss/agent_mcp'

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