Skip to main content
Glama

send_attachment

Send files, images, videos, or audio to a Signal contact. Supports multiple attachments in one message with optional caption and view-once media.

Instructions

Send one or more files or images to a Signal contact. Supports photos, videos, documents, and audio files. Use path for a single file or paths to send multiple files in one message. Set view_once=true to send media that auto-deletes after the recipient views it once. For groups use send_group_attachment instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recipientYesPhone number in E.164 format
pathNoSingle file path (absolute, relative, or ~/path)
pathsNoMultiple file paths to send as one message
captionNoOptional caption text shown below the attachment
view_onceNoSend as view-once media — recipient can only view it once before it disappears

Implementation Reference

  • Tool schema registration for 'send_attachment' in the TOOLS list — defines name, description, and input schema.
    Tool(
        name="send_attachment",
        description=(
            "Send one or more files or images to a Signal contact. "
            "Supports photos, videos, documents, and audio files. "
            "Use path for a single file or paths to send multiple files in one message. "
            "Set view_once=true to send media that auto-deletes after the recipient views it once. "
            "For groups use send_group_attachment instead."
        ),
        inputSchema={
            "type": "object",
            "properties": {
                "recipient": {"type": "string", "description": "Phone number in E.164 format"},
                "path": {"type": "string", "description": "Single file path (absolute, relative, or ~/path)"},
                "paths": {"type": "array", "items": {"type": "string"}, "description": "Multiple file paths to send as one message"},
                "caption": {"type": "string", "description": "Optional caption text shown below the attachment", "default": ""},
                "view_once": {"type": "boolean", "description": "Send as view-once media — recipient can only view it once before it disappears", "default": False},
            },
            "required": ["recipient"],
        },
  • Input schema for send_attachment — accepts recipient (required), path/paths (one required), caption, view_once.
    inputSchema={
        "type": "object",
        "properties": {
            "recipient": {"type": "string", "description": "Phone number in E.164 format"},
            "path": {"type": "string", "description": "Single file path (absolute, relative, or ~/path)"},
            "paths": {"type": "array", "items": {"type": "string"}, "description": "Multiple file paths to send as one message"},
            "caption": {"type": "string", "description": "Optional caption text shown below the attachment", "default": ""},
            "view_once": {"type": "boolean", "description": "Send as view-once media — recipient can only view it once before it disappears", "default": False},
        },
        "required": ["recipient"],
    },
  • Core handler for send_attachment in SignalClient — validates E.164, resolves file paths, sends via signal-cli JSON-RPC 'send' method with attachment param, and saves message locally.
    async def send_attachment(
        self,
        recipient: str,
        path: str | list[str],
        caption: str = "",
        view_once: bool = False,
    ) -> SendResult:
        _validate_e164(recipient)
        await self._rate_limiter.acquire()
        paths = [path] if isinstance(path, str) else path
        resolved = [str(Path(p).expanduser().resolve()) for p in paths]
        params: dict = {"recipient": [recipient], "attachment": resolved}
        if caption:
            params["message"] = caption
        if view_once:
            params["viewOnce"] = True
        result = await self._rpc("send", params)
        ts = result.get("timestamp", int(time.time() * 1000))
        await asyncio.to_thread(_store.save_message, Message(
            id=f"sent_{ts}_{recipient}",
            sender=self.account,
            recipient=recipient,
            body=caption,
            timestamp=datetime.fromtimestamp(ts / 1000),
        ))
        return SendResult(timestamp=ts, recipient=recipient, success=True)
  • MCP tool dispatch handler for send_attachment — extracts arguments, delegates to client.send_attachment(), returns result.
    elif name == "send_attachment":
        path_arg = arguments.get("paths") or arguments.get("path")
        if not path_arg:
            return _err("Either path or paths is required")
        result = await client.send_attachment(
            arguments["recipient"],
            path_arg,
            caption=arguments.get("caption", ""),
            view_once=arguments.get("view_once", False),
        )
        return _ok({"status": "sent", "timestamp": result.timestamp})
  • Required parameter validation registration — send_attachment requires 'recipient'.
    _REQUIRED: dict[str, list[str]] = {
        "send_message":         ["recipient", "message"],
        "send_group_message":   ["group_id", "message"],
        "send_note_to_self":    ["message"],
        "send_attachment":      ["recipient"],
        "send_group_attachment":["group_id"],
Behavior3/5

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

With no annotations, the description partially compensates by disclosing view_once behavior and mentioning multi-file support. However, it lacks details on size limits, permissions, or idempotency, leaving some behavioral gaps.

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?

Four sentences, all essential. Front-loaded with the main action, then details. No redundant or wasted words.

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?

For a sending tool without an output schema, the description covers purpose, parameters, usage, and key behavior. It is complete given the tool's complexity and the available structured fields.

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?

The description adds meaning beyond the input schema by explaining the difference between path and paths, and the auto-delete behavior of view_once. Since schema coverage is 100%, this extra context earns a 4.

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 clearly states it sends files/images to a Signal contact, lists supported media types, and distinguishes from send_group_attachment. It uses specific verbs and resources.

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

Usage Guidelines4/5

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

Explicitly states that for groups, use send_group_attachment instead. Provides clear context on when to use this tool versus a sibling, though no exclusion criteria or prerequisites are mentioned.

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

Install Server

Other Tools

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/googlarz/signal-mcp'

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