跳到主要内容

aiToolsIsToolDisabled

Boolean aiToolsIsToolDisabled(serverType, toolName, entityId)

GET /api/2.0/ai/tools/is-tool-disabled

Is tool disabled

Tells whether one named tool of one server type is switched off in the scope. Both serverType and toolName are required and are read from the query; entityId picks the scope. The answer is a bare boolean. It reflects only the disable list - a tool that is on offer may still require approval, which GET api/2.0/ai/tools/is-allow-always reports.

Parameters​

NameInTypeDescriptionNotes
serverTypequeryStringThe MCP server type the tool belongs to.[required] [example: docspace]
toolNamequeryStringThe tool name.[required] [example: docspace_get_folder]
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
200Whether that one tool is switched off in the scope.Boolean-
400serverType or toolName 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​

Boolean

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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