Skip to main content
Glama
solutionsunity

OdooSurface MCP

fetch_and_upload

Load a file from a URL or local path and store it as an Odoo ir.attachment; the server handles the transfer so binary data does not enter AI context.

Instructions

💡 Before multi-step work, check find_skill / list_workflows for canonical recipes. Load a file from a URL or local absolute path and store it as an Odoo ir.attachment. The MCP server handles the transfer — no binary passes through the AI context. Pass attachment_id to replace an existing attachment in-place (same ID, no arch update needed). Omit attachment_id to create a new attachment. is_image: process the file as an image (validated and optimised; Odoo rejects other files) — false for JS/CSS/HTML/JSON/fonts. Returns {id, src} usable in any context (arch_db, chatter, record field); src is /web/image/{id} for images, /web/content/{id} for other files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
publicNo
res_idNo
sourceYes
is_imageNo
res_modelNoir.ui.view
attachment_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A4.1/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does well: it discloses that no binary passes through AI context, that in-place replacement keeps the same ID with no arch update, that Odoo rejects non-image files when is_image is set, and the exact return shape. It omits permission/auth requirements and any size or rate limits.

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-loads the skill-check tip and the core operation, then layers behavior and return details compactly. Dense but each clause earns its place; only the leading skill pointer is arguably tangential to the tool itself.

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?

With no output schema, the description supplies the return contract ({id, src} and the /web/image vs /web/content URL forms). It is complete for the transfer and replace flows, but the unexplained res_model/res_id/name/public parameters leave a gap for an agent trying to attach to a specific record.

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 coverage is 0% across 7 parameters, so the description must compensate. It explains source, attachment_id, and is_image well, but says nothing about name, public, res_id, or res_model (default ir.ui.view) — the parameters that govern how the attachment is linked, which is the operationally tricky half.

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?

Names a precise verb+resource pair ('Load a file from a URL or local absolute path and store it as an Odoo ir.attachment') and adds the distinguishing detail that the MCP server handles the transfer, which separates it from upload_binary/download_binary siblings. An agent can tell what it does without opening the schema.

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 conditional guidance: pass attachment_id to replace in-place, omit it to create new, and set is_image true for images vs false for JS/CSS/HTML/JSON/fonts. It also routes to find_skill/list_workflows for canonical recipes, though it never explicitly contrasts against the upload_binary/download_binary siblings.

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