Skip to main content
Glama

Read-only SQL on an Odoo database

hodiploy_run_sql
Read-onlyIdempotent

Runs ONE read-only query (SELECT, WITH, VALUES, TABLE or EXPLAIN without ANALYZE) on an Odoo database of the instance and returns the rows as JSON (default 100, at most 1000; long values shortened). It runs as a role that reads every table and can write nothing, end no session and read no server file, with a 20-second limit. Use it to look at the data behind a problem (records, sequences, stuck states). Every query is recorded in the instance's activity log.

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": {
      "instance_id": "<instance_id>",
      "query": "<query>"
    },
    "name": "hodiploy_run_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesOne statement, no ";" inside, no backslash.
databaseNoOdoo database name. Optional when the instance has only one.
max_rowsNo
service_idNoHodiploy service id from hodiploy_list_instances. Optional when the user has a single Hodiploy service.
instance_idYesInstance id from hodiploy_list_instances.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With readOnlyHint/idempotent/destructive already declared, the description still adds substantial non-obvious behavior: the role reads every table but can write nothing, cannot end sessions or read server files, has a 20-second statement limit, truncates long values, and records every query in the activity log. These are exactly the operational constraints an agent needs before calling a SQL tool.

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?

Three front-loaded sentences: capability and limits first, then safety profile, then usage. Nearly every clause carries information, though the permission list (can write nothing, end no session, read no server file) is dense enough to scan past; minor tightening possible but nothing is 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 read-only query tool with no output schema, the description covers return shape (rows as JSON), result-size behavior (default 100, cap 1000, truncated long values), execution limits (20s), and the security posture. Nothing an agent needs to call this correctly or interpret its output is missing.

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 80%, so the schema already documents the parameters, including the single-statement and no-semicolon rule for query and the instance lookup hint. The description only reinforces the single-statement constraint and restates the row cap (default 100, max 1000), adding little meaning beyond the structured fields; 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?

The description states a specific verb and resource ('Runs ONE read-only query ... on an Odoo database of the instance'), enumerates the exact statement types accepted (SELECT, WITH, VALUES, TABLE, EXPLAIN without ANALYZE), and describes the return (rows as JSON). That precision makes it distinguishable from observability siblings like get_logs or get_metrics without reading their schemas.

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?

'Use it to look at the data behind a problem (records, sequences, stuck states)' gives a clear use context and implies the tool is for inspection rather than configuration. It stops short of stating when not to use it or naming an alternative (e.g., list_postgres_sessions for session-level issues), so it is clear guidance without exclusions.

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.

Resources