Skip to content

[6693][ADD] ai_tool, ai_tool_read, ai_oca_mcp - #245

Open
nobuQuartile wants to merge 3 commits into
16.0from
16.0-add-ai_tool_read
Open

nobuQuartile wants to merge 3 commits into
16.0from
16.0-add-ai_tool_read

Conversation

@nobuQuartile

@nobuQuartile nobuQuartile commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Adds ai_tool_read, ai_oca_mcp and their common dependency ai_tool, all copied verbatim from OCA/ai.

ai_tool_read (OCA/ai#122, open) adds generic ai_tool tools that let an AI agent read any model and field the calling user can access, while keeping personal or otherwise sensitive fields out of reach:

  • list_models: lists the models the current user is allowed to read.
  • get_fields: describes a model's readable fields and reports the fields forbidden to AI under hidden.
  • search_read: searches and reads records of a model, excluding forbidden and binary fields.

A per-field flag AI Read Forbidden (ai_no_read) on ir.model.fields keeps a field out of these tools' results, together with the fields exposing its value (related, _inherits, computed). Relational values are returned as IDs. Searches are not restricted; the module README lists the cases that can still reveal a forbidden value. The tools run with the user's own access rights (no sudo), so ACLs, record rules and field groups still apply.

ai_oca_mcp (OCA/ai 16.0) exposes Odoo AI tools as an MCP (Model Context Protocol) server, so that external AI clients such as n8n or custom agents can call Odoo functions through the standard MCP protocol. Authentication uses per-client API keys. Claude Desktop requires OAuth 2.0, which this module does not support.

ai_tool (OCA/ai 16.0) is the base infrastructure for registering callable functions as AI tools, used by MCP servers, automation flows or other AI integrations.

Sources, one line per commit. When squash-merging, keep these lines in the commit message:

Vendored from OCA/ai@c1bd4f39b3ec5e6f7857b1c79394ec595efa3ced (16.0)
Vendored from OCA/ai@1e4cac32194acf4c247e311e47f22ba13cf818f1 (refs/pull/122/head)
Vendored from OCA/ai@c1bd4f39b3ec5e6f7857b1c79394ec595efa3ced (16.0)

In order: ai_tool, ai_tool_read, ai_oca_mcp. ai_tool_read comes from the head of the still-open OCA/ai#122; re-sync it from 16.0 once that PR merges.

Assisted-by: Claude Opus 5.5

QT6693

Dependency of ai_tool_read. Copied verbatim from the OCA/ai 16.0 branch.
This project aggregates only its own repos, so the module is vendored
here; the copy duplicates upstream and can be retired if OCA/ai is ever
aggregated directly.

Vendored from OCA/ai@c1bd4f3 (16.0)

Assisted-by: Claude Opus 5.5
@nobuQuartile nobuQuartile changed the title [ADD] ai_tool, ai_tool_read [ADD] ai_tool, ai_tool_read, ai_oca_mcp Oct 6, 2026
@nobuQuartile
nobuQuartile force-pushed the 16.0-add-ai_tool_read branch 5 times, most recently from a164699 to 457421c Compare October 13, 2026 01:48
Lets an AI agent read any model and field the calling user can access,
with a per-field "AI Read Forbidden" flag to keep personal or sensitive
fields out of reach. Copied verbatim from OCA/ai PR 122, which is still open,
so the source is the PR head rather than a branch: re-sync from the 16.0
branch once the PR merges.

Vendored from OCA/ai@425e42a (refs/pull/122/head)

Assisted-by: Claude Opus 5.5
Exposes the registered AI tools, such as those of ai_tool_read, as an MCP
server so that external AI clients can call them with per-client API
keys. Copied verbatim from the OCA/ai 16.0 branch. This project
aggregates only its own repos, so the module is vendored here; the copy
duplicates upstream and can be retired if OCA/ai is ever aggregated
directly.

Vendored from OCA/ai@c1bd4f3 (16.0)

Assisted-by: Claude Opus 5.5
@nobuQuartile
nobuQuartile force-pushed the 16.0-add-ai_tool_read branch from 457421c to 003b132 Compare October 13, 2026 03:19
@nobuQuartile nobuQuartile changed the title [ADD] ai_tool, ai_tool_read, ai_oca_mcp [6693][ADD] ai_tool, ai_tool_read, ai_oca_mcp Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant