Skip to main content
Glama

LeadShark Apex: LinkedIn MCP

get_messages_with_person

Read-onlyIdempotent

Apex only. Return the DM conversation with one specific person so you have the context before replying. Find them like a human would: person can be just a NAME ("Jane Doe"), a provider id ("ACo…"), or a LinkedIn slug — names are matched against your inbox and your leads, and if several people match you get a short list to choose from. Each message includes the text, who sent it (from_me), and the timestamp, returned oldest → newest. PAGINATED for history mining: each response includes next_cursor — pass it back as cursor (with the same person) to read further back than the most recent messages, through the full thread history (null = exhausted). Read-only.

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": {
      "person": "<person>"
    },
    "name": "get_messages_with_person"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMessages per page (1-100, default 30).
act_asNoAPEX+ or admin act_as (optional): operate this tool AS one of your managed profiles — pass that profile's LeadShark account email (see list_profiles). Requires an active delegation from the profile owner plus an APEX+ plan or admin act_as enabled by LeadShark (which runs on the profile's own plan); anything else is refused with a reason, never silently redirected. The action runs under the managed profile's own budgets, approval queue, and action log. With a Team key, act_as is required on every call and must be one of the key's accounts (list_profiles); the call must also be within the permission groups the key has on that account, or it's refused with permission_missing. Hourly/daily limits are that profile's own.
cursorNoPagination cursor from a previous response’s next_cursor — returns the next (older) page of the same thread.
personYesWho to look up: a name ("Jane Doe"), a provider id ("ACo…"), or a LinkedIn slug.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds real behavioral context: 'Apex only' plan gating, fuzzy name matching against both inbox and leads, a disambiguation short-list when multiple people match, guaranteed oldest→newest ordering, and exhaustion signalled by null. Nothing here contradicts the annotations and 'Read-only' restates them harmlessly.

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-loads the core purpose, then matching, then result shape, then pagination — a sensible order for an agent. It is dense and slightly repetitive (the person formats are re-listed after the schema already states them), but every clause carries operational information.

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?

With no output schema, the description carries the return contract itself: per-message text, from_me, timestamp, ordering, and the next_cursor envelope with its null terminator. Combined with a fully documented input schema and annotations covering safety, an agent has everything needed to call and iterate 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?

Schema coverage is 100%, so the schema already documents person/cursor/limit/act_as. The description still adds meaning the schema lacks: how names are matched, that a multi-match yields a short list to choose from, and that cursor must be replayed with the same person. limit and act_as get no extra treatment, which is acceptable given the schema text.

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?

States a specific verb and resource: 'Return the DM conversation with one specific person', and immediately scopes it to pre-reply context gathering. The 'one specific person' framing implicitly separates it from the bulk-list sibling (list_recent_messages), but no alternative is ever named, so an agent must infer the boundary rather than read it.

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 a clear use case ('so you have the context before replying') plus an operational regime ('PAGINATED for history mining' with explicit cursor round-trip instructions). It never states when to avoid this tool or which sibling to use instead when a per-person thread is not what's needed.

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