|
dolibarr 24.0.0-beta
|
AI tool for generating navigation URLs in Dolibarr. More...


Public Member Functions | |
| getDefinitions () | |
| Returns an array of tool definitions, including name, description, and input schema. | |
| getCategories () | |
| Return categories this tool belongs to. | |
| execute (string $name, array $args) | |
| Executes the requested tool function based on its name. | |
Public Member Functions inherited from McpTool | |
| __construct ($db, $user, $conf) | |
| Constructor. | |
| isSystem () | |
| Return true if this is a system/infrastructure tool that must always remain visible and executable regardless of the admin allow-list. | |
Private Member Functions | |
| mapStatusToFilter ($elementType, $statusFilter) | |
| Maps human-readable status terms to Dolibarr URL parameters for a given element type. | |
| resolvePath ($input, $view) | |
| Maps user-friendly names to specific Dolibarr paths. | |
| checkPermissions ($elementType, $view, $id=0) | |
| Check if user has permissions for the requested resource using the modern hasRight() method. | |
| checkSpecificRecordAccess ($elementType, $id) | |
| Check if user has access to a specific record. | |
| generateDescription ($type, $view, $id, $statusFilter='') | |
| Generate a human-readable description for the URL. | |
AI tool for generating navigation URLs in Dolibarr.
Definition at line 28 of file navigation.class.php.
|
private |
Check if user has permissions for the requested resource using the modern hasRight() method.
| string | $elementType | Element type |
| string | $view | View type |
| int | $id | Element ID (for specific record access) |
Definition at line 386 of file navigation.class.php.
References $id, checkSpecificRecordAccess(), and user.
Referenced by execute().
|
private |
Check if user has access to a specific record.
| string | $elementType | Element type |
| int | $id | Element ID |
Definition at line 506 of file navigation.class.php.
References $db, $id, and user.
Referenced by checkPermissions().
| ToolNavigation::execute | ( | string | $name, |
| array | $args ) |
Executes the requested tool function based on its name.
| string | $name | The name of the tool to execute. |
| array<string,mixed> | $args The arguments for the tool (key-value pairs). |
Reimplemented from McpTool.
Definition at line 94 of file navigation.class.php.
References $id, checkPermissions(), dol_buildpath(), generateDescription(), mapStatusToFilter(), resolvePath(), and user.
|
private |
Generate a human-readable description for the URL.
| string | $type | Element type |
| string | $view | View type |
| int | $id | Element ID |
| string | $statusFilter | The status filter used |
Definition at line 544 of file navigation.class.php.
References $id.
Referenced by execute().
| ToolNavigation::getCategories | ( | ) |
Return categories this tool belongs to.
Used by the intent parser to filter available tools.
Reimplemented from McpTool.
Definition at line 82 of file navigation.class.php.
| ToolNavigation::getDefinitions | ( | ) |
Returns an array of tool definitions, including name, description, and input schema.
Reimplemented from McpTool.
Definition at line 35 of file navigation.class.php.
|
private |
Maps human-readable status terms to Dolibarr URL parameters for a given element type.
This is the core logic for accurate list filtering.
| string | $elementType | The normalized element type (e.g., 'invoice_customer') |
| string | $statusFilter | The human-readable status (e.g., 'open', 'paid') |
Definition at line 194 of file navigation.class.php.
Referenced by execute().
|
private |
Maps user-friendly names to specific Dolibarr paths.
| string | $input | User input object type |
| string | $view | View type (list, card, create) |
Definition at line 268 of file navigation.class.php.
Referenced by execute().