Files
OmniRoute/open-sse/mcp-server/schemas/toolDefinition.ts
Diego Rodrigues de Sa e Souza 7c23dab64d Release v3.8.40
v3.8.40 cycle integration → main. All test gates green (Unit/Integration/Coverage/Node-compat/Quality-Ratchet). The only red check, 'PR Test Policy', is the test-masking heuristic firing on the cumulative ~57-commit release diff (legitimate assert consolidations already reviewed per-PR — Gemini CLI removal #5246, retired GPT models #5280, provider catalog refreshes); overridden with --admin per the documented release-PR convention. CodeQL/SonarQube advisory scans non-blocking; #5278's code already passed CodeQL on main. Homologated on VPS 192.168.0.15 (v3.8.40 healthy).
2026-06-29 08:40:06 -03:00

32 lines
1.1 KiB
TypeScript

/**
* Leaf module for the shared MCP tool-definition types.
*
* Extracted out of `tools.ts` to break a dependency cycle: `tools.ts` imports the
* `toolSearchTool` value from `toolSearch.ts`, and `toolSearch.ts` needs the
* `McpToolDefinition` type. Keeping the type here (a leaf that only depends on zod)
* lets both files import it without forming a cycle.
*/
import type { z } from "zod";
export type AuditLevel = "none" | "basic" | "full";
export interface McpToolDefinition<TInput extends z.ZodTypeAny, TOutput extends z.ZodTypeAny> {
/** Tool name (MCP identifier) */
name: string;
/** Human-readable description for AI agents */
description: string;
/** Zod schema for input validation */
inputSchema: TInput;
/** Zod schema for output validation */
outputSchema: TOutput;
/** Required API key scopes */
scopes: readonly string[];
/** Audit logging level */
auditLevel: AuditLevel;
/** Phase: 1 = essential, 2 = advanced */
phase: 1 | 2;
/** Source endpoints on OmniRoute that this tool wraps */
sourceEndpoints: readonly string[];
}