Skip to main content
Glama

contacts_find

Read-onlyIdempotent

👤 Search for contacts in your address book by name or username.

When to use:

  • User asks 'find contact X' or 'who is Y?'

  • User wants to know someone's username or ID

  • Before sending a message to verify contact exists

  • To get contact's channel reference for messaging

Examples: ❓ User: 'find contact named [name]' → contacts_search(query='[name]', limit=5)

❓ User: 'who is [full name]?' → contacts_search(query='[full name]', limit=1)

❓ User: 'search for @username' → contacts_search(query='username', limit=10)

A single first name ('Dima') also finds private chats where the owner wrote that name (match_type='addressed_in_outgoing', with evidence): people are often saved under a nickname but called by name in the chat.

Returns: name, username, channel, channel_ref, similarity_score, match_type. Plus:

  • entity_id: local DB key — pass to contacts.profile. Null for live-discovered contacts (skip contacts.profile for those).

  • telegram_user_id (when channel='telegram'): the Telegram user ID — pass to calls.make / messages.send. NOT entity_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return
queryYesName or username to search for (supports partial matches)
channelNoFilter by channel. OMIT to search across all channels.
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld, non-destructive), and the description still adds real behavior: a single first name can match private chats where the owner addressed that person by name (match_type='addressed_in_outgoing', with `evidence`), and live-discovered contacts return a null entity_id. It also spells out the entity_id vs telegram_user_id routing, which no annotation conveys.

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?

Purpose is front-loaded and the When-to-use / Examples / Returns sections make it scannable, with no wasted sentences in the Returns block. It is somewhat over-long: three worked examples largely restate the preceding bullets and their only incremental information is the limit value.

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?

There is no output schema, so the description carries the full burden of the return contract, and it does: it lists the returned fields, explains entity_id's role and its null case, and distinguishes entity_id from telegram_user_id with the tools each feeds into. Nothing an agent needs to call and consume the result correctly is missing.

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, but the description earns more by explaining that `query` matches nicknames via addressed-in-outgoing chats and by showing concrete limit values (1, 5, 10) in the examples. It says nothing about the `in_workspace` parameter, which the schema documents only minimally, so it is not complete.

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 opening line gives a specific verb, resource and search key ('Search for contacts in your address book by name or username'), and the Returns block names the fields it produces, which separates it from contacts_profile and contacts_discover. The only blemish is that every worked example invokes `contacts_search`, a name that does not appear in the sibling tool list, so an agent following the examples literally would call the wrong (nonexistent) tool.

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?

It gives explicit when-to-use triggers (find contact, resolve a username/ID, verify before messaging, obtain a channel reference) and routes the follow-up read to contacts.profile. What is missing is any statement of when NOT to use it, and the example blocks undercut the guidance by pointing at a differently-named tool.

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.