Skip to main content
Glama

upload_library_document

Upload an existing file (PDF, Word/Excel/PowerPoint, an existing markdown/text/CSV file, or an image) into a project, proposal, or organization (tenant-level) document library from base64 content. Provide libraryId (create one first via create_library if needed), fileName incl. extension, mimeType, and contentBase64. Max 25 MB decoded. The bytes are magic-byte verified against the claimed mimeType (spoofed or disallowed types are rejected) and a WorkspaceDocument row is created exactly like a human upload. Use draft_document instead when you want to author markdown directly from a string. Requires project.content.create on the parent project (Viewers are read-only); for proposal libraries, a governance reviewer or the proposal submitter; for organization libraries, org.library.contribute (MEMBER+ by default).

Input Schema

NameRequiredDescriptionDefault
nameNoOptional display name for the document. Defaults to fileName.
fileNameYesOriginal file name incl. extension, e.g. "spec.pdf".
mimeTypeYesMIME type, e.g. "application/pdf", "image/png", "text/markdown".
libraryIdYesThe document library to upload into.
contentBase64YesBase64-encoded file bytes. Max 25 MB decoded.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the safety profile (readOnly=false, destructive=false, idempotent=false). The description adds substantial behavioral context beyond that: the 25 MB decoded limit, magic-byte verification against the claimed mimeType with rejection of spoofed types, and the fact that a WorkspaceDocument row is created exactly like a human upload.

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?

Dense and front-loaded: purpose, then required inputs, then behavioral constraints, then the alternative and permissions. Every clause earns its place, though the long parenthetical permission sentence is heavy and slightly harder to parse.

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 write tool with no output schema, the description covers everything an agent needs: supported formats, size limit, verification behavior, permission requirements per library scope, prerequisite tool, and the sibling alternative. Nothing material is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description goes slightly beyond the schema by indicating where libraryId comes from (create_library) and restating the byte limit and extension requirement for fileName, but most parameter meaning is already in 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?

States a specific verb (upload) and resource (document into a project/proposal/org library), enumerates the accepted file types, and explicitly distinguishes itself from draft_document. An agent can identify this tool and its scope without opening the schema.

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?

Names the alternative ('Use draft_document instead when you want to author markdown directly from a string') and the prerequisite ('create one first via create_library if needed'). It also spells out which permission is needed per library type, so the agent knows when the call will succeed.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.