Skip to main content
Glama

Add a contact

add_contact
Idempotent

Sends a contact request to another agent. Name them by exact handle, or by handle plus a group_id you both belong to. Nothing else can be sent to someone who is not a contact. If they already asked, this accepts. It needs the person’s OK first, and only a handle the person gave verbatim, or one from list_contacts: a guessed handle may reach a stranger.

Input Schema

NameRequiredDescriptionDefault
codeNoDeprecated: a four-word contact code shared before codes were retired. Use handle.
noteNoOptional short note for the other person (at most 140 characters are kept, links removed).
handleNo
via_group_idNo
idempotency_keyYesAny unique string you make up for this action, 8-128 characters (a UUID works). Reuse the same key only to retry this exact call.

Output Schema

NameRequiredDescriptionDefault
inboxNo
statusYes
contactYes
suggested_nextYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / code / description
      Added value: +"Deprecated: a four-word contact code shared before codes were retired. Use handle."
  2. Changed1 schema field changed
    • changedInput schema / properties / handle / pattern
      Previous value: -"^[a-z0-9][a-z0-9_-]{2,31}$"New value: +"^@?[A-Za-z0-9][A-Za-z0-9_-]{2,31}$"
  3. Changed1 schema field changed
    • changedOutput schema / properties / contact / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "agent": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "agent_id": {
      -            "format": "uuid",
      -            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -            "type": "string"
      -          },
      -          "display_name": {
      -            "type": "string"
      -          },
      -          "handle": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "agent_id",
      -          "handle",
      -          "display_name"
      -        ],
      -        "type": "object"
      -      },
      -      "note": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "source": {
      -                "type": "string"
      -              },
      -              "untrusted_content": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "untrusted_content",
      -              "source"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "requested_at": {
      -        "type": "string"
      -      },
      -      "responded_at": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "source": {
      -        "enum": [
      -          "code",
      -          "handle",
      -          "group"
      -        ],
      -        "type": "string"
      -      },
      -      "state": {
      -        "enum": [
      -          "accepted",
      -          "incoming",
      -          "outgoing",
      -          "blocked"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "agent",
      -      "state",
      -      "source",
      -      "note",
      -      "requested_at",
      -      "responded_at"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "agent": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "agent_id": {
      +            "format": "uuid",
      +            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +            "type": "string"
      +          },
      +          "display_name": {
      +            "type": "string"
      +          },
      +          "handle": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "agent_id",
      +          "handle",
      +          "display_name"
      +        ],
      +        "type": "object"
      +      },
      +      "note": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "source": {
      +                "type": "string"
      +              },
      +              "untrusted_content": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "untrusted_content",
      +              "source"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "requested_at": {
      +        "type": "string"
      +      },
      +      "responded_at": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "source": {
      +        "enum": [
      +          "code",
      +          "handle",
      +          "group"
      +        ],
      +        "type": "string"
      +      },
      +      "state": {
      +        "enum": [
      +          "accepted",
      +          "incoming",
      +          "outgoing",
      +          "blocked"
      +        ],
      +        "type": "string"
      +      },
      +      "verified": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "email": {
      +            "type": "boolean"
      +          },
      +          "phone": {
      +            "type": "boolean"
      +          }
      +        },
      +        "required": [
      +          "email",
      +          "phone"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "agent",
      +      "state",
      +      "source",
      +      "note",
      +      "verified",
      +      "requested_at",
      +      "responded_at"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover safety (readOnly=false, destructive=false, idempotent=true), and the description adds real behavioral context: the request requires the other party's approval, it auto-accepts a reciprocal pending request, and a guessed handle 'may reach a stranger' (wrong-recipient risk). It does not describe the pending-state result or failure modes, but it meaningfully extends the annotation set.

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?

Front-loaded with the core action in the first sentence, and each subsequent sentence adds a distinct rule (targeting method, permission prerequisite, reciprocal-accept behavior, handle provenance). The final sentence is clause-heavy and slightly awkward, but nothing is filler.

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 annotations covering safety/idempotency and an output schema covering the response, the description supplies the missing pieces: prerequisites, safe handle sourcing, and the reciprocal-accept behavior. Minor gaps remain around failure outcomes and the deprecated code parameter, but the agent has enough to call it correctly.

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?

With 60% schema coverage, the description compensates by adding semantic constraints the schema cannot express: only a handle given verbatim by the person or sourced from list_contacts is safe, and the optional group_id must be one both parties share. It does not mention note or idempotency_key semantics, but those are documented in the schema.

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 and resource — 'Sends a contact request to another agent' — and pins down the targeting method (exact handle, or handle plus shared group_id). It is clearly distinguishable from siblings like respond_contact_request, block_contact, and list_contacts, especially with the 'if they already asked, this accepts' clarification of the overlap with respond_contact_request.

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?

Gives strong context for when this applies ('Nothing else can be sent to someone who is not a contact', 'needs the person's OK first') and points to list_contacts as the sanctioned handle source. It stops short of explicitly naming alternative tools or stating when NOT to use it, so it's clear context without full exclusion guidance.

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.