Skip to main content
Glama

Postlyra.app — Telegram posts from AI chats

Verify an uploaded file

finalize_media_upload
Idempotent

Use after uploading bytes to the URL from create_media_upload. Verifies file content, size and ownership and returns a durable mediaId for attach_media. Expired or invalid uploads are rejected.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "uploadIntentId": "<uploadIntentId>"
    },
    "name": "finalize_media_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
uploadIntentIdYesUpload intent id returned by create_media_upload, after its PUT upload has completed.

Output Schema

NameRequiredDescriptionDefault
dataYes
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / uploadIntentId / description
      Added value: +"Upload intent id returned by create_media_upload, after its PUT upload has completed."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare idempotent=true, destructive=false, and readOnly=false, so the agent knows the mutation's safety profile. The description adds useful behavioral context by stating that file content, size, and ownership are verified and that expired or invalid uploads are rejected.

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 with the prerequisite front-loaded, followed by verification behavior and rejection semantics. Every sentence adds useful information without repetition.

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?

The tool is simple, has full parameter documentation, an output schema, and annotations covering safety and idempotency. The description supplies the critical workflow context an agent needs to call it correctly.

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?

The single parameter has 100% schema description coverage, including that it is the upload intent id returned by create_media_upload after PUT completion. The description adds sequencing context but no additional parameter syntax or constraints 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?

States a specific verification action for an uploaded file, and clearly positions it between create_media_upload and attach_media. An agent can distinguish it from the upload-creation and attachment siblings 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?

Explicitly states the prerequisite: use after uploading bytes to the URL from create_media_upload. It also names the downstream consumer, attach_media, and notes that expired or invalid uploads are rejected, giving clear sequencing guidance.

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.