Skip to content
IsoKron

Read-only tools set destructiveHint: false

A tool with readOnlyHint: true should set destructiveHint: false: the specification ignores destructiveHint on read-only tools, but the pair contradicts itself and OpenAI asks for false.

Check openai-readonly-destructive · OpenAI plugin directory · default severity: attention · rubric 2.1.0

What fails

The tool sets both readOnlyHint: true and destructiveHint: true, which contradict each other. The specification ignores destructiveHint on read-only tools, but OpenAI asks for false.

The rule

destructiveHint: Use false for read-only tools.

Source: OpenAI plugin guidelines, section 6.3

How to fix it

Set "destructiveHint": false, or set readOnlyHint to false if the tool does change data.

  1. On read-only tools set destructiveHint: false.
  2. If the tool does change data, set readOnlyHint: false instead and keep destructiveHint: true.

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(
  'get_issue',
  {
    title: 'Get issue',
    description: 'Return one issue by ID. Use when the user names an issue.',
    inputSchema: z.strictObject({
      issue_id: z.string().describe('Issue ID, for example ISS-42'),
    }),
    annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
  },
  async ({ issue_id }) => ({ content: [{ type: 'text', text: 'Done' }] }),
);

Python SDK

Python
from typing import Annotated

from pydantic import Field
from mcp.server.mcpserver import MCPServer
from mcp.types import ToolAnnotations

server = MCPServer("issues")

@server.tool(
    title="Get issue",
    annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False, openWorldHint=False),
)
def get_issue(
    issue_id: Annotated[str, Field(description="Issue ID, for example ISS-42")],
) -> str:
    """Return one issue by ID. Use when the user names 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

Which value wins in clients?

Per the specification, readOnlyHint: true makes destructiveHint meaningless. Reviewers still read the pair as an error in the annotations.

Why would a server send both true?

Usually a default of destructiveHint: true applied to every tool, with readOnlyHint set per tool.

How this check is graded

It counts toward: OpenAI plugin directory. See the rubric.

Last verified against OpenAI plugin guidelines, section 6.3 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