Skip to main content
Glama

Prepare Attachment Download

prepare_attachment_download
Read-onlyIdempotent

Generate a verified one-time download URL for an Allure TestOps attachment from its ID and kind. Obtain a short-lived HTTP link after retrieving attachment details, before it expires.

Instructions

Prepare one verified attachment download, then HTTP GET its returned Lucius URL.

Call this after get_test_result or get_test_case_details provides an attachment ID, kind, and owner context. The returned download URL is one-time and short-lived: HTTP GET it before expires_at without an Allure bearer token. Prepare again if the URL expires or was already retrieved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoOptional override for the default Project ID.
test_case_idNoRequired owner ID for test_case attachments.
attachment_idYesAttachment ID discovered from a readable result or test case.
output_formatNoOutput format: 'json' (default) or 'plain'.
test_result_idNoRequired owner ID for test_result or fixture_result attachments.
attachment_kindYesVerified attachment kind: test_result, fixture_result, or test_case.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesSanitized attachment filename.
expires_atYesUTC expiry timestamp for the one-time download URL.
content_typeYesAttachment MIME type.
download_urlYesOpaque Lucius URL to HTTP GET before expires_at; no Allure bearer token is needed.
test_case_idNoOwner context for test-case attachments.
attachment_idYesVerified attachment identifier.
content_lengthYesPrepared attachment byte length.
test_result_idNoOwner context for result or fixture attachments.
attachment_kindYesVerified attachment owner kind.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv0.15.0

TDQS

A4.5/5.0
Behavior5/5

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

The annotations already mark this as read-only and idempotent, so the description adds valuable non-obvious behavior: the returned URL is one-time and short-lived, must be GET before expires_at without an Allure bearer token, and preparation should be repeated if the URL expires or was already retrieved. This is exactly the kind of behavioral context an agent needs.

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?

Three compact sentences carry the full workflow: the action, the prerequisite call sites, and the URL expiry/recovery behavior. Every sentence contributes essential information with no 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?

Given the complete schema, the presence of an output schema, and annotations that establish safety, the description covers everything else needed for correct invocation: prerequisite context, one-time URL handling, auth requirements, and failure recovery. No important call-time behavior is missing.

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 fully documents each parameter. The description adds mild context by mentioning 'attachment ID, kind, and owner context,' but it does not materially enrich the parameter semantics beyond 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 description opens with a specific verb and resource: 'Prepare one verified attachment download, then HTTP GET its returned Lucius URL.' It clearly identifies the tool's two-step purpose and differentiates it from upload-focused siblings like add_test_result_attachment and retrieval tools like get_test_result.

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 description explicitly states when to call this tool: 'Call this after get_test_result or get_test_case_details provides an attachment ID, kind, and owner context.' It also advises when to re-invoke the tool after expiry or prior retrieval. It does not name alternatives or exclusions, so it falls just short of a 5.

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

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/ivanostanin/lucius-mcp'

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