diff --git a/src/consts.ts b/src/consts.ts index 11714fa..58aad19 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -18,9 +18,3 @@ export const DEFAULT_BASE_URL = 'https://api.stackone.com'; * - Higher values favor TF-IDF scoring (better semantic matching) */ export const DEFAULT_HYBRID_ALPHA = 0.2; - -/** - * Prefix used by legacy Unified API tools. - * Tools with this prefix indicate missing or incorrect account configuration. - */ -export const UNIFIED_API_PREFIX = 'unified_'; diff --git a/src/schema.ts b/src/schema.ts index bbed94f..d3d6794 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -35,7 +35,6 @@ const rpcActionResponseDataSchema = z.union([ * - `next`: Pagination cursor for fetching next page * * Additional fields from the connector response are passed through. - * @see unified-cloud-api/src/unified-api-v2/unifiedAPIv2.service.ts processActionCall */ export const rpcActionResponseSchema = z.looseObject({ next: z.nullable(z.optional(z.string())), diff --git a/src/toolsets.test.ts b/src/toolsets.test.ts index d01a141..3cf8b01 100644 --- a/src/toolsets.test.ts +++ b/src/toolsets.test.ts @@ -250,36 +250,6 @@ describe('StackOneToolSet', () => { const executableTool = (await tool?.toAISDK())?.dummy_action; expect(executableTool?.execute).toBeDefined(); }); - - it('throws error when receiving unified API tools', async () => { - const unifiedToolMcpApp = createMcpApp({ - accountTools: { - 'unified-test-account': [ - { - name: 'unified_hris_list_employees', - description: 'Unified HRIS tool', - inputSchema: { type: 'object', properties: {} }, - }, - ], - }, - }); - - server.use( - http.all('https://api.stackone-dev.com/mcp', async ({ request }) => { - return unifiedToolMcpApp.fetch(request); - }), - ); - - const toolset = new StackOneToolSet({ - baseUrl: 'https://api.stackone-dev.com', - apiKey: 'test-key', - accountId: 'unified-test-account', - }); - - await expect(toolset.fetchTools()).rejects.toThrow(ToolSetConfigError); - await expect(toolset.fetchTools()).rejects.toThrow(/unified API tool/); - await expect(toolset.fetchTools()).rejects.toThrow(/unified_hris_list_employees/); - }); }); describe('account filtering', () => { diff --git a/src/toolsets.ts b/src/toolsets.ts index 03df7a4..f14d613 100644 --- a/src/toolsets.ts +++ b/src/toolsets.ts @@ -1,6 +1,6 @@ import { defu } from 'defu'; import type { MergeExclusive, SimplifyDeep } from 'type-fest'; -import { DEFAULT_BASE_URL, UNIFIED_API_PREFIX } from './consts'; +import { DEFAULT_BASE_URL } from './consts'; import { createFeedbackTool } from './feedback'; import { type StackOneHeaders, normalizeHeaders, stackOneHeadersSchema } from './headers'; import { createMCPClient } from './mcp-client'; @@ -313,19 +313,6 @@ export class StackOneToolSet { return toolsWithFeedback; } - /** - * Validate that tool name is not from unified API - * Unified API tools indicate missing or incorrect account configuration - */ - private validateToolName(toolName: string): void { - if (toolName.startsWith(UNIFIED_API_PREFIX)) { - throw new ToolSetConfigError( - `Received unified API tool "${toolName}". This indicates the account is not properly configured. ` + - `Unified API tools require versioned connectors. Please check your account's integration setup.`, - ); - } - } - /** * Fetch tool definitions from MCP */ @@ -344,8 +331,6 @@ export class StackOneToolSet { const actionsClient = this.getActionsClient(); const tools = listToolsResult.tools.map(({ name, description, inputSchema }) => { - this.validateToolName(name); - return this.createRpcBackedTool({ actionsClient, name,