refactor(mcp): simplify tool inputs and inline results
This commit is contained in:
@@ -3,15 +3,10 @@ import { z } from "zod";
|
||||
const traceLiteralInputSchema = z.strictObject({
|
||||
query: z.string().min(1),
|
||||
case_sensitive: z.boolean().default(false),
|
||||
unknown_registry_approved: z
|
||||
.literal(true)
|
||||
.optional()
|
||||
.describe("Explicit approval to record bounded residuals durably"),
|
||||
});
|
||||
|
||||
/** Input schemas shared by MCP registration and enhanced application dispatch. */
|
||||
export const enhancedInputSchemas = {
|
||||
swift_classes: z.strictObject({ pattern: z.string().default("") }),
|
||||
get_objc_classes: z.strictObject({ pattern: z.string().default("") }),
|
||||
get_objc_protocols: z.strictObject({}),
|
||||
batch_decompile: z.strictObject({
|
||||
@@ -23,7 +18,18 @@ export const enhancedInputSchemas = {
|
||||
address: z.string().describe("A provider-normalized procedure address"),
|
||||
direction: z.enum(["forward", "backward"]).default("forward"),
|
||||
}),
|
||||
analyze_swift_types: z.strictObject({}),
|
||||
analyze_swift_types: z.strictObject({
|
||||
category: z
|
||||
.enum(["classes", "structs", "enums", "protocols", "extensions", "other"])
|
||||
.optional()
|
||||
.describe("Limit results to one Swift symbol category."),
|
||||
pattern: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe(
|
||||
"Case-sensitive literal filter applied to mangled symbol names.",
|
||||
),
|
||||
}),
|
||||
find_xrefs_to_name: z.strictObject({ name: z.string() }),
|
||||
binary_overview: z.strictObject({}),
|
||||
analyze_function: z.strictObject({
|
||||
@@ -31,12 +37,6 @@ export const enhancedInputSchemas = {
|
||||
}),
|
||||
inspect_native_api: z.strictObject({
|
||||
procedure: z.string().describe("A procedure name or address"),
|
||||
unknown_registry_approved: z
|
||||
.literal(true)
|
||||
.optional()
|
||||
.describe(
|
||||
"Explicit approval to record unsupported native API branches durably",
|
||||
),
|
||||
}),
|
||||
trace_feature: traceLiteralInputSchema,
|
||||
find_code_for_string: traceLiteralInputSchema,
|
||||
@@ -47,12 +47,6 @@ export const enhancedInputSchemas = {
|
||||
.describe("An optional provider-normalized destination address")
|
||||
.optional(),
|
||||
direction: z.enum(["forward", "backward"]).default("forward"),
|
||||
unknown_registry_approved: z
|
||||
.literal(true)
|
||||
.optional()
|
||||
.describe(
|
||||
"Explicit approval to record unresolved provider results durably",
|
||||
),
|
||||
}),
|
||||
} as const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user