Skip to content
IsoKron

Unknown arguments are rejected

Set "additionalProperties": false at the root of inputSchema and reject unknown arguments on the server, so a misspelled argument fails loudly instead of being silently dropped.

Check schema-additional-properties · Schema and description quality · default severity: advice · rubric 2.1.0

Error message you’ll see

Error
Invalid schema for function 'read': In context=(), 'additionalProperties' is required to be supplied and to be false.

OpenAI API in strict function mode. Where this was reported

What fails

Without additionalProperties: false a misspelled argument is silently ignored, and the call may succeed doing something other than intended (MWS-IN tests this against a server).

The rule

Use strict JSON Schema for tool parameters: set additionalProperties: false and use pattern (or similar) on string fields so only declared parameters and valid formats are accepted.

Source: OWASP MCP Security Cheat Sheet

How to fix it

Add "additionalProperties": false at the root of inputSchema, and make the server reject unknown arguments.

  1. TypeScript SDK: declare inputSchema with z.strictObject({...}); the SDK emits additionalProperties: false and rejects extra keys.
  2. Python: FastMCP 4 emits additionalProperties: false for function tools; with the official MCPServer, check for unknown keys in your handler.
  3. Test it: call the tool with a misspelled argument and expect an error, not a success.

TypeScript SDK

TypeScript
import { McpServer } from '@modelcontextprotocol/server';
import * as z from 'zod';

const server = new McpServer({ name: 'issues', version: '1.0.0' });

server.registerTool(
  'update_issue_state',
  {
    title: 'Update issue state',
    description: 'Open or close one issue. Use when the user asks to close, reopen or resolve an issue.',
    inputSchema: z.strictObject({
      issue_id: z.string().describe('Issue ID, for example ISS-42'),
      state: z.enum(['open', 'closed']).describe('New state'),
    }),
    annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: false },
  },
  async ({ issue_id, state }) => ({ content: [{ type: 'text', text: 'Done' }] }),
);

Python SDK

Python
from typing import Annotated, Literal

from pydantic import Field
from fastmcp import FastMCP
from mcp.types import ToolAnnotations

server = FastMCP("issues")

@server.tool(
    title="Update issue state",
    annotations=ToolAnnotations(readOnlyHint=False, destructiveHint=True, openWorldHint=False),
)
def update_issue_state(
    issue_id: Annotated[str, Field(description="Issue ID, for example ISS-42")],
    state: Annotated[Literal["open", "closed"], Field(description="New state")],
) -> str:
    """Open or close one issue. Use when the user asks to close, reopen or resolve an issue."""
    return "Done"

Run against @modelcontextprotocol/server 2.4.0, mcp 2.3.0 and fastmcp 4.2.2 on 2026-11-18; the checker confirms this check passes on the tool list each snippet produces.

Questions

What goes wrong without it?

A model that sends stat: "closed" instead of state: "closed" gets a success answer while nothing changed, or a default value is used instead. MWS-IN tests this against a running server.

Is additionalProperties: false required by the MCP spec?

No. It is advice (OWASP’s MCP cheat sheet recommends it), but OpenAI’s strict function mode does require it on every object, so schemas without it fail there.

Further reading

How this check is graded

It counts toward: Schema and description quality. See the rubric.

Last verified against OWASP MCP Security Cheat Sheet on 2026-11-18. The rule above is quoted in the source’s own words. This page as Markdown.

Check your tool list: paste your tools/list, nothing is sent anywhere