Skip to main content
Glama

Analyze Document

analyze_document
Read-only

Analyse un justificatif (facture, avis de taxe foncière, attestation d'assurance, tableau d'amortissement, relevé bancaire) et retourne une proposition de saisie structurée, SANS RIEN CRÉER. Trois modes d'entrée mutuellement exclusifs : file_base64, file_path (nécessite MCP_FILE_PATH_PREFIX), file_url. Formats acceptés : PDF, JPEG, PNG, WebP (10 Mo max). Enchaînez ensuite vous-même avec create_expense / create_furniture / create_property_work / attach_document après avoir fait valider les valeurs par l'utilisateur : elles proviennent d'un modèle de langage et peuvent être erronées. Chaque appel consomme le quota d'analyse mensuel du compte. Tous les montants sont en euros.

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": {
      "property_id": "<property_id>"
    },
    "name": "analyze_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_urlNoURL http/https du fichier à télécharger par le serveur. Mutuellement exclusif avec file_base64 et file_path.
filenameNoNom du fichier avec extension (ex: facture.pdf). Déduit de file_path ou file_url si absent.
file_pathNoChemin absolu du fichier sur le serveur (nécessite MCP_FILE_PATH_PREFIX configuré). Mutuellement exclusif avec file_base64 et file_url.
file_base64NoContenu du fichier encodé en base64 (PDF, JPG, PNG, WebP — max 10 Mo). Mutuellement exclusif avec file_path et file_url.
property_idYesIdentifiant du bien concerné par le justificatif
document_typeNoForce le type de document au lieu de le laisser détecter : expense_invoice, furniture_invoice, works_invoice, property_tax_notice, insurance, loan_schedule, bank_statement, income_statement, liasse_2033, unknown

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint annotation: it warns that extraction comes from a language model and may be wrong, requires user validation before any downstream write, and discloses that each call consumes the account's monthly analysis quota — a cost/rate-limit fact an agent must know. It also states the accepted formats, the 10 MB ceiling, the MCP_FILE_PATH_PREFIX prerequisite for file_path, and that all amounts are in euros.

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 purpose and the 'no creation' guarantee, then the input modes, limits, and next steps in a logical order. It is dense but every sentence carries operational weight; the only mild redundancy is restating mode exclusivity that the schema already declares.

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 read-only extraction tool with no output schema, the definition covers everything an agent needs: what it returns (a structured draft entry, not a persisted record), the confidence caveat and required human validation, the mandatory downstream chaining, cost implications, and input constraints. Nothing material is left for the agent to infer.

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 100%, so the schema already documents the three mutually exclusive file inputs, filename inference, property_id, and the document_type value list. The description reinforces the mode exclusivity and adds the env-var prerequisite, but adds no new semantics for individual parameters beyond what the schema states; baseline 3 applies.

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 ('Analyse un justificatif … et retourne une proposition de saisie structurée'), enumerates the concrete document types handled (facture, avis de taxe foncière, attestation d'assurance, tableau d'amortissement, relevé bancaire), and explicitly negates creation ('SANS RIEN CRÉER'), which separates it from the create_* siblings in the same family.

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 clear workflow guidance: it names the four follow-up tools (create_expense / create_furniture / create_property_work / attach_document) and the condition for proceeding, namely that the user has validated the values. It also declares the three input modes mutually exclusive. It stops short of stating any exclusion case (e.g., what to do if the document is already structured, or when not to analyze), so it is strong context rather than a full when/when-not rule set.

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.