Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

feat(mcp): register read:catalog scope + add tools to MCP_TOOLS array

diegosouzapwa7a093d06628
diff --git a/open-sse/mcp-server/schemas/tools.ts b/open-sse/mcp-server/schemas/tools.ts
index 4b58e23cce..f4f0e71252 100644
--- a/open-sse/mcp-server/schemas/tools.ts
+++ b/open-sse/mcp-server/schemas/tools.ts
@@ -1267,6 +1267,122 @@ export const oneproxyStatsTool: McpToolDefinition<
sourceEndpoints: ["/api/settings/oneproxy"],
};
+// ============ Agent Skills Tools ============
+
+// --- omniroute_agent_skills_list ---
+export const agentSkillsListInput = z.object({
+ category: z.enum(["api", "cli"]).optional().describe("Filter by category: 'api' or 'cli'"),
+ area: z.string().optional().describe("Filter by area (e.g. 'providers', 'models', 'cli-serve')"),
+});
+
+export const agentSkillsListOutput = z.object({
+ skills: z.array(
+ z.object({
+ id: z.string(),
+ name: z.string(),
+ description: z.string(),
+ category: z.enum(["api", "cli"]),
+ area: z.string(),
+ endpoints: z.array(z.string()).optional(),
+ cliCommands: z.array(z.string()).optional(),
+ icon: z.string().optional(),
+ isEntry: z.boolean().optional(),
+ isNew: z.boolean().optional(),
+ rawUrl: z.string(),
+ githubUrl: z.string(),
+ })
+ ),
+ count: z.number(),
+ coverage: z.object({
+ api: z.object({ have: z.number(), total: z.literal(22) }),
+ cli: z.object({ have: z.number(), total: z.literal(20) }),
+ totalSkills: z.number(),
+ generatedAt: z.string(),
+ }),
+});
+
+export const agentSkillsListTool: McpToolDefinition<
+ typeof agentSkillsListInput,
+ typeof agentSkillsListOutput
+> = {
+ name: "omniroute_agent_skills_list",
+ description:
+ "List OmniRoute agent skills with optional filtering by category (api/cli) or area. Returns skill metadata including id, name, description, endpoints/commands, and URLs.",
+ inputSchema: agentSkillsListInput,
+ outputSchema: agentSkillsListOutput,
+ scopes: ["read:catalog"],
+ auditLevel: "none",
+ phase: 2,
+ sourceEndpoints: ["/api/agent-skills"],
+};
+
+// --- omniroute_agent_skills_get ---
+export const agentSkillsGetInput = z.object({
+ id: z.string().describe("Canonical skill ID (e.g. 'omni-providers', 'cli-serve')"),
+});
+
+export const agentSkillsGetOutput = z.object({
+ id: z.string(),
+ name: z.string(),
+ description: z.string(),
+ category: z.enum(["api", "cli"]),
+ area: z.string(),
+ endpoints: z.array(z.string()).optional(),
+ cliCommands: z.array(z.string()).optional(),
+ icon: z.string().optional(),
+ isEntry: z.boolean().optional(),
+ isNew: z.boolean().optional(),
+ rawUrl: z.string(),
+ githubUrl: z.string(),
+ markdown: z.object({
+ id: z.string(),
+ frontmatter: z.object({ name: z.string(), description: z.string() }),
+ body: z.string(),
+ source: z.enum(["filesystem", "github", "generated"]),
+ fetchedAt: z.string(),
+ }),
+});
+
+export const agentSkillsGetTool: McpToolDefinition<
+ typeof agentSkillsGetInput,
+ typeof agentSkillsGetOutput
+> = {
+ name: "omniroute_agent_skills_get",
+ description:
+ "Get detailed metadata and SKILL.md markdown for a single agent skill by its canonical ID. Returns all skill fields plus the raw markdown content.",
+ inputSchema: agentSkillsGetInput,
+ outputSchema: agentSkillsGetOutput,
+ scopes: ["read:catalog"],
+ auditLevel: "none",
+ phase: 2,
+ sourceEndpoints: ["/api/agent-skills/:id", "/api/agent-skills/:id/raw"],
+};
+
+// --- omniroute_agent_skills_coverage ---
+export const agentSkillsCoverageInput = z.object({}).describe("No parameters required");
+
+export const agentSkillsCoverageOutput = z.object({
+ api: z.object({ have: z.number(), total: z.literal(22) }),
+ cli: z.object({ have: z.number(), total: z.literal(20) }),
+ totalSkills: z.number(),
+ generatedAt: z.string(),
+});
+
+export const agentSkillsCoverageTool: McpToolDefinition<
+ typeof agentSkillsCoverageInput,
+ typeof agentSkillsCoverageOutput
+> = {
+ name: "omniroute_agent_skills_coverage",
+ description:
+ "Returns the current SKILL.md coverage stats: how many of the 22 API skills and 20 CLI skills have generated SKILL.md files on the filesystem vs the catalog total.",
+ inputSchema: agentSkillsCoverageInput,
+ outputSchema: agentSkillsCoverageOutput,
+ scopes: ["read:catalog"],
+ auditLevel: "none",
+ phase: 2,
+ sourceEndpoints: ["/api/agent-skills"],
+};
+
// ============ Tool Registry ============
/** All MCP tool definitions, ordered by phase then name */
@@ -1301,6 +1417,9 @@ export const MCP_TOOLS = [
oneproxyFetchTool,
oneproxyRotateTool,
oneproxyStatsTool,
+ agentSkillsListTool,
+ agentSkillsGetTool,
+ agentSkillsCoverageTool,
] as const;
/** Essential tools only (Phase 1) */