Skip to main content
Glama
ShadowGraph

ShadowGraph

Official

shadowgraph_expand

Expands a record handle and revision digest from context into the full current record and rival records, so you can verify revisions and inspect structural alternatives.

Instructions

Expand a recordId and revision digest handle from shadowgraph_context into the full current record and rival records. shadowgraph_context supplies the handle; shadowgraph_search or shadowgraph_retrieve. Own-scope read saves nothing; audit. Copy expansion fields into this tool's input at top level: recordId, digest and scope; stale digest yields revision_changed; purged yields purged; missing or out-of-scope yields unavailable.

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": {
      "recordId": "<recordId>",
      "digest": "<digest>"
    },
    "name": "shadowgraph_expand"
  }
}

Input Schema

NameRequiredDescriptionDefault
asOfNoThe line's expansion.asOf, when it has one.
digestYesThe line's expansion.digest: the revision the line was derived from.
grantIdNoAlias for accessId; conflicting identifiers are refused.
projectNoProject or confirmed workspace binding; otherwise origin-only. No identity returns an empty scoped view.
accessIdNoGrant ID, rechecked at use. Widens reads only, never write authority. Presenting it commits a revision and bounded audit (at most one aggregate per grant, surface, outcome and UTC day). Conflicts with grantId are refused.
originIdNoCapture-origin ID for unattributed records when project is omitted.
recordIdYesThe line's expansion.recordId.
derivedAtNoThe line's expansion.derivedAt. A logical purge of the read's own project recorded after it answers purged.
maxExpansionsNoHow many structural counterparts to fetch in full, 0-50. Defaults to 5; the rest are marked uninvestigated, with their lines.
derivationVersionNoThe line's expansion.derivationVersion.

Output Schema

NameRequiredDescriptionDefault
recordYesThe current full record, or null. Never a summary and never the old revision.
statusYescurrent: the line came from this revision. revision_changed: the record changed since, and this is the current record. purged: the first purge of the read's own project after the line was logical. unavailable: no record with this id is served in the scope.
recordIdYesThe record the line named.
completenessYesRequest coverage and any withheld detail.
boundRevisionYesThe revision the line was derived from.
investigationYesCounterparts investigated within the budget; null when no record is served.
readProvenanceNoOriginal read bounds; reuse intersects these with currently valid authority.
currentRevisionYesThe live revision; null when no record is served.
revisionChangedYesWhether the record changed after the line was derived; null when no record is served.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.43.6
    • changedInput schema / properties / accessId / description
      Previous value: -"Grant ID, rechecked at use. Widens reads only, never write authority. Presenting an access key commits a revision and bounded operational audit: at most one aggregate per grant, surface, outcome and UTC day. Conflicts with a different grantId are refused."New value: +"Grant ID, rechecked at use. Widens reads only, never write authority. Presenting it commits a revision and bounded audit (at most one aggregate per grant, surface, outcome and UTC day). Conflicts with grantId are refused."
    • changedInput schema / properties / originId / description
      Previous value: -"Capture-origin id; with no project the record belongs to it alone."New value: +"Capture-origin ID for unattributed records when project is omitted."
  2. Changed2 schema fields changedv0.42.4
    • changedOutput schema / properties / completeness / properties / capture / properties / gaps / items / properties / reason / enum
      Previous value: -[
      -  "maxQueueDepth",
      -  "maxStoreBytes",
      -  "maxItemsPerSession",
      -  "session_in_another_project",
      -  "raw_expired",
      -  "transcript_unrecognised",
      -  "session_left_project",
      -  "transcript_rewritten",
      -  "transcript_reanchored",
      -  "transcript_incomplete_at_end",
      -  "transcript_line_oversized",
      -  "tool_calls_not_captured"
      -]New value: +[
      +  "maxQueueDepth",
      +  "maxStoreBytes",
      +  "maxItemsPerSession",
      +  "session_in_another_project",
      +  "raw_expired",
      +  "prior_setup",
      +  "transcript_unrecognised",
      +  "session_left_project",
      +  "transcript_rewritten",
      +  "transcript_reanchored",
      +  "transcript_incomplete_at_end",
      +  "transcript_line_oversized",
      +  "tool_calls_not_captured"
      +]
    • addedOutput schema / properties / completeness / properties / capture / properties / priorSetup
      Added value: +{
      +  "description": "Unextracted items of no or an earlier setup; never extracted by the current one.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
  3. Changed2 schema fields changedv0.42.2
    • addedInput schema / description
      Added value: +"Input recipe: copy the line.expansion fields, omit null optional values, and put its scope.project, scope.originId and scope.grantId at top level. Do not pass the operation name or nest a scope object. Keep the digest and original read bounds; no handle field grants wider authority."
    • changedInput schema / properties / accessId / description
      Previous value: -"Grant ID, rechecked at use."New value: +"Grant ID, rechecked at use. Widens reads only, never write authority. Presenting an access key commits a revision and bounded operational audit: at most one aggregate per grant, surface, outcome and UTC day. Conflicts with a different grantId are refused."
  4. Addedv0.42.1

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations, the description discloses concrete outcome states — stale digest yields revision_changed, purged yields purged, missing or out-of-scope yields unavailable — and the authority constraint that no handle field grants wider authority. That is meaningful behavioral context. It does not explain the write/audit side effect implied by readOnlyHint=false beyond the terse 'Own-scope read saves nothing; audit', so it is strong but not complete.

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 the core action and short overall, but it is written in compressed sentence fragments and semicolon chains, and lines like 'Own-scope read saves nothing; audit.' cost space without conveying a clear instruction. Dense, but not cleanly structured.

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 10-parameter tool with an output schema, the description covers the essential call recipe, the source of the handle, authority limits, and the main failure outcomes. Return-value detail is rightly left to the output schema. What is thin is the rationale for the write/audit behavior flagged by the annotations.

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 parameters are already fully documented, and the baseline is 3. The description does add the flat-copy recipe (put recordId, digest and scope at top level) and echoes 'keep the digest and original read bounds', but that recipe is largely restated from the schema's own input description.

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 description names a specific verb and resource: it expands a recordId plus revision digest handle (obtained from shadowgraph_context) into the full current record and its rival records. That is clearly distinguishable from search/retrieve siblings. The telegraphic fragments ('shadowgraph_search or shadowgraph_retrieve.') blur the boundary a little, but the core action is unambiguous.

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

Usage Guidelines3/5

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

It tells the agent where the handle comes from (shadowgraph_context supplies it) and gestures at alternatives (shadowgraph_search or shadowgraph_retrieve), which implies those are for other needs. However, the fragments never state when to prefer expansion over those siblings, and 'Own-scope read saves nothing; audit' is too compressed to act as real guidance about when this tool is worthwhile.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.