Skip to main content
Glama

Postkey: Instagram DM Automation and Comment-to-DM

Get one contact

postkey_get_contact
Read-onlyIdempotent

Postkey: Gets one contact in full: name, handle, email when known, tags, custom fields, whether they are subscribed, the automations they went through, their conversation_id, and whether an assistant may message them now (can_message_now, reply_window_closes_at: only inside 24 hours of their last message). Use it after postkey_search_contacts; read the messages with postkey_get_conversation. An unknown id is refused not_found.

Input Schema

NameRequiredDescriptionDefault
contact_idYesThe contact id from postkey_search_contacts, or contact_id in a conversation, as it was given.

Output Schema

NameRequiredDescriptionDefault
okYesfalse: refused (isError; code, message, guide_topic, url); no change.
contactNoThe search fields plus first_seen, last_wrote, messages_from_them, messages_to_them, can_message_now, reply_window_closes_at, messaging_note, fields, automations, conversation_id.
untrusted_noteNoPresent when outside text is wrapped as { untrusted: true, text }.
tags_that_existNoThe profile's tags.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / ok / description
      Previous value: -"false: refused (isError true; code, message, guide_topic, url), nothing changed."New value: +"false: refused (isError; code, message, guide_topic, url); no change."
  2. Changed2 schema fields changed
    • changedInput schema / properties / contact_id / description
      Previous value: -"The contact id from postkey_search_contacts or a conversation."New value: +"The contact id from postkey_search_contacts, or contact_id in a conversation, as it was given."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "contact": {
      +      "description": "The search fields plus first_seen, last_wrote, messages_from_them, messages_to_them, can_message_now, reply_window_closes_at, messaging_note, fields, automations, conversation_id.",
      +      "type": "object"
      +    },
      +    "ok": {
      +      "description": "false: refused (isError true; code, message, guide_topic, url), nothing changed.",
      +      "type": "boolean"
      +    },
      +    "tags_that_exist": {
      +      "description": "The profile's tags.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "untrusted_note": {
      +      "description": "Present when outside text is wrapped as { untrusted: true, text }.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / contact_id / pattern
      Previous value: -"^[0-9a-fA-F]{24}$"New value: +"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|^[0-9a-fA-F]{24}$"
  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 the safety profile (readOnly, idempotent, openWorld, non-destructive), so the description earns credit for the extra behavior it discloses: an unknown id is refused with not_found, and can_message_now / reply_window_closes_at are only valid within 24 hours of the contact's last message. That windowing rule is genuinely non-obvious and useful. It stops short of describing freshness or caching behavior, which keeps it below a 5.

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 purpose, then constraints, then alternatives in a compact flow. The long field enumeration is partly redundant with the existing output schema, which costs it a point, but no sentence is padding.

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 one-parameter read tool with full schema coverage, rich annotations, and an output schema, this covers prerequisites, error handling, and follow-up adequately. The only shortfall is minor redundancy restating return fields the output schema already defines.

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 the single contact_id parameter is fully specified with its UUID/ObjectId pattern and origin, so the schema carries the load. The description adds only the failure mode for a bad id, not new meaning about the parameter itself; baseline 3 applies.

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?

"Gets one contact in full" pairs a specific verb with a specific resource and immediately enumerates the payload (name, handle, email, tags, custom fields, subscription state, automations, conversation_id, messaging windows). It is unambiguously distinct from postkey_search_contacts and postkey_get_conversation, so an agent can pick it without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing is given: use after postkey_search_contacts, and use postkey_get_conversation to read messages. The when-not case is implicit but strongly signposted by naming the sibling that handles the adjacent task.

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.

Resources