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 or Telegram provider user ID. Use after resolving the user; user_id is not chat_id.

Input Schema

TableJSON 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
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds the behavioral nuance that user_id is distinct from chat_id, which is valuable context for correct invocation. It does not describe return format or absence behavior, but the annotations carry the heavy lifting.

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?

The description is two sentences with zero waste. The primary purpose is front-loaded, followed by a usage hint and a key clarification. Every word earns its place.

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 read-only lookup with 2 parameters and no output schema, the description is adequately complete. It gives the intended use, the input prerequisite, and a critical distinction. It does not mention what happens when no chat is found, but given the openWorldHint and the simplicity of the operation, this is a minor gap.

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 description coverage is 100% and both parameters are well documented in the schema, so the description adds minimal value. The only addition is the explicit clarification that user_id is not chat_id, which is a useful but minor supplement to the schema's already-detailed description of user_id.

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 states a specific verb ('Find') with a clear resource ('existing one-to-one chat') and scope ('for a known provider user ID'). It also differentiates from related tools by focusing on finding an existing chat rather than listing or creating one, and explicitly warns 'user_id is not chat_id' to avoid confusion.

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?

The description provides clear context: 'Use after resolving the user' sets a prerequisite, and the warning about user_id vs chat_id helps avoid a common mistake. It implies when to use this tool (after user resolution) but does not explicitly name alternatives or exclusions, though the context is sufficient for an agent to infer its role among siblings.

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.