Skip to main content
Glama

query_partner_memory_graph

Read-onlyIdempotent

Run the same graph query language across the caller's org and a partner org.

Use this when the user asks how their own memory relates to a linked partner
team's. Do not use it to read the partner alone; use `search_partner_memory` for
that. Do not use it when the starting point is a sentence and no pattern is
stated; use `find_partner_memory_connections` for that.

Reads the partner org and writes nothing to either side. Calls are handled
one at a time per org: a second link call issued while one is in flight comes
back with `reason: busy` without running.

Name match: `WHERE e.name CONTAINS $part` works here too, on `Entity.name`
and `Tag.name`, ignoring letter case and full-width forms, two characters for
a piece that is all ASCII and one for Hangul or Han. It runs on the rows the
walk already returned, so an empty result over a `truncated` walk means the
piece was not seen, not that it is absent. Entities the link has aliased fold
into one node under the home spelling, so the partner's own spelling of a
name is not what this compares against.

Scoped start: `entity:` or `tag:` together with `text:`, and `tag:` alone,
work here too and resolve in the caller's org only, as do name lists (any),
`entity_all:` or `tag_all:` (all) and `entity:` with `tag:` (both), with
nothing beyond that shape. `a.score`, `scoped_mode`, `filled`, `has_more`,
`unresolved`, `entities_truncated` and `budget.caps` mean what they mean on
`query_memory_graph`. `exact` measures every candidate but returns
only the top `k`, and `has_more: true` says more candidates remain in
scope. An uncovered scope adds `stage: start` to `truncated`,
and `a.score` is null on hop-reached events and sorts last, so use
`ORDER BY a.score DESC, a.id` for a stable order. 0 rows with
`filled: false` means not confirmed, not absent. `MATCH` can be left out
when the start itself is the answer, as in `START a = events(entity: $name,
text: $q, k: 20) RETURN a, a.score ORDER BY a.score DESC, a.id`; with no
walk it returns only the caller's own events. A missing arrow on a
directed relation is filled in as on `query_memory_graph`, with a line in
`notes`.

Args:
    link_id: Which link to read through, from `list_partner_links`.
    query: The graph query text, same grammar and vocabulary as
        `query_memory_graph`. `START` resolves in the caller's org only; the
        walk crosses into the partner's events through entities the link has
        aliased, which count as one entity for `PARTICIPATED_IN` and
        `SHARES`. `NEXT`, `MEMBER_OF`, `CONNECTED`, and `RESOLVED_BY` stay
        within a side.
    params: Values for `$name` references.

Returns:
    `{status, link_id, remote_org, columns, rows, row_count, start, partial,
    truncated, plan, budget, notes}`, or `{status: error, error, reason,
    detail}` where `error` repeats the reason code. A query the grammar
    rejects also carries `{blocked_by: syntax|grammar|params, hint?,
    allowed_*}`, as on the home path. Returned events carry `side`
    (`remote` = partner), and partner content opens with
    `get_partner_memory_content`. A `reason` names
    the state of the link, not a failure of the caller's own memory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe graph query text, same grammar and vocabulary as `query_memory_graph`. `START` resolves in the caller's org only; the walk crosses into the partner's events through entities the link has aliased, which count as one entity for `PARTICIPATED_IN` and `SHARES`. `NEXT`, `MEMBER_OF`, `CONNECTED`, and `RESOLVED_BY` stay within a side.
paramsNoValues for `$name` references.
link_idYesWhich link to read through, from `list_partner_links`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/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/non-destructive), and the description goes well beyond them: it discloses that reads touch the partner org and write nothing, that concurrent link calls return `reason: busy` without executing, and that name matching is case- and full-width-insensitive with an empty result over a `truncated` walk meaning 'not seen' rather than 'absent'. That is substantive behavioral context an agent cannot get from the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with purpose and usage, and the behavior/Args/Returns structure is disciplined, but the body is very long and includes material that duplicates the input schema's parameter descriptions and the existing output schema's field list (the whole Returns block). Several edge cases (Hangul/Han character counting, full-width forms) are dense without clear payoff for tool selection.

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?

For a high-complexity multi-org graph query tool, the description covers scoping rules, cross-org entity aliasing, truncation semantics, ordering guidance, and error shapes (`blocked_by`, `reason`). Combined with a 100% schema and a present output schema, an agent has everything needed to invoke it correctly.

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%, so the baseline is 3. The Args block for `link_id`, `query`, and `params` largely restates the schema text verbatim ('from `list_partner_links`', 'Values for `$name` references'), so it adds little beyond what the structured fields already provide.

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 opening sentence states a specific verb and resource with scope: 'Run the same graph query language across the caller's org and a partner org.' It immediately distinguishes itself from `search_partner_memory` (partner-only) and `find_partner_memory_connections` (sentence/starts), so an agent can route correctly without opening the 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 when-to-use ('when the user asks how their own memory relates to a linked partner team's') plus two explicit when-not-to-use clauses that name the correct alternative for each case. Nothing about selection is left to inference.

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.