get_my_scope
Retrieve the current virtual key scope, usage limits, and accessible resources for your AI API key.
Instructions
Returns the current virtual key scope, limits, and accessible resources.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/vk/scope.ts:6-11 (handler)The handler that registers and implements the 'get_my_scope' tool. It calls `cockpit.scope()` via `safeCall` and returns the result.
export function registerVkScopeTools(server: McpServer, deps: ToolDeps): void { server.tool("get_my_scope", {}, async () => { const cockpit = requireCockpit(deps); return safeCall(() => cockpit.scope(), "vk"); }); } - src/clients/types.ts:23-30 (schema)The `ScopeResponse` type definition – the schema for what `get_my_scope` returns (workspaceId, workspaceName, keyId, keyLabel, optional departmentId/agentId).
export interface ScopeResponse { workspaceId: string; workspaceName: string; keyId: string; keyLabel: string; departmentId?: string; agentId?: string; } - src/clients/cockpit-client.ts:34-37 (helper)The `CockpitClient.scope()` method that makes the actual HTTP GET request to `/api/v1/cockpit/scope`.
async scope(): Promise<ScopeResponse> { const { data } = await this.http.get("/api/v1/cockpit/scope"); return data as ScopeResponse; } - src/tools/registry.ts:211-215 (registration)Registration wiring: in 'vk' mode, `registerVkScopeTools` is called which registers `get_my_scope`.
if (mode === "vk") { registerVkScopeTools(server, deps); registerVkBudgetTools(server, deps); return; } - src/tools/registry.ts:30-31 (registration)The tool description for 'get_my_scope' in the TOOL_DESCRIPTIONS map in the registry.
get_my_scope: "Returns the current virtual key scope, limits, and accessible resources.",