Skip to main content
Glama

get_source_reference

Read-only

Retrieve a file's path and SHA-256 hash as a citable reference for ContextPatch evidence. Read-only; returns only the hash, never the file content.

Instructions

Get the {path, sha256} reference of one project file so it can be cited as evidence in a ContextPatch (source_document_refs). Read-only; it returns only the hash, never the content. Use read_workspace to read a file's text.

Input Schema

NameRequiredDescriptionDefault
pathYesPath of an existing file relative to the project root, for example 'docs/design.md'. At most 2 MB.
project_idYesRegistered project id, as returned by list_projects.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.3
    • addedInput schema / properties / path / description
      Added value: +"Path of an existing file relative to the project root, for example 'docs/design.md'. At most 2 MB."
    • addedInput schema / properties / project_id / description
      Added value: +"Registered project id, as returned by list_projects."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered; the description still adds real value by clarifying that only the hash is returned and never file content, which prevents an agent from using this as a read. It does not discuss failure modes (e.g. oversized or missing files), though the schema covers the 2 MB limit.

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?

Two short sentences: the first front-loads what is returned and why, the second covers the read-only/hash-only behavior and the alternative. No filler and nothing redundant with the annotations or schema.

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 simple two-parameter lookup with full schema coverage, complete annotations, and an output schema that documents the return value, the description supplies everything else an agent needs: the purpose, the hash-only behavior, and the sibling alternative.

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%, with both path and project_id documented in the schema (including the 2 MB limit and the list_projects origin of project_id). The description adds no parameter-level meaning beyond that, so the baseline of 3 is appropriate.

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?

States a specific verb and resource (get the {path, sha256} reference of one project file) and names the downstream use (citing as evidence in a ContextPatch via source_document_refs). It also explicitly distinguishes itself from read_workspace, so an agent can route between the two without opening either 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?

Gives clear when-to-use context (cite a file as evidence) plus an explicit alternative for the adjacent need: 'Use read_workspace to read a file's text.' It stops short of stating when this tool is unnecessary, e.g. that no reference is needed if the file is not being cited, so it is strong but not fully exhaustive.

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