Skip to main content
Version: v5.1

MCP Tools

The MCP Tool API lets you create, list, update, retrieve, and delete MCP tools that wrap Item Service scripts.

Note: The nsfilter query parameter is mandatory for every request. It sets the caller’s namespace context (used for scoping user tools). System mcp tools may still appear in results regardless of nsfilter.

List MCP Tools#

Endpoint#

GET /aisvc/api/v1/mcp-tools

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace context for the request.Required
_offsetIntegerNumber of results to skip (must be a non-negative integer).Optional
_pageSizeIntegerPage size (must be a non-negative integer).Optional
filterStringMCP tool filter identifier (UUID) or filter userType; when provided, other query filters are ignored.Optional
_nameStringExact Mcp tool name filter.Optional
_typeStringMcp Tool type filter (for example, user_mcp_tool or system_mcp_tool).Optional
_toolConfig._serviceNameStringFilter by tool config service name such as IafFileSvc, IafItemSvc, IafPassSvc etc.Only Applicable to system_mcp_tool.Optional
_script._userTypeStringFilter by Item Service script userType.Optional
_script._scriptNameStringFilter by Item Service script name.Optional
queryStringWildcard search over name and description.Optional

Response codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response example#

{  "_offset": 0,  "_pageSize": 1,  "_total": 1,  "_list": [    {      "_id": "d8a53325-dbb5-4a2d-a655-ef5fa74591d3",      "_irn": "aisvc:mcp-tool:d8a53325-dbb5-4a2d-a655-ef5fa74591d3",      "_name": "AssetLookupMcpTool",      "_description": "Searches assets by free-text query so agents can quickly find matches.",      "_namespaces": ["building_1234"],      "_type": "user_mcp_tool",      "_toolConfig": null,      "_schema": {        "type": "object",        "properties": {          "query": {            "type": "string",            "description": "Free-text string used to match asset names, tags, or metadata."          },          "maxResults": {            "type": "number",            "description": "Optional maximum number of assets to return."          }        },        "required": ["query"]      },      "_script": {        "_userType": "asset_scripts",        "_scriptName": "assetLookup"      },      "_metadata": {        "_createdAt": 1757178319536,        "_updatedAt": 1757178319536,        "_createdById": "70699091-77de-4ee3-8a3f-034ec8746a3b",        "_updatedById": "70699091-77de-4ee3-8a3f-034ec8746a3b"      }    }  ]}

Create MCP Tools#

Endpoint#

POST /aisvc/api/v1/mcp-tools

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace context for the callRequired

Body parameters#

The request body must be an array of MCP tool objects.

ParameterTypeDescriptionRequired
_namespacesArrayMust contain at least one namespace and must be within the nsfilter context.Required
_nameStringMust match ^[a-zA-Z0-9_-]{1,64}$ (no spaces; max 64 chars). Value must be unique.Required
_descriptionStringMcp Tool description.Optional
_schemaObjectJSON schema for tool input; must be an object schema with type: "object".Required
_scriptObjectObject that identifies the Item Service script with script _userType and _scriptName.Required
_toolConfigObject | nullOptional tool configuration object; omit to keep default behavior; send null for none.Optional

Note:_type cannot be set by clients; created MCP tools are always user_mcp_tool.

Response codes#

CodeDescription
201Created
400Bad Request
404Not Found

Request example#

[  {    "_name": "AssetLookupMcpTool",    "_description": "Provides a namespace-scoped asset search tool based on free-text input.",    "_namespaces": ["building_1234"],    "_schema": {      "type": "object",      "properties": {        "query": {          "type": "string",          "description": "Free-text string used to filter assets by name, tag, or metadata value."        },        "maxResults": {          "type": "number",          "description": "Optional maximum number of records returned by the tool."        }      },      "required": ["query"]    },    "_script": {      "_userType": "asset_scripts",      "_scriptName": "assetLookup"    }  }]

Response example#

{  "_offset": 0,  "_pageSize": 1,  "_total": 1,  "_list": [    {      "_id": "d8a53325-dbb5-4a2d-a655-ef5fa74591d3",      "_irn": "aisvc:mcp-tool:d8a53325-dbb5-4a2d-a655-ef5fa74591d3",      "_name": "AssetLookupMcpTool",      "_description": "Searches assets by free-text query so agents can quickly find matches.",      "_namespaces": ["building_1234"],      "_type": "user_mcp_tool",      "_toolConfig": null,      "_schema": {        "type": "object",        "properties": {          "query": {            "type": "string",            "description": "Free-text string used to match asset names, tags, or metadata."          },          "maxResults": {            "type": "number",            "description": "Optional maximum number of assets to return."          }        },        "required": ["query"]      },      "_script": {        "_userType": "asset_scripts",        "_scriptName": "assetLookup"      },      "_metadata": {        "_createdAt": 1757178319536,        "_updatedAt": 1757178319536,        "_createdById": "70699091-77de-4ee3-8a3f-034ec8746a3b",        "_updatedById": "70699091-77de-4ee3-8a3f-034ec8746a3b"      }    }  ]}

