Skip to main content
Glama
WhatsApp MCP Server

WhatsApp MCP Server

get_media_path

Resolve a WhatsApp media attachment's absolute file path by media ID or message ID, and verify its existence, file size, and MIME type before access.

Instructions

Resolve the absolute filesystem path for a media attachment by media ID or message ID. Checks disk existence, file size, and MIME type.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_media_path"
  }
}

Input Schema

NameRequiredDescriptionDefault
media_idNoInternal CoreData media primary key (Z_PK from ZWAMEDIAITEM).
message_idNoInternal CoreData message primary key (Z_PK from ZWAMESSAGE).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses that the tool verifies disk existence, file size, and MIME type, which is genuinely useful, but it never states what happens when the file is absent or the ID is invalid (error vs. null path), nor confirms the operation is read-only and safe to repeat. For a tool with zero annotation coverage, those gaps matter.

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?

Two short sentences, front-loaded with the core action and followed by the verification behavior. No filler, no redundant restatement of the tool name.

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

Completeness3/5

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

With no output schema and no annotations, the description must describe both behavior and return values itself. It hints at return content (path, existence, size, MIME type) but does not specify the result shape or the failure case, which is a real gap for a resolution tool whose whole purpose is producing a path.

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 coverage is 100%, so the schema already documents both parameters in detail (including the CoreData Z_PK origin). The description adds one useful nuance by presenting the two IDs as alternative resolution routes, hinting at the at-least-one requirement the schema does not state. Beyond that it adds nothing the schema lacks, so the baseline 3 applies.

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 states a specific verb and resource: 'Resolve the absolute filesystem path for a media attachment by media ID or message ID.' That clearly separates it from siblings like list_media or get_chat, which deal with media inventories and chats rather than path resolution. It stops short of naming a sibling to contrast with, so it lands at 4 rather than 5.

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

Usage Guidelines3/5

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

The two lookup modes ('by media ID or message ID') imply when the tool applies, but there is no explicit statement of when to prefer this over list_media or how to obtain a media ID in the first place. No exclusions or prerequisites (e.g., attachment must exist locally) are given, leaving usage to inference.

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