agentleFS
dimastrianndimastriann/odoo-erp-mcp/.agents/skills/mcp-tool-extension/SKILL.md

mcp-tool-extension

Skill3 starsChanged 9 days agoMITView on GitHub

Use when adding, changing, or removing an MCP tool in this repository. Covers catalog schemas, argument validation, executor dispatch, typed results, capability policy, query limits, tests, and documentation.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 6 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add the name to ToolName::ALL, as_str, TryFrom<&str>, and capability.

    line 15
  2. Very specific:

    Add the JSON inputSchema in tool_definitions with descriptions, defaults, required fields, and bounded arrays/strings.

    line 18
  3. Very specific:

    Add a typed argument struct in src/tools/arguments.rs following the existing naming and serde conventions.

    line 23
  4. Very specific:

    Keep pagination limit/offset bounded by configured QueryLimits.

    line 29
  5. Very specific:

    Add the dispatch arm in src/tools/executor.rs::execute_tool.

    line 33
  6. Very specific:

    Use the OdooClient; never call Odoo directly from the MCP layer.

    line 34
  7. Distinctive:

    Default-deny must remain intact.

    line 46
  8. Distinctive:

    Never log, serialize, or return credentials or raw Odoo payload secrets.

    line 47
  9. Distinctive:

    Add focused tests that do not require a live Odoo server:

    line 51
  10. Very specific:

    Use src/test_support.rs and the existing mocked responses.

    line 61
  11. Distinctive:

    Update the tool list and examples in README.md when behavior changes.

    line 65
  12. Very specific:

    Update ROADMAP.md only when the item is defined there.

    line 66
  13. Distinctive:

    Check version references only if the tool changes the advertised server capability or version.

    line 67
  14. Distinctive:

    Run the full quality gate from AGENTS.md before committing.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MCP Tool Extension

AGENTS.md is the canonical rule set. Follow this checklist for every tool change.

1. Define the contract

  • Choose a stable odoo-* name and the matching ToolName variant in src/tools/catalog.rs.
  • Add the name to ToolName::ALL, as_str, TryFrom<&str>, and capability.
  • Decide requires_model and requires_client.
  • Add the JSON inputSchema in tool_definitions with descriptions, defaults, required fields, and bounded arrays/strings.

2. Validate before RPC

  • Add a typed argument struct in src/tools/arguments.rs following the existing naming and serde conventions.
  • Reject missing, malformed, unknown, and oversized input before any Odoo call.
  • Reuse validate_domain_security, validate_field_names, validate_field_count, validate_order, resolve_limit, and validate_read_id_count where applicable.
  • Keep pagination limit/offset bounded by configured QueryLimits.

3. Implement execution

  • Add the dispatch arm in src/tools/executor.rs::execute_tool.
  • Use the OdooClient; never call Odoo directly from the MCP layer.
  • Return ToolExecutionResult and map errors through AppError; do not string-match Odoo errors.
  • For reads, use the pagination helpers and response-size protection.
  • For mutations, do not add a second lifecycle path: route through Operation/OperationExecutor and follow the mutation-lifecycle skill.

4. Policy and safety

  • Map the tool to the narrowest Capability in catalog.rs.
  • Confirm instance, model, operation, field, and method policy scopes still apply.
  • Default-deny must remain intact; never add an allow rule to make a test pass.
  • Never log, serialize, or return credentials or raw Odoo payload secrets.

5. Tests

Add focused tests that do not require a live Odoo server:

  • Schema: the tool definition exists, required fields are enforced, bounds are correct, and the ToolName round-trip works.
  • Arguments: missing, malformed, unknown, and oversized input is rejected.
  • Policy: allow and deny paths, including operation and model overrides.
  • Executor: mock-server success, Odoo error mapping, pagination, and limits.
  • Result: success and failure shapes; approval-required is not a transport error.

Use src/test_support.rs and the existing mocked responses.

6. Documentation and review

  • Update the tool list and examples in README.md when behavior changes.
  • Update ROADMAP.md only when the item is defined there.
  • Check version references only if the tool changes the advertised server capability or version.
  • Run the full quality gate from AGENTS.md before committing.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.