|
dolibarr 24.0.0-beta
|
Class ToolThirdParty. More...


Public Member Functions | |
| __construct ($db, $user) | |
| Constructor. | |
| 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 | |
| search (array $args, int $count=0) | |
| Search for third parties based on provided criteria. | |
| getDetails (array $args) | |
| Fetch details for a specific third party (Societe). | |
| listContacts (array $args) | |
| List all contacts for a given thirdparty. | |
| addContact (array $args) | |
| Add a contact linked to a thirdparty. | |
Class ToolThirdParty.
Provides various tools related to Dolibarr categories.
Definition at line 34 of file thirdparty.class.php.
| ToolThirdParty::__construct | ( | $db, | |
| $user ) |
|
private |
Add a contact linked to a thirdparty.
| array{thirdparty_identifier:int|string,firstname:string,lastname:string,email?:string,phone?:string} | $args Arguments array (identifier, firstname, lastname required). |
Definition at line 625 of file thirdparty.class.php.
Referenced by execute().
| ToolThirdParty::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 187 of file thirdparty.class.php.
References addContact(), getDetails(), listContacts(), and search().
| ToolThirdParty::getCategories | ( | ) |
Return categories this tool belongs to.
Used by the intent parser to filter available tools.
Reimplemented from McpTool.
Definition at line 175 of file thirdparty.class.php.
| ToolThirdParty::getDefinitions | ( | ) |
Returns an array of tool definitions, including name, description, and input schema.
Reimplemented from McpTool.
Definition at line 54 of file thirdparty.class.php.
|
private |
|
private |
List all contacts for a given thirdparty.
| array{id | int|string} $args Arguments array containing the thirdparty ID. |
Definition at line 545 of file thirdparty.class.php.
References dol_syslog(), getEntity(), string, and user.
Referenced by execute().
|
private |
Search for third parties based on provided criteria.
| array{query:string|int,type?:string,country_code?:string,limit?:int|string} | $args Array of arguments:
| |
| int | $count | If set to 1, returns only the count of results. |
Definition at line 220 of file thirdparty.class.php.
References dol_syslog(), getEntity(), string, and user.
Referenced by execute().