Skip to main content
Glama

recordSourceRef

Records where a subject record came from by appending an external-source provenance reference with a source type and idempotency key. Returns the new SourceRef name; does not fetch or verify sources.

Instructions

Record where a memory came from: append an external-source provenance reference (SourceRef, W3C PROV wasDerivedFrom) for a subject record. Give the subject's uid, a sourceType (open taxonomy), and a dedupKey for idempotency; optionally a connector, stream, externalId, externalUrl, and contentHash. Returns the new SourceRef's resource name. Provenance is self-asserted and UNVERIFIED. Does not fetch the source.

Input Schema

NameRequiredDescriptionDefault
scopeNoScope to record into. Defaults to personal.
streamNoSub-channel within the connector, e.g. a mailbox label or channel id. Optional.
dedupKeyYesIdempotency key. Recording the same external item twice (same dedupKey) collapses to one SourceRef. Required.
connectorNoConnector that produced the reference, e.g. gmail, slack. Optional.
fetchTimeNoWhen the source content was fetched (RFC 3339 UTC). Defaults to now.
externalIdNoSource-system opaque identifier for the item, e.g. a message id. Optional.
sourceTypeYesKind of external source, drawn from an open taxonomy: email, slack_message, notion_page, web_page, etc. Required.
subjectUidYesULID of the record this source was derived from (PROV wasDerivedFrom): an entity, episode, or fact uid. Required.
contentHashNoSHA-256 hex of the fetched content. Optional; supplied by the caller (fetch is out of scope).
externalUrlNoDereferenceable location of the source item. Optional.

Output Schema

NameRequiredDescriptionDefault
nameYesAIP resource name of the recorded SourceRef; pass to getSourceRef.
statusYesAlways "recorded" on success.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the append-style mutation, idempotency via dedupKey, that provenance is self-asserted and UNVERIFIED, that fetching is out of scope, and that it returns the new SourceRef resource name. It does not mention permissions or error behavior, keeping 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.

Conciseness5/5

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

The description is compact and front-loaded: it states the core action, required fields, return value, verification caveat, and non-fetching boundary in three dense sentences with no filler.

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?

Given the existing output schema and 100% schema coverage, the description is complete enough on behavior and return semantics. The main gap is explicit sibling routing, which matters in a crowded tool list but is not fatal here.

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 schema already documents all ten parameters. The description reinforces required inputs and adds some framing around dedupKey idempotency and sourceType taxonomy, but much of that is already present in the schema and it omits scope and fetchTime entirely.

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 description states a specific verb and resource: append an external-source provenance reference (SourceRef, W3C PROV wasDerivedFrom) for a subject record. It also distinguishes this from source-ingestion behavior by explicitly saying it does not fetch the source, which helps separate it from fetch/capture siblings.

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?

Usage is implied by 'Record where a memory came from' and the required inputs, and the exclusion 'Does not fetch the source' gives one boundary. However, it does not explicitly name when to use this instead of captureExternal, ingestSource, connectSource, or getSourceRef.

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