Skip to main content
Glama

create_document_attachments

Upload multiple local files as document attachments in a single request, with validation for duplicates and size limits. Specify project, space, document, and file paths.

Instructions

Upload 1-10 local files as document attachments in one request.

file_path is read from local disk by the server process -- use absolute paths to readable files. file_name (default: file_path's basename) becomes the attachment id; reference it in a document body as attachment:{id} for update_document. Total upload size per call is capped at 25 MiB: compress or use the Polarion portal for one oversized file, split oversized batches across calls. Pure create -- nothing is replaced. Uploads cannot be deleted through this API, so verify file_path and file_name first. A file_name colliding with another item in the same call, or with an existing attachment on the document, rejects the whole batch -- check list_document_attachments first or pick a new file_name. NOT idempotent -- retrying a success is rejected as a duplicate, not silently merged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoPreview payload without calling Polarion.
space_idYesSpace ID ('_default' = default space).
project_idYesPolarion project ID.
attachmentsYesFiles to upload in one request.
document_nameYesDocument name within space_id.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
createdYes
dry_runYes
attachment_idsYes
payload_previewYes
Behavior5/5

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

Annotations provide readOnlyHint=false, destructiveHint=false, idempotentHint=false. Description adds critical behaviors: total upload cap 25 MiB, not idempotent, batch rejected on collision, cannot delete uploads. This enriches annotations without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

Description is thorough but slightly verbose. However, each sentence adds value, and it is well-structured with primary function first, then constraints and warnings. Very efficient for the complexity.

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?

Completely covers all aspects: usage, limitations, parameter semantics, error conditions, performance tips. Without the output schema, it still fully informs an agent how to invoke and use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds substantial meaning: file_path read from local disk, file_name becomes attachment id usable in update_document, dry_run previews. Explains collision and idempotency implications for parameters.

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 clearly states it uploads 1-10 local files as document attachments in one request. It specifies the resource (document attachments) and action (upload/create), and the detail about file_name becoming the attachment id distinguishes it from other tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Extensive usage guidelines: when to use (upload attachments), when to avoid (cannot delete, check collisions, idempotency). Explicitly states 'Pure create -- nothing is replaced.' Advises checking list_document_attachments first and splitting oversized batches. Provides clear exclusions and alternatives.

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/devemberx/mcp-server-polarion'

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