mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-18 05:02:15 +03:00
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).
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { z } from "zod";
|
|
import type { McpToolDefinition } from "./toolDefinition.ts";
|
|
|
|
export const toolSearchInput = z
|
|
.object({
|
|
query: z
|
|
.string()
|
|
.min(1)
|
|
.describe("Natural-language or keyword query over tool names/descriptions"),
|
|
limit: z.number().int().min(1).max(25).optional().describe("Max results (default 8)"),
|
|
})
|
|
.describe("Search available MCP tools by keyword");
|
|
|
|
export const toolSearchOutput = z.object({
|
|
query: z.string(),
|
|
count: z.number(),
|
|
tools: z.array(
|
|
z.object({
|
|
name: z.string(),
|
|
description: z.string(),
|
|
scopes: z.array(z.string()),
|
|
signature: z.string(),
|
|
})
|
|
),
|
|
});
|
|
|
|
export const toolSearchTool: McpToolDefinition<typeof toolSearchInput, typeof toolSearchOutput> = {
|
|
name: "omniroute_tool_search",
|
|
description:
|
|
"Search the available MCP tools by keyword and return the most relevant ones as compact one-line TypeScript signatures (token-efficient discovery instead of loading every tool schema).",
|
|
inputSchema: toolSearchInput,
|
|
outputSchema: toolSearchOutput,
|
|
scopes: ["read:tools"],
|
|
auditLevel: "basic",
|
|
phase: 1,
|
|
sourceEndpoints: [],
|
|
};
|