Skip to main content
Glama
odoo19-mcp-server

odoo19-mcp-server

by twtrubiks

Prepare Upload

prepare_upload

Generate an endpoint and short-lived upload token so client-side files can be posted directly to a remote Odoo MCP server, avoiding the LLM token stream.

Instructions

Prepare an out-of-band upload of a CLIENT-side file to this server.

Use this when the file to attach lives on the client machine and this MCP server is remote: pushing the bytes over plain HTTP keeps them out of the LLM token stream (much faster and cheaper than base64_data for large files).

Workflow:

  1. Call this tool to get the endpoint info and a short-lived upload_token.

  2. POST the file (multipart field 'file') to /upload, where is the same scheme://host:port this MCP connection uses: curl -fsS -F "file=@/local/invoice.png"
    -H "Authorization: Bearer <upload_token>" /upload -> {"file_path": "/shared/uploads/.png", "file_name": "invoice.png"}

  3. Call add_attachment(file_path=..., file_name=..., res_model=..., res_id=...).

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.9/5.0
Behavior5/5

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

No annotations, so the description carries the full burden and does: it discloses that a short-lived upload_token is issued, that the upload endpoint is <origin>/upload via multipart field 'file', that auth is a Bearer header, and even the response shape ({file_path, file_name}). This is exactly the behavioral context needed for a credential-issuing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded purpose sentence followed by a numbered workflow. The curl example and one-line JSON response are dense, useful payload rather than padding; every sentence earns its place.

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 zero-param, token-issuing tool with a sibling chain, the description supplies endpoint construction, auth, request format, expected response, and the next tool to call. Nothing an agent needs to execute the workflow is missing.

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?

Zero parameters, so the baseline is 4. The description adds the semantics of what the tool yields (endpoint info + token) and how to consume it, which schema alone cannot express.

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?

Specific verb+resource ('Prepare an out-of-band upload of a CLIENT-side file to this server') with the scope narrowed to client-side files on a remote server. It clearly distinguishes itself from add_attachment, which it routes to as the follow-up step.

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 file to attach lives on the client machine and this MCP server is remote') and names the avoided alternative (base64_data in the token stream) with the reason. No inference required.

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