fix(mcp): reject unknown MCP tool inputs (#975)
* fix(mcp): reject unknown official tool inputs * fix(mcp): reject unknown native tool inputs * test(mcp): follow native contract module move * fix(mcp): reject unknown remaining tool inputs * fix(mcp): satisfy strict unknown and browser input schemas Remove obsolete approval fields from residual-unknown fixtures, project update inputs explicitly, and stop passing target_id to list-targets parsing. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
@@ -28,7 +28,7 @@ const binaryTargetPathSchema = z
|
||||
);
|
||||
|
||||
/** Input contract for opening a target with an optional staged snapshot. */
|
||||
export const openBinaryInputSchema = z.object({
|
||||
export const openBinaryInputSchema = z.strictObject({
|
||||
path: binaryTargetPathSchema,
|
||||
format: executableFormatHintSchema
|
||||
.optional()
|
||||
@@ -40,7 +40,7 @@ export const openBinaryInputSchema = z.object({
|
||||
});
|
||||
|
||||
/** Input contract for closing a target after an optional atomic snapshot. */
|
||||
export const closeBinaryInputSchema = z.object({
|
||||
export const closeBinaryInputSchema = z.strictObject({
|
||||
snapshot_path: snapshotPathSchema.optional(),
|
||||
overwrite: z.boolean().default(false),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user