cortex_get_analyzer
Fetch comprehensive details for a given analyzer ID, including its configuration and metadata.
Instructions
Get details about a specific analyzer by ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| analyzerId | Yes | The analyzer ID |
Implementation Reference
- src/tools/analyzers.ts:75-103 (handler)The tool handler for cortex_get_analyzer – takes an analyzerId param, calls client.getAnalyzer(), and returns the analyzer details as JSON.
server.tool( "cortex_get_analyzer", "Get details about a specific analyzer by ID", { analyzerId: z.string().describe("The analyzer ID"), }, async ({ analyzerId }) => { try { const analyzer = await client.getAnalyzer(analyzerId); return { content: [ { type: "text" as const, text: JSON.stringify(analyzer, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text" as const, text: `Error getting analyzer: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }, - src/tools/analyzers.ts:78-79 (schema)Input schema for cortex_get_analyzer defines a single required 'analyzerId' string parameter.
{ analyzerId: z.string().describe("The analyzer ID"), - src/tools/analyzers.ts:75-104 (registration)Tool registration via server.tool('cortex_get_analyzer', ...) inside registerAnalyzerTools() which is called from src/index.ts line 34.
server.tool( "cortex_get_analyzer", "Get details about a specific analyzer by ID", { analyzerId: z.string().describe("The analyzer ID"), }, async ({ analyzerId }) => { try { const analyzer = await client.getAnalyzer(analyzerId); return { content: [ { type: "text" as const, text: JSON.stringify(analyzer, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text" as const, text: `Error getting analyzer: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }, ); - src/client.ts:141-142 (helper)Client helper that performs GET /api/analyzer/{analyzerId} to fetch the analyzer from Cortex API.
async getAnalyzer(analyzerId: string): Promise<Analyzer> { return this.request<Analyzer>(`/analyzer/${encodeURIComponent(analyzerId)}`); - src/types.ts:1-22 (helper)The Analyzer interface type definition returned by getAnalyzer.
export interface Analyzer { id: string; name: string; version: string; description: string; dataTypeList: string[]; cortexIds?: string[]; rate?: number; rateUnit?: string; maxTlp?: number; maxPap?: number; createdBy?: string; createdAt?: number; updatedBy?: string; updatedAt?: number; workerDefinitionId?: string; configuration?: Record<string, unknown>; baseConfig?: string; dockerImage?: string; jobCache?: number; type?: string; }