Skip to main content
Glama

Messaging: Find chat by user

messaging_find_chat_by_user
Read-onlyIdempotent

Find the existing one-to-one chat for a known LinkedIn, WhatsApp, Instagram, Facebook or Telegram provider user ID. Use after resolving the user; user_id is not chat_id.

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": {
      "user_id": "<user_id>"
    },
    "name": "messaging_find_chat_by_user"
  }
}

Input Schema

NameRequiredDescriptionDefault
user_idYesExact provider user ID returned by a profile/contact resolver; never a name or profile URL.
account_idNoOptional Nilyo connection ID (unipile_account_id from list_connected_accounts). Omit when the user has one account for this provider. When several exist, Nilyo never guesses: list them (display name, identifier, provider user ID), choose the one the user named or ask, and pass its ID here.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. The word 'existing' usefully implies the tool looks up rather than creates a chat, but the description does not say what happens when no chat exists (error vs. empty result) or what the response contains.

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 with zero filler: the scoping constraint comes first, the sequencing/disambiguation second. Nothing is repeated from the schema or annotations.

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 two-parameter, annotation-rich lookup with full schema descriptions, the definition covers purpose, prerequisite and identifier caveat. The only gap is the no-result behavior, which matters slightly more here since there is no output schema to describe returns.

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% and the account_id ambiguity is fully documented in the schema itself, so the baseline is 3. The description adds one piece of meaning not in the schema — that user_id is not a chat_id — clarifying the most common identifier mix-up.

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 ('Find') and a precise resource ('the existing one-to-one chat') scoped to a provider user ID, and enumerates the supported providers. It is clearly distinguishable from list-chat siblings like messaging_list_chats because of the one-to-one, per-user targeting.

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?

'Use after resolving the user' gives an explicit prerequisite ordering, and 'user_id is not chat_id' pre-empts the most likely misuse. It stops short of naming the concrete alternatives (e.g. messaging_resolve_recipient or message_resolve_chat) or saying when not to use it.

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.