# No generic executor or operation dispatcher

**OpenAI does not allow discovery, operation selection or schema fetching with a generic executor that enables operations not individually exposed for review; expose each operation as its own tool.**

Check `openai-generic-executor` · OpenAI plugin directory · default severity: blocking · rubric 2.1.0. Last verified against OpenAI plugin guidelines, section 6.2 on 2026-11-18.

## What fails

A tool that runs an operation, tool or command named in an argument hides those operations from review and from the hints.

## The rule

> Do not use discovery, operation selection, or schema fetching with a generic executor to enable operations not individually exposed for review.

Source: [OpenAI plugin guidelines, section 6.2](https://developers.openai.com/plugins/plugin-guidelines)

## How to fix it

Expose each operation as its own tool with its own schema and annotations.

1. Replace execute(operation, params) with one tool per operation.
2. Give each its own inputSchema and annotations.
3. If the catalog is large, group by resource rather than hiding operations behind one tool.

### TypeScript SDK

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

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

server.registerTool(
  'archive_project',
  {
    title: 'Archive project',
    description: 'Archive one project; it can be restored later. Use when the user asks to archive or shelve a project.',
    inputSchema: z.strictObject({
      project_id: z.string().describe('Project ID, for example PRJ-7'),
    }),
    annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: false },
  },
  async ({ project_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="Archive project",
    annotations=ToolAnnotations(readOnlyHint=False, destructiveHint=True, openWorldHint=False),
)
def archive_project(
    project_id: Annotated[str, Field(description="Project ID, for example PRJ-7")],
) -> str:
    """Archive one project; it can be restored later. Use when the user asks to archive or shelve a project."""
    return "Done"
```

## Questions

### Our API has 300 operations. Do we need 300 tools?

Expose the operations the app needs, each as a tool. Reviewers must be able to see and judge each operation and its annotations; a dispatcher hides them.

### Is a search tool that returns tool names a problem?

Discovery alone is fine if every operation it points to is itself an exposed, annotated tool. The rule targets running unexposed operations.

## Related checks

- [Reads and writes are separate tools](https://isokron.ai/mcp-check/checks/anthropic-read-write-split)
- [Custom query tools name or link the target API](https://isokron.ai/mcp-check/checks/anthropic-api-docs)
- [No steering of when other tools are used](https://isokron.ai/mcp-check/checks/sec-cross-tool-steering)
- [Directory review rules for MCP tools](https://isokron.ai/mcp-check/checks/directories)

Counts toward: OpenAI plugin directory.

Rubric: https://isokron.ai/mcp-check/rubric

Check your tool list: https://isokron.ai/mcp-check