Get MCP Tool by ID#

Endpoint#

GET /aisvc/api/v1/mcp-tools/{id}

Path parameters#

ParameterTypeDescriptionRequired
idUUIDMCP tool identifier.Required

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace context for the callRequired

Response codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response example#

{  "_id": "d8a53325-dbb5-4a2d-a655-ef5fa74591d3",  "_irn": "aisvc:mcp-tool:d8a53325-dbb5-4a2d-a655-ef5fa74591d3",  "_name": "AssetLookupMcpTool",  "_description": "Searches assets by free-text query so agents can quickly find matches.",  "_namespaces": ["building_1234"],  "_type": "user_mcp_tool",  "_toolConfig": null,  "_schema": {    "type": "object",    "properties": {      "query": {        "type": "string",        "description": "Free-text string used to match asset names, tags, or metadata."      },      "maxResults": {        "type": "number",        "description": "Optional maximum number of assets to return."      }    },    "required": ["query"]  },  "_script": {    "_userType": "asset_scripts",    "_scriptName": "assetLookup"  },  "_metadata": {    "_createdAt": 1757178319536,    "_createdById": "70699091-77de-4ee3-8a3f-034ec8746a3b",    "_updatedAt": 1757178319536,    "_updatedById": "70699091-77de-4ee3-8a3f-034ec8746a3b"  }}

Update MCP Tool#

Endpoint#

PUT /aisvc/api/v1/mcp-tools/{id}

Path parameters#

ParameterTypeDescriptionRequired
idUUIDMCP tool identifier.Required

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace context for the callRequired

Body parameters#

ParameterTypeDescriptionRequired
_namespacesArray of stringsRequired by validation; must be within nsfilter context; ignored on update (existing namespaces are preserved).Required
_nameStringMust match ^[a-zA-Z0-9_-]{1,64}$. Value must be unique.Required
_descriptionStringTool description.Optional
_schemaObjectJSON schema for tool input; must be an object schema with type: "object".Required
_scriptObjectObject that identifies the Item Service script with script _userType and _scriptName.Required
_toolConfigObject | nullOptional; omit to keep existing; send null to clear.Optional

Note: Only user_mcp_tool resources can be updated; system tools are rejected with 403.

Response codes#

CodeDescription
200Success
400Bad Request
404Not Found

Request example#

{  "_name": "AssetLookupMcpTool_Updated",  "_description": "Returns assets that match a free-text query with optional result limits.",  "_namespaces": ["building_1234"],  "_schema": {    "type": "object",    "properties": {      "query": {        "type": "string",        "description": "Free-text string used to search asset names, tags, or metadata."      },      "maxResults": {        "type": "number",        "description": "Optional maximum number of assets returned in a single response."      }    },    "required": ["query"]  },  "_script": {    "_userType": "asset_scripts",    "_scriptName": "assetLookup"  }}

Response example#

{  "_id": "d8a53325-dbb5-4a2d-a655-ef5fa74591d3",  "_irn": "aisvc:mcp-tool:d8a53325-dbb5-4a2d-a655-ef5fa74591d3",  "_name": "AssetLookupMcpTool_Updated",  "_description": "Returns assets that match a free-text query with optional result limits.",  "_namespaces": ["building_1234"],  "_type": "user_mcp_tool",  "_toolConfig": null,  "_schema": {    "type": "object",    "properties": {      "query": {        "type": "string",        "description": "Free-text string used to search asset names, tags, or metadata."      },      "maxResults": {        "type": "number",        "description": "Optional maximum number of assets returned in a single response."      }    },    "required": ["query"]  },  "_script": {    "_userType": "asset_scripts",    "_scriptName": "assetLookup"  },  "_metadata": {    "_createdAt": 1757178319536,    "_updatedAt": 1757681000123,    "_createdById": "70699091-77de-4ee3-8a3f-034ec8746a3b",    "_updatedById": "70699091-77de-4ee3-8a3f-034ec8746a3b"  }}

Delete MCP Tool#

Endpoint#

DELETE /aisvc/api/v1/mcp-tools/{id}

Path parameters#

ParameterTypeDescriptionRequired
idUUIDMCP tool identifier.Required

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace context for the callRequired

Note: System MCP tools cannot be deleted; the API returns 403.

Response#

Codes#

CodeDescription
204No Content
400Bad Request
404Not Found

Response body#

// empty response body