Skip to main content
Glama

submit_file

Destructive

Preview a local file for a file-upload exercise, then submit it only after explicit approval; checks the exercise file pattern and 8 MB size limit.

Instructions

Submit a local file to a file-upload exercise. Two-phase: without confirmationToken this returns a preview with the file name, size, and due date, and does not upload. Show the preview to the user and send the token only after they explicitly approve. The file must match the exercise file pattern and be at most 8 MB.

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": {
      "exerciseId": "<exerciseId>",
      "filePath": "<filePath>"
    },
    "name": "submit_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathYes
exerciseIdYes
confirmationTokenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, non-idempotent, open-world, so the safety profile is known. The description adds real behavioral detail beyond that: the two-phase preview that performs no upload, the requirement for explicit user approval, and the server-side validation constraints (file pattern, 8 MB cap). It stops short of describing what happens after a successful upload or how validation failures surface.

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?

Four sentences, front-loaded with purpose followed by the two-phase mechanics and then the constraints. Nearly every sentence earns its place; there is minor repetition between 'does not upload' and 'send the token only after they explicitly approve.'

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, open-world mutation with no output schema and zero schema-description coverage, the definition covers the risky part well: the confirmation flow and input constraints. The remaining gap is what a successful submission returns (and how errors are reported), which matters more here because no output schema exists to explain it.

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 0%, so the description must carry parameter meaning. It explains confirmationToken thoroughly (gates the actual upload) and constrains filePath indirectly (local file, must match the exercise file pattern, max 8 MB), but exerciseId is never explained in either schema or description, leaving a required parameter undocumented.

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 and resource ('Submit a local file to a file-upload exercise') and implicitly distinguishes itself from download_file and submit_text by naming the medium (local file) and target (file-upload exercise). An agent can tell what it does 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 Guidelines4/5

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

Gives explicit operational guidance: call without confirmationToken to preview, show the preview to the user, and resend with the token only after explicit approval. It doesn't name a sibling alternative (e.g., submit_text), but the when-and-how guidance is concrete and leaves little to inference.

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