Commit graph

7 commits

Author SHA1 Message Date
Laurent Destailleur
0cb8120785 ci 2026-05-22 09:00:38 +02:00
Laurent Destailleur
f17f5bcdd4 ci 2026-05-22 08:41:28 +02:00
Laurent Destailleur
c2952cb4ad Fix ci 2026-05-21 22:40:04 +02:00
Laurent Destailleur
56009b9bf8 NEW Add count tool for AI 2026-05-21 19:33:50 +02:00
Laurent Destailleur
3e3ca74a67 Debug AI assistant and MCP server 2026-05-20 01:27:19 +02:00
Pichinov-Jose
8fa5e781da
Fix: ToolThirdParty inputSchema JSON Schema 2020-12 compliance (#38290)
Several tool schemas in ToolThirdParty::getDefinitions() declared
'required' => true inside individual properties. This is not valid
JSON Schema draft 2020-12, which requires 'required' to be an array
of property names at the parent object level.

Strict validators (such as Anthropic's Claude API used by Claude
Desktop Custom Connectors and Claude Code) reject these schemas with
HTTP 400 'input_schema is invalid', causing the entire MCP connection
to fail before any tool can be called.

This patch:
- Moves 'required: true' flags from individual properties to a proper
  'required: [...]' array at the parent level
- Adds the missing parent-level required array to get_thirdparty_details
  (which previously had no way to mark id as required in a compliant manner)
- Fixes 5 tools in total: get_thirdparty_details, create_thirdparty,
  update_thirdparty, list_thirdparty_contacts, add_thirdparty_contact

Tested with:
- Claude Desktop Custom Connectors (BETA): tools/list now succeeds
- Claude Code CLI: 32 MCP tools load without 400 errors
2026-05-17 21:24:23 +02:00
sonikf
faa8005eb4
NEW: MCP server and AI Assistant (#37888)
* fix list query

* Update other.lang

* remove duplicate

* initial commit

* AI Assistant initial commit

* Rename htdocs/ai/index.php to htdocs/ai/assistant/index.php

* AI Assistant initial commit

* Initial commit

* Rename htdocs/ai/ai_assistant.css to htdocs/ai/css/ai_assistant.css

* Initial commit

* Rename htdocs/ai/ai_assistant.js to htdocs/ai/js/ai_assistant.js

* Initial commit

* Rename htdocs/ai/mcp_server.php to htdocs/ai/server/mcp_server.php

* Initial commit

* category tools

* Rename htdocs/ai/categories.php to htdocs/ai/tools/categories.php

* Global tools to restrict AI

* Tools for crud actions on Dolibarr objects

* Tools for products and services.

* Tools to generate reports

* Missing PHPDoc

* Tools for thirdparties and contacts

* Tool for generating navigation URLs in Dolibarr

* Tools related to invoices and payments

* Update ai_assistant.js

* Initial commit

* Rename htdocs/ai/purge_logs.php to htdocs/ai/scripts/purge_logs.php

* fix pre commit

* re fix pre-commit

* fix pre-commit

* Rename categories.php to categories.class.php

* Rename conversation.php to conversation.class.php

* Rename crud_objects.php to crud_objects.class.php

* Rename invoices.php to invoices.class.php

* Rename navigation.php to navigation.class.php

* Rename products.php to products.class.php

* Rename reports.php to reports.class.php

* Rename thirdparty.php to thirdparty.class.php

* fix pre-commit

* Update parse_intent.php

* fix pre commit

* fix phpdoc

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* fix pre-commit

* add missing phpdoc

* fix pre-commit

* fix phpdoc

* fix phpdoc

* fix pre-commit

* fix pre-commit

* fix phpdoc

* fix pre-commit

* fix pre-commit

* fix phpdoc

* fix phpdoc

* fix phpdoc

* fix phpdoc

* fix php-stan

* fix php-stan

* fix phan

* fix phan

* fix phan

* security check

* security check

* security check

* security check

* enhance security check

* enhance security check

* fix pre-commit

* Update log_viewer.php

* Improve access control logic in log_viewer.php

Refactor access control checks for admin and module activation.

* fix phan

* fix phan

* fix phan

* fix phan

* fix phan

* try fix phan

* fix pre-commit

* fix phan

* try fix phan

* fix phan

* fix php-stan

* fix phan php-stan

* fix pre-commit

* fix phan php-stan

* fix pre-commit

* fix phan php-stan

* fix phan php-stan

* fix phn php-stan

* fix phan php-stan

* fix phan php-stan

* fix phan php-stan

* fix phan php-stan

* fix pre-commit

* fix phan php-stan

* fix php-stan

* Fix MCP tool registration for .class.php file naming

* fix typo

* fix ci

* fix pre-commit

* fix ci

* fix pre-commit

* Update categories.class.php

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* add missing user in constructor

* add missing user in constructor

* improve invoice validation error handling

* add missing user in constructor

* Rename mcp_protocol.php to mcp_protocol.class.php

* Update mcp_server.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-11 01:59:55 +02:00