Skip to main content
Glama

Add a document to a case

evictions_add_case_document

Use this when the person asks you to add a document to a draft case: the lease, the tenant ledger, emails or messages with the tenant, proof that they own or manage the property, or a notice already served and its proof of service. Input: the case id, filename, purpose and contentBase64 (a PDF, JPEG or PNG of about 700 KB at most through this server; a file up to 4 MB goes through POST /v1/cases/{id}/documents with the person’s key). Adds the document to the case; each call adds one more, but a repeat with the same idempotencyKey is safe (it returns the first answer). Works on a draft; after a live case is submitted, only a document with the purpose other can be added. Returns the document as stored. Do not use this when no case exists yet (use evictions_send_intake_file) or to change the case’s facts (use evictions_update_case). Next: evictions_validate_case. Needs the person’s account: sign-in or an API key.

Input Schema

NameRequiredDescriptionDefault
idYesThe case id (case_...), as returned by evictions_create_case or evictions_list_cases.
purposeYesWhat the document is: the lease, the tenant ledger, correspondence (emails or messages with the tenant), authority (proof the person owns or manages the property), prior_notice (a notice already served), prior_notice_proof (proof that notice was served), or other.
filenameYesThe file’s name, such as lease.pdf. Its type is read from the file itself, not from the name.
contentBase64YesThe file itself, base64-encoded: a PDF, JPEG or PNG of about 700 KB at most (950,000 base64 characters). A larger file, up to 4 MB, goes through the API directly.
idempotencyKeyNoSent as the Idempotency-Key header (printable ASCII, no spaces): a repeat of the same request with the same key returns the first answer instead of the document added twice. Always pass one, and reuse it if you repeat the call.

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?

Adds substantial context beyond the annotations: size ceiling (~700 KB via this server, 4 MB via the REST endpoint), draft-vs-submitted state rules (only purpose 'other' after submission), auth requirement (sign-in or API key), that each call appends rather than replaces, and that idempotencyKey makes repeats safe by returning the first answer. This is consistent with the annotations (readOnlyHint=false, idempotentHint=false), which describe side effects only in the default case.

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 triggering condition, then inputs, then behavior, then exclusions and next step. Slightly dense and repeats the size limit that the schema already encodes, but most sentences carry distinct information.

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?

No output schema exists, and the description covers the return ('the document as stored'), auth needs, file-type/size constraints, draft vs live state behavior, idempotency semantics, and routing to siblings. An agent has everything needed to call this correctly.

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 baseline is 3, but the description adds operative guidance the schema only hints at: the practical reason for the contentBase64 size cap and the instruction to 'always pass one, and reuse it if you repeat the call' for idempotencyKey. It restates the required inputs (id, filename, purpose, contentBase64) without adding much beyond the schema for those.

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 ('Add a document to a case') and immediately enumerates the concrete document types it accepts (lease, ledger, correspondence, authority, notices). It is clearly distinguishable from siblings like evictions_update_case or evictions_send_intake_file.

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?

Explicit when-to-use ('when the person asks you to add a document to a draft case'), explicit when-not ('Do not use this when no case exists yet (use evictions_send_intake_file) or to change the case's facts (use evictions_update_case)'), plus a next-step pointer to evictions_validate_case. Alternatives are named with the condition that selects them.

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.