Skip to main content
Glama
PhononX

Carbon Voice

by PhononX

run_ai_action

Apply a pre-defined AI prompt to specific messages. Provide the prompt ID and message IDs to generate responses in the language you need.

Instructions

Run an AI Action (Prompt) against one or more specific messages. USE WHEN: You have concrete message_ids and a prompt_id, and want the AI Action applied to exactly those messages. USE INSTEAD: summarize_conversation if you want a whole conversation summarized and would otherwise have to list its messages yourself — it does that selection for you. FIRST: prompt_id comes from list_ai_actions (field id) — call it first if you don't have one. FIRST: message_ids comes from list_messages (field results[].id) — call it first if you don't have one. EXAMPLE: {"prompt_id":"prompt-abc","message_ids":["msg-1","msg-2"],"language":"english"} RETURNS: {id, prompt_id, message_ids, creator_id, channel_id?, workspace_id?, responses: [{language, text?, markdown?, html?, json?}], created_at}. The generated output is in responses[], one entry per language. ERROR BAD_REQUEST: prompt_id or one of message_ids is not a valid ID. — Call list_ai_actions for valid prompt_id values and list_messages for valid message IDs; do not retry with the same IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoThe language of the response. Defaults to original message.
prompt_idYesAI Action ID, from `list_ai_actions` (its `id`).
channel_idNoConversation the messages belong to, from `list_conversations`.
message_idsYesMessage IDs, from `list_messages` (`results[].id`).
workspace_idNoWorkspace scope, from `get_workspaces_basic_info`.
response_fieldsNoDot-path allowlist to shrink the response, e.g. ["results.id","total"]. Omit for the full payload.
ignore_existing_responseNoWhether to ignore existing response and generate a new one. Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.10.0
    • addedInput schema / properties / channel_id / description
      Added value: +"Conversation the messages belong to, from `list_conversations`."
    • addedInput schema / properties / message_ids / description
      Added value: +"Message IDs, from `list_messages` (`results[].id`)."
    • addedInput schema / properties / prompt_id / description
      Added value: +"AI Action ID, from `list_ai_actions` (its `id`)."
    • addedInput schema / properties / response_fields
      Added value: +{
      +  "description": "Dot-path allowlist to shrink the response, e.g. [\"results.id\",\"total\"]. Omit for the full payload.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / workspace_id / description
      Added value: +"Workspace scope, from `get_workspaces_basic_info`."
  2. Changed1 schema field changedv2.8.17
    • addedInput schema / properties / ignore_existing_response
      Added value: +{
      +  "description": "Whether to ignore existing response and generate a new one. Defaults to false.",
      +  "type": "boolean"
      +}
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false. The description does not contradict these; it adds useful behavioral context: the return shape (`RETURNS: {id, prompt_id, message_ids, ...}`), that output is in `responses[]` per language, and a specific error condition (BAD_REQUEST) with guidance not to retry with the same IDs. This adds value beyond the annotations without overloading.

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 structured with clear sections (USE WHEN, USE INSTEAD, FIRST, EXAMPLE, RETURNS, ERROR), which makes it scannable and front-loads the core purpose. It is somewhat long but every section adds information an agent needs; no filler. The example and error handling justify the length.

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

Completeness4/5

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

For a tool with 7 parameters, 2 required, and no output schema, the description covers the return format, error conditions, and where to obtain IDs. It also hints at optional parameters like `channel_id` and `workspace_id` through the return shape, but the schema already covers those. The description is sufficient for an agent to call it correctly without additional lookups.

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 each parameter already has a description. The tool description adds extra meaning by explaining where to source `prompt_id` and `message_ids` (from `list_ai_actions` and `list_messages`), providing a concrete example with all fields, and clarifying the default behavior of `language`. This goes beyond the schema's basic descriptions.

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 states a specific verb ('Run an AI Action') against a specific resource ('one or more specific messages'), and explicitly differentiates itself from the sibling tool `summarize_conversation` by naming it and the condition that selects it. This makes the purpose unmistakable and distinguishes it from alternatives without needing to inspect schemas.

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 provides explicit USE WHEN and USE INSTEAD directives, naming `summarize_conversation` as the alternative for whole-conversation summaries. It also gives FIRST instructions for obtaining `prompt_id` and `message_ids` from `list_ai_actions` and `list_messages`, which is actionable guidance for an agent. This fully covers when to use this tool versus siblings.

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