Skip to main content
Glama
singleflo

io.github.singleflo/odoo-assistant

by singleflo

generate_pdf

Generate a PDF from an Odoo record and return the file path. Reuses existing PDFs or uses the record's print wizard.

Instructions

Render the PDF of a record and return where it was saved.

An already rendered PDF is reused. Otherwise the model's own print/send wizard produces it, and that wizard can also SEND the document — which is why this is gated on action_send_and_print (L3_STATE_CHANGE) rather than as a plain read.

Args: model: the Odoo model, e.g. "account.move". record_id: id of the record to print. dest_dir: directory to write the PDF into. Defaults to this platform's temporary directory — "/tmp" does not exist on Windows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
dest_dirNo
record_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals that already rendered PDFs are reused, that the print/send wizard can trigger document sending (a side effect), and that the tool is classified as a state change (L3_STATE_CHANGE) rather than a read. It also notes a cross-platform directory default. Missing are details about error handling or what happens if the wizard fails, but the disclosed traits are significant and useful.

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?

The description is concise (about 100 words) and well-structured. It opens with a clear one-sentence summary, then adds necessary context about reuse, permissions, and side effects, and closes with a bullet-style parameter list. Every sentence adds value, with no redundancy or 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?

Given the tool's complexity (3 parameters, potential side effect, no annotations), the description is remarkably complete. All parameters are explained, the behavioral nuance (caching, sending, permission gate) is disclosed, and the output schema exists to cover return values. The description does not leave obvious gaps for an agent to misuse the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description must wholly compensate. It does so admirably with an 'Args' section: 'model' is explained with an example ('account.move'), 'record_id' is described as the ID to print, and 'dest_dir' is given a default behavior and a cross-platform warning ('/tmp does not exist on Windows'). This adds critical meaning beyond the bare schema.

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?

The description clearly states the tool's purpose: 'Render the PDF of a record and return where it was saved.' It uses a specific verb ('render'), identifies the resource ('PDF of a record'), and the outcome ('return where it was saved'). This uniquely distinguishes it from sibling tools which are mainly CRUD operations, so there is no confusion.

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 provides context on when to use the tool: to obtain a PDF of a record, with the caution that the underlying wizard can also send the document, so it is gated on a specific permission. It implies usage for PDF retrieval but does not explicitly state when not to use it or list alternatives. However, given no sibling PDF tools, the guidance is sufficient.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/singleflo/odoo-assistant-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server