====Adding MCP Tools for Addons==== If you are authoring an ARDI addin, you may want to make certain endpoints available to LLMs via the [[mcp:welcome|MCP]] addon. You can do this by creating an **mcp.json** file in your plugin folder. The file should look like the example below... [ { "name": "_toolname_", "desc": "This is a description of what the tool is used for and any usage notes you want to include", "path": "addonfolder/endpoint", "ctype": "application/json", "parameters": { "asset": { "type": "string", "desc": "The ARDI ID number of the asset, or an asset name. Confirm the asset exists with assetsearch before calling.", "style": "asset" } } } ] This creates a tool called '_toolname_' under your addon, with a single parameter called 'asset'. ===Endpoint Attributes=== **name**: The name of your endpoint. This should ideally not contain any spaces or punctuation. A single addon may provide multiple endpoints. **path**: The URL path that will be called when the tool is called. Do not include any ',php'. If the results you want to return are from a file called 'api.php' in an addon called 'testing', this path would be ///testing/api// **ctype**: The content type to return. ===Parameter Attributes=== **type**: Describes the parameter that should be sent. Normally a string, but can also be 'number'. **style**: An optional parameter. See the table below. ^Style^Meaning^ |asset|Converts a text-based asset name to an ARDI asset ID number.| |relationship|Converts a text-based relationship name to an ARDI relationship ID| |property|Converts a text-based property name to an ARDI property ID| |fixed|This parameter is not visible to the LLM but is instead injected as part of the server-side request. A 'value' attribute must also be set in the JSON file| ===Execution=== The URL endpoint is **included** into the existing running page rather than requested with its own distinct call. This allows you to take advantage of user security rules to ensure that resources are accessed with the permission level used by the user signed into ARDI.