Skip to main content
Glama
AdvaMCP for Odoo

AdvaMCP for Odoo

attachment

attachment

List, download, upload, or print files and PDF reports for Odoo records; uploads stay as drafts until the user approves the returned link.

Instructions

Files of records. action=list: a record's files (model, id) or files by name (query). action=download: a file by its id. action=report: a record's report as PDF; when the record has several, the first call lists them. Both return a temporary download_url: fetch it with any HTTP client (curl, wget, fetch). action=upload: attach a file to a record: short text in text; any file by the temporary upload_url you get back (PUT or multipart POST, e.g. curl -T file URL). Every change is a draft: it is saved when the user opens the returned link in Odoo and approves it. Give them the link.

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": {
      "action": "<action>"
    },
    "name": "attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNodownload: the file's id. report and upload: the record's id.
nameNoupload: file name with extension.
textNoupload of a small text file: its content. Without it, you get an upload_url to send the file to.
draftNoupload: true returns a link where the user approves it; false attaches now.
limitNolist: how many files.
modelNoreport and upload: the record's model, e.g. "sale.order".
queryNolist: words in the file name.
actionYeslist files, download one, print a report, or upload a file.
reasonNoupload with draft=false: why it is right without approval.
reportNoreport: which one, when the record has several.

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?

Beyond the annotations it discloses the important traits: download/report return a temporary download_url that must be fetched with an external HTTP client, and upload returns a temporary upload_url accepting PUT or multipart POST. It also states the draft/approval lifecycle, that every change is saved only when the user opens the returned link and approves, which is exactly the kind of context annotations cannot carry. Minor gap: no mention of size limits or error behavior.

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 resource ('Files of records') and then organized action-by-action, so an agent can jump to its case. It is dense and slightly telegraphic, and the closing 'Give them the link' is terse enough to be ambiguous, but no sentence is pure filler.

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 ten-parameter, four-action tool with no output schema, the description covers the return artifacts (download_url, upload_url, listed reports) and the approval workflow. An agent has everything needed to pick an action, supply the right fields, and finish the round trip.

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 the schema baseline already documents all ten parameters and a 3 would be acceptable. The description still adds cross-parameter meaning the schema cannot express: which parameters belong to which action, and the draft/reason relationship implied by 'false attaches now'. That is real added value over per-field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Each action is given a concrete verb and resource: list returns 'a record's files' or files by name, download returns 'a file by its id', report returns 'a record's report as PDF', upload attaches a file. The scope is unmistakable. It does not contrast itself with siblings like odoo_browse or chatter, so it falls short of a 5.

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?

The description maps each action to the parameters that select it (model+id vs query, id for download, text/upload_url for upload) and gives sequencing guidance for multi-report records ('the first call lists them'). There is no explicit statement of when not to use it or which sibling to prefer for related file tasks.

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