Skip to main content
Glama

Download one attachment

fetch_attachment

Download a SAM.gov attachment by its resource URL. Returns text for text documents, otherwise reports content type and byte length to avoid misinterpreting binary files.

Instructions

Downloads a single attachment by its resource URL, as returned by list_attachments. Returns UTF-8 text when the document is text, and otherwise returns the content type and byte length without guessing at the contents. Binary formats such as PDF are reported, not silently decoded into noise.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesA resource link from list_attachments
Behavior5/5

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

No annotations exist, so the description carries the full burden. It discloses exact return behavior: returns UTF-8 text for text documents, and reports content type and byte length for binary formats instead of guessing or decoding. This is unusually transparent.

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 focused sentences, front-loaded with the main action. Every sentence adds value – the first states the operation and source, the second explains output handling. No filler or redundancy.

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?

Despite no output schema, the description fully explains return behavior. The single parameter is well-defined in the schema, and the link to list_attachments provides necessary context for when this tool is used. Nothing important is missing for a simple fetch operation.

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 coverage is 100% (the 'url' parameter is described as 'A resource link from list_attachments'). The description reinforces this but adds no new semantics beyond the schema, so baseline 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?

Description clearly states 'Downloads a single attachment by its resource URL' – a specific verb, resource, and source. This distinguishes it from siblings like list_attachments, which lists attachments, and get_solicitation, which fetches a different entity.

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?

The phrase 'as returned by list_attachments' explicitly indicates the prerequisite workflow. It doesn't name when not to use alternatives, but the context is clear and there is no competing download tool among siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/juanmplazasg-lgtm/samgov-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server