跳到主要内容

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​

NameInTypeDescriptionNotes
namequeryStringThe custom MCP server name.[required] [example: acme-mcp]
entityIdqueryStringThe 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 codeDescriptionTypeResponse headers
200The stored configuration, empty for a system server and null when the name is not registered.Object-
400The server name is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI 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-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

Object

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json