Skip to main content
Glama

dm_chat_create

Idempotent

Find or create a chat for a participant on a DM-capable profile (idempotent — returns the existing chat if one already exists). Use before sending a message to a participant the profile has not yet messaged. On WhatsApp, placement_id (the phone number id from profiles_placements) is required and participant_external_id is the recipient's phone number in international format (digits only, no +); a new WhatsApp conversation must open with an approved template via dm_message_send.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profile_idYesProfile hashid
placement_idNoPlacement id from profiles_placements. Required on WhatsApp (the phone number the chat belongs to); optional on Facebook (the page id). Ignored elsewhere.
participant_nameNoOptional display name for the participant
participant_usernameNoOptional display username for the participant
participant_external_idYesPlatform participant ID (Instagram-scoped user ID, Facebook PSID, Telegram user id, Bluesky DID, or WhatsApp phone number with country code — non-digits are stripped)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare idempotentHint, readOnlyHint=false, destructiveHint=false, and openWorldHint, so safety is covered. The description adds real behavioral context beyond them: WhatsApp requires placement_id and a template-opened conversation, and the call returns the existing chat rather than erroring. That is meaningful added disclosure.

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?

Two sentences, front-loaded with the find-or-create purpose before usage and platform caveats. It is somewhat dense and packs multiple platform rules into the second sentence, but every clause carries actionable information.

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 mutation tool with no output schema, the description covers return behavior (returns existing chat if present), the pre-send usage flow, and WhatsApp prerequisites. Missing only an explicit pointer to the sibling read tool, which would make it fully self-sufficient.

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, and the description earns an upgrade by adding platform-conditional meaning: placement_id is required on WhatsApp (phone number id from profiles_placements) and participant_external_id must be digits-only international format there. It adds format and conditional-requirement context the schema alone doesn't fully convey.

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 ('Find or create a chat') and scopes it ('for a participant on a DM-capable profile'), which separates it from siblings like dm_chat_get or dm_chats_list without opening a schema. The idempotent qualifier sharpens the contract.

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 gives the triggering situation: 'Use before sending a message to a participant the profile has not yet messaged,' and routes WhatsApp users to dm_message_send for required templates. It does not name the read alternative (dm_chat_get) or state when not to use it, so it stops short of full when/when-not coverage.

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.