Skip to main content
Glama

get

Fetch a single record by AIP resource name or entity display name, including typed details and provenance lineage, to turn recall hits into canonical memory records.

Instructions

Fetch one record by AIP resource name — entities/{uid}, episodes/{uid}, relations/{uid}, facts/{uid}, insights/{uid}, or consolidatedMemories/{uid} — plus its provenance lineage. For an entity you may also pass a bare uid or a human display name (resolved case-insensitively, the same forms relations/neighbors accept). When a name is shared across kinds, a non-document entity deterministically wins over a same-named document — the passed-over document(s) are surfaced in shadowedDocuments as entities/{uid} you can fetch directly; pass kind to target a specific kind, or a vault path / entities/{uid} to address a document. A name that is ambiguous among non-document entities (or unknown) returns a pointed error naming the candidates. The structured, LLM-free way to follow any recall hit's name field. Returns a discriminated union tagged by type. An entity record returns the canonical node (uid, kind, displayName, confidence, resolutionStatus) AND its typed properties, external identifiers, and currently-open scalar facts. A relation record carries hydrated endpoints + validity. An episode carries its source text. An insight (type=insight) returns the synthesized statement, insightType, currentConfidence, state, synthesizedAt, and its sourceUids as entities/{uid} citations. A consolidated memory (type=consolidatedMemory) returns the compressed summary, memoryType, confidence, consolidatedAt, and its sourceUids as episodes/{uid} citations. Demoted insights (state='demoted') are still fetchable — get is not the hot-recall index.

Input Schema

NameRequiredDescriptionDefault
atNoValid-time anchor (RFC 3339 UTC) for an entity record's fact rows: return each slot's value live at this instant. Defaults to now. Does not move the entity identity row; ignored for non-entity records.
asOfNoTransaction-time anchor (RFC 3339 UTC) for an entity record's fact rows: hide facts recorded after this instant. Ignored for non-entity records.
kindNoOptional entity kind hint (e.g. 'document', 'person', 'product'). When supplied alongside a display name, narrows the resolution to entities of that kind only. Useful when a name is shared between a document and a domain entity and you want the document specifically. Ignored for resource-name lookups (entities/{uid}) and bare uid lookups.
nameYesWhat to fetch: an AIP resource name whose collection prefix routes the lookup (entities/{uid}, episodes/{uid}, relations/{uid}, facts/{uid}, insights/{uid}, or consolidatedMemories/{uid}) — feed one straight from a recall hit's name field — OR, for an entity, a bare uid or a human display name (resolved case-insensitively, like relations/neighbors). A non-entity record must use its collection prefix.
scopesNoScopes to read from: project, personal, team. Defaults to project+personal. Unknown values are rejected.
includeInactiveNoInclude superseded / expired facts (the full slot history) on an entity record. Off by default. Ignored for non-entity records.

Output Schema

NameRequiredDescriptionDefault
factNoPresent when type=fact. A scalar state slot: subjectUid, stateKey, value, validity window.
typeYesWhich record kind this response carries.
factsNoPresent when type=entity: the entity's currently-open scalar facts (its attributes), newest slot value per state_key. Empty when the entity has none.
entityNoPresent when type=entity. The canonical node: uid, kind, displayName, confidence, resolutionStatus, and (when createEntity stored them) a 'properties' object of typed attributes validated against the kind's propertySchema. Its scalar facts (status, first name, preferences) arrive in the sibling 'facts' array; its external identifiers (hrb, email, …) in the sibling 'identifiers' array; its edges (who it connects to) live on relations — call relations or neighbors for those.
episodeNoPresent when type=episode.
insightNoPresent when type=insight. A synthesized reflection: statement, insightType, currentConfidence, state (hot|demoted), synthesizedAt, and sourceUids typed as entities/{uid} citations.
relationNoPresent when type=relation. Carries subject/object resource names for onward traversal, plus a 'status' trust posture: 'asserted' (authoritative) or 'proposed' (extracted from an untrusted connector source — excluded from supersession until promoted via 'maz promote' / the promoteRelation tool).
provenanceNoSource/confidence/decided-at lineage walked back to the record's origin episode(s): direct for an episode, via source_event_uid for a relation, aggregated across citing episodes for an entity. Empty when none recorded.
identifiersNoPresent when type=entity and the entity has external identifiers: the strong/weak identifiers (type + value, e.g. {type:"hrb",value:"HRB 12345 B"}) that anchor it for the resolver. Omitted when none.
shadowedDocumentsNoPresent when the name argument was resolved by display name AND one or more document entities share that name but were passed over in favour of a higher-priority non-document entity. Each entry gives the document's entities/{uid} resource name (ready to pass to get) and its bare uid. Omitted when the lookup was by resource name or uid, or when no document shares the winner's display name.
consolidatedMemoryNoPresent when type=consolidatedMemory. A compressed episode summary: summary, memoryType, confidence, consolidatedAt, and sourceUids typed as episodes/{uid} citations.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does substantial work: it discloses the resolution precedence (non-document entity beats same-named document), that passed-over documents appear in `shadowedDocuments`, that ambiguous non-document names return a pointed error naming candidates, and that demoted insights remain fetchable. It never states permission/scope requirements around the `scopes` default or side-effect freedom beyond what 'get' implies.

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 correctly, leading with the fetch action and the accepted name forms, but the back half is a long per-type enumeration of returned fields (insight statement/insightType/state, consolidated memory summary/memoryType, etc.) that duplicates what the output schema already declares. That block is padding against a tool that has an output schema and dilutes the high-value resolution rules.

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?

Given six parameters, no annotations, and an existing output schema, the description covers everything an agent needs to call it correctly: accepted name forms, resolution precedence, the ambiguity error path, scope semantics, and temporal anchors by reference to the schema. Nothing required for a correct invocation is missing.

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 baseline is 3; the description earns above that by adding resolution semantics the schema does not state — case-insensitive display-name resolution, the entity-over-document precedence rule, and the fact that `kind` is ignored for resource-name and bare-uid lookups. It leaves `at`, `asOf`, `scopes`, and `includeInactive` entirely to 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?

The first sentence gives a specific verb+resource ('Fetch one record by AIP resource name') and enumerates the exact collection prefixes the lookup accepts. It also positions itself against the sibling recall tool ('the structured, LLM-free way to follow any recall hit's name field' ... 'get is not the hot-recall index'), so an agent can pick between them 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 Guidelines4/5

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

Usage context is clear: use this to resolve a name coming out of a recall hit, and use `kind` / a vault path when a document and a domain entity share a name. It stops short of an explicit exclusion sentence (e.g. 'to search by content or filter by user, use recall/query instead') and gives no guidance on when to prefer the sibling `entities`, `relations`, or `fact` readers over this one.

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