aiToolsGetCustomServer
Object aiToolsGetCustomServer(name, entityId)
GET /api/2.0/ai/tools/get-custom-server
Get custom server
Returns the stored configuration of one registered custom MCP server. The name is required and is read from the query; entityId picks the scope, and omitting it reads the portal-wide registry. A name that is not registered answers a null body with status 200 rather than 404. The configuration of a system server is returned empty on purpose: those run server-side only, so neither their endpoint nor their credentials are handed to a browser.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| name | query | String | The custom MCP server name. | [required] [example: acme-mcp] |
| entityId | query | String | The DocSpace entity the request is scoped to - the room, folder or agent workspace the chat is invoked from. Omit for the portal-wide scope. | [optional] [example: 1234] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The stored configuration, empty for a system server and null when the name is not registered. | Object | - |
| 400 | The server name is missing. | AiErrorResponse | - |
| 401 | Missing asc_auth_key cookie or Authorization header. | AiErrorResponse | - |
| 403 | AI is disabled for this portal, the caller is a guest, or the room named by entityId is one the caller cannot open. Relayed from the DocSpace AI service or the Files API. | AiErrorResponse | - |
| 500 | Unhandled failure. The reason is logged server-side and never echoed back. | AiErrorResponse | - |
Return type
Object
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json