Skip to main content
Glama

Send a photo or file as operator

dosai_send_operator_media
Destructive

Send a client a photo, video or document, with a caption. Give exactly one source: media_id (a file from the project's media library, see list_media; uploaded once in the cabinet, sent to as many dialogs as you like) or media_url (a direct public https link to the file itself, up to 16 MB: the platform downloads it, checks what it really is and keeps a copy, so the link may die afterwards). A link to a web page, a Google Drive preview or anything behind a login is refused with a plain reason. Same rules as send_operator_message: real people see it, it cannot be unsent, confirm the wording with the user first; delivered: "unknown" means WhatsApp did not confirm in time and the file may have gone out. For a whole list of clients, send one by one with a pause of 8-10 seconds, or ask the owner to run a broadcast.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>",
      "conversation_id": "<conversation_id>"
    },
    "name": "dosai_send_operator_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
mimeNoOptional with media_url: the file type, e.g. application/vnd.openxmlformats-officedocument.wordprocessingml.document. The bytes decide anyway.
captionNoText under the file, exactly as the client will see it.
media_idNoFile id from list_media. Give this OR media_url.
file_nameNoOptional with media_url: document name the client sees, e.g. Афиша.pdf.
media_urlNoDirect https link to the file (jpg, png, pdf, mp4...), up to 16 MB. Give this OR media_id.
project_idYesFrom dosai_list_projects.
conversation_idYesFrom dosai_list_conversations.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / conversation_id / description
      Previous value: -"Conversation id, as returned by dosai_list_conversations."New value: +"From dosai_list_conversations."
  2. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedInput schema / properties / project_id / description
      Previous value: -"Project id, as returned by dosai_list_projects."New value: +"From dosai_list_projects."
  3. Changed3 schema fields changed
    • removedInput schema / properties / conversation_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / media_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / project_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  4. Changed5 schema fields changed
    • addedInput schema / properties / file_name
      Added value: +{
      +  "description": "Optional with media_url: document name the client sees, e.g. Афиша.pdf.",
      +  "maxLength": 120,
      +  "type": "string"
      +}
    • changedInput schema / properties / media_id / description
      Previous value: -"File id from list_media."New value: +"File id from list_media. Give this OR media_url."
    • addedInput schema / properties / media_url
      Added value: +{
      +  "description": "Direct https link to the file (jpg, png, pdf, mp4...), up to 16 MB. Give this OR media_id.",
      +  "format": "uri",
      +  "maxLength": 2048,
      +  "type": "string"
      +}
    • addedInput schema / properties / mime
      Added value: +{
      +  "description": "Optional with media_url: the file type, e.g. application/vnd.openxmlformats-officedocument.wordprocessingml.document. The bytes decide anyway.",
      +  "maxLength": 100,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "project_id",
      -  "conversation_id",
      -  "media_id"
      -]New value: +[
      +  "project_id",
      +  "conversation_id"
      +]
  5. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well past the annotations (destructiveHint=true, openWorldHint=true) by stating that real people see the message, it cannot be unsent, wording must be confirmed with the user first, and delivered="unknown" means WhatsApp did not confirm in time and the file may already have gone out. It also discloses that URLs are downloaded, type-checked and copied server-side, and that the link may die afterwards.

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?

A single dense paragraph with the core action and source rule front-loaded; every clause carries information. It runs long and nests several rules in one block, so a short bulleted split of source rules versus delivery caveats would scan faster.

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 destructive, open-world send with no output schema, the definition covers side effects, source constraints, refusal cases, batching guidance and the ambiguous delivery status. Only the shape of a successful response beyond the delivered field is left implicit.

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 meaning: media_id is a reusable library file uploaded once, media_url must be a direct public https link to the file itself (not a page, Drive preview, or anything behind a login) and is capped at 16 MB. The mutual exclusivity of the two sources is stated in prose, though per-field detail on caption and file_name is left to the schema.

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?

Names a specific verb and resource ("Send a client a photo, video or document, with a caption") and implicitly contrasts with the text-only sibling via "Same rules as send_operator_message," so an agent can pick between the two without opening either schema.

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?

Explicitly states the exactly-one-of rule for media_id vs media_url, points to list_media for the library case, explains what link types are refused, and prescribes the bulk path (one-by-one with an 8-10 second pause, or ask the owner to run a broadcast). It also flags the pre-send confirmation requirement.

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