Skip to main content
Glama

Transcribe audio with OpenAI

openai_transcribe_audio
Idempotent

Transcribe local audio files (mp3, mp4, m4a, wav, webm, flac, ogg) into text by providing an absolute file path. Supports language hints and vocabulary prompts for accurate transcripts.

Instructions

Transcribe a local audio file to text.

The file is read from disk (only from directories listed in OPENAI_MCP_ALLOWED_DIRS) and uploaded to OpenAI. Supported containers include mp3, mp4, m4a, wav, webm, flac and ogg; the API limit is 25 MB per file.

Args:

  • file_path (string, required): absolute path to the audio file

  • model (string): transcription model ID, defaults to OPENAI_DEFAULT_TRANSCRIPTION_MODEL

  • language (string): ISO-639-1 code such as "de" or "en"

  • prompt (string): vocabulary hint for names and jargon

  • response_format ('markdown'|'json'): default 'markdown'

Returns (JSON format): { "model": string, "text": string, // full transcript "language": string | null, // detected or supplied language "duration_seconds": number | null, // audio length when reported "source_file": string // canonical path that was read }

Examples:

  • Use when: "What was said in this voice memo?" -> file_path="/data/memo.m4a"

  • Use when: transcribing a German interview -> language="de"

  • Don't use when: the file is a video you only want summarised — extract the audio track first

Error Handling:

  • "Error: File not found" means the path does not exist

  • "Error: Payload too large" means the file exceeds 25 MB — split it before retrying

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoTranscription model ID. Defaults to OPENAI_DEFAULT_TRANSCRIPTION_MODEL.
promptNoOptional hint with names, jargon or spelling conventions that appear in the audio
languageNoISO-639-1 code of the spoken language, e.g. "de". Improves accuracy and latency when known.
file_pathYesAbsolute path to the audio file (mp3, mp4, m4a, wav, webm, flac, ogg). Must be inside an allowed directory.
response_formatNoOutput format: 'markdown' or 'json'markdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
modelYes
languageYes
source_fileYes
duration_secondsYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

The description discloses behaviors not visible in annotations: the file is read from disk only from OPENAI_MCP_ALLOWED_DIRS, it is uploaded to OpenAI, the 25 MB API limit applies, and specific error messages map to likely causes. These are practical behavioral details that annotations alone do not provide.

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 well-structured and front-loaded: a one-sentence purpose, then constraints, Args, return shape, usage examples, and error handling. Despite covering many aspects, each section earns its place and nothing feels redundant or tangential.

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

Completeness5/5

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

Given five parameters, file-size limits, allowed-directory constraints, output format, and error handling, the description covers all necessary context for correct invocation. It also includes the return schema and practical examples, so an agent has everything needed to select and call the tool correctly.

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 five parameters. The description largely restates this information in the Args section, with the only notable addition being the 'vocabulary hint' interpretation of prompt. Since the schema carries the semantic load, a baseline score of 3 is appropriate.

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 opens with a specific verb and resource: 'Transcribe a local audio file to text.' It differentiates itself from siblings like openai_text_to_speech and openai_generate_text by clearly indicating this tool consumes audio and produces text, while specifying supported audio formats.

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

Usage Guidelines5/5

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

The description gives explicit use-when examples: 'What was said in this voice memo?' → file_path, and a German interview → language='de'. It also provides an explicit exclusion: 'Don't use when: the file is a video you only want summarised — extract the audio track first.' This is model behavior for routing agents to the correct tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/piorkowskim79/openai-mcp-server'

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