Skip to main content
Glama

AI Source of Truth Evidence Rooms

Upload an item

upload_item

Upload one file (base64, up to 8388608 bytes) with its SHA-256 and your signature (Ed25519 or ES256, matching your key) over the upload statement "rooms-upload-v1\n<case_id>\n\n\n<media_type>\n<file_name>\n", made with a key registered at POST /api/signing-keys. Scope: cases:write. REST twin: POST /api/cases/:id/uploads. Errors: unauthorized, insufficient_scope, not_found, forbidden, consent_required, read_only, validation_error, payload_too_large, digest_mismatch, signature_invalid, conflict, payment_required.

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": {
      "case_id": "<case_id>",
      "file_name": "<file_name>",
      "media_type": "<media_type>",
      "base64": "<base64>",
      "sha256": "<sha256>",
      "key_id": "<key_id>",
      "signature": "<signature>"
    },
    "name": "upload_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoap2-mandate, x402-receipt, x401-credential and agent-signature are agent payment items: Rooms checks what it can at intake and logs the result (item.checked).
amendsNoThe ver_ id this amends (the latest version).
base64YesThe file bytes, base64.
key_idYesYour signing key id (its JWK thumbprint).
reasonNoWhy, for an amendment.
sha256YesSHA-256 of the bytes, lowercase hex.
case_idYesThe case id (cas_...).
file_nameYes
folder_idNo
signatureYesEd25519 or ES256 (matching the key) over the upload statement, base64url.
media_typeYes
captured_atNoISO-8601 UTC.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare that this is a non-read-only, closed-world write. The description goes well beyond them: size ceiling, signature algorithm must match the key, the exact signed statement, and a full error taxonomy including digest_mismatch, signature_invalid, read_only, consent_required, and payment_required — all behavior an agent must anticipate.

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?

Front-loaded with the operation and its limits, then scope, REST twin, and errors in compact order. The error enumeration is long but each token carries routing value; little is wasted.

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 12-parameter mutation with no output schema, the description covers limits, auth, signature construction, and failure modes thoroughly. It omits what a successful call returns (item/ver_ id, whether the version is created), which an agent would want to chain follow-up calls.

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 75%, and the description meaningfully supplements it by spelling out the canonical upload statement, which pins the ordering and semantics of case_id, sha256, size, media_type, file_name, and amends (empty when not amending). It does not explain folder_id, captured_at, or reason, which remain schema-only.

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 ('Upload one file') plus the essential constraints (base64, 8 MiB cap, required SHA-256 and signature). It is clearly distinguishable from read-side siblings like get_item and list_items.

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 the prerequisites an agent needs before calling: scope cases:write and a key registered at POST /api/signing-keys. It does not name an alternative path or say when not to use it (e.g. amending vs creating), so it stops short of full routing 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.

Resources