Skip to main content
Glama

Generate spoken audio

generate_field_audio
Destructive

Generate the spoken audio of a part of the activity and save it into its texts. Call it ONLY when the user asked for audio in their own words: generating spends the text to speech quota of the user, so never add audio on your own initiative, not even to finish an activity you have just written. Say which part they named and nothing more: "elements" are the kinds of text they named, from "media_targets.audio" of the activity state ("the questions" is question, never question and choice; "the answers" is choice; "everything" is every element listed there), and "answers" narrows the choices to the correct or the incorrect ones. With "selection": "all_of_elements" every text of those elements gets its audio and you send no texts; when they named items by their place (question 2, the odd ones, the first five), add those positions in "positions". Only for a rule about the texts themselves (the capitals, the longest ones, one text they quoted), use "listed_texts" and send exactly those texts in "items". A text that already has audio keeps it unless existing is "replace"; one with a video or a youtube link is always left untouched. The result lists in "generated" every text that got its audio, with the element and the item it belongs to.

Input Schema

NameRequiredDescriptionDefault
itemsNoOnly with "selection": "listed_texts": one entry per text the user named.
answersYesFor the choices of a question: "correct" or "incorrect" when the user named only those, otherwise "all".
elementsYesThe kinds of text the user named, from media_targets.audio: only those.
existingYesWhat happens to a text that already has audio. "keep": it is left untouched; the value for every request to ADD audio. "replace": its audio is generated again and the old one is discarded, and texts without audio are left as they are; ONLY when the user asked to change, redo or regenerate the audio of those very texts (for example after rewriting them, or to hear them in another language).
languageYesVoice language: "activity" to use the language of the activity, or an ISO 639-1 code (es, en, fr...) when the user asks for another one.
positionsYesWith "all_of_elements": the "position" of the items the user named by their place; empty for every item.
selectionYes"all_of_elements": every text of the elements. "listed_texts": only the texts in "items".
activity_idYesId of the activity.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, but the description adds genuinely non-obvious behavior: TTS quota consumption, that pre-existing audio is kept unless existing='replace', and that texts with a video or YouTube link are always left untouched. The keep/replace mechanics are partly restated from the schema enum, which slightly caps this score.

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 single dense paragraph is front-loaded with the most important constraint (only on explicit user request) and every sentence carries distinct information, so nothing is padding. It is, however, a run-on block that would be easier to parse as short bullets given 8 parameters.

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?

Despite having no output schema, the description explains the return value ('generated' lists every text that got audio, with its element and item). Combined with the quota warning, the preservation rules, and the mapping guidance for all 8 parameters, an agent has everything needed to call this correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real interpretation: it maps the user's phrasing onto 'elements' via media_targets.audio ('the questions' = question, 'the answers' = choice, 'everything' = every element), and explains how 'answers', 'positions', 'selection', and 'listed_texts' interact with what the user said.

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?

States a specific verb+resource+scope: 'Generate the spoken audio of a part of the activity and save it into its texts.' This clearly separates it from siblings like attach_video, illustrate_items, and describe_image, which handle different media types.

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?

Gives an explicit hard precondition ('Call it ONLY when the user asked for audio in their own words') and an explicit prohibition with rationale ('never add audio on your own initiative, not even to finish an activity you have just written'), because generation spends the user's TTS quota. This is exactly the when/when-not guidance an agent needs to avoid over-calling.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources