Notion connector exposes SQL query tool in schema, but runtime says tool not found

Open 💬 7 comments Opened Apr 28, 2026 by wadjj
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

26.422.30944 (2080)

What subscription do you have?

Plus

What platform is your computer?

Darwin 25.4.0 arm64 arm

What issue are you seeing?

In Codex Desktop with the Notion connector enabled, the tool discovery/schema indicates that Notion supports querying data sources with SQL via notion_query_data_sources.

The tool description says it can:

  • query Notion databases using SQLite SQL
  • use collection://... data source URLs as table names
  • run queries like SELECT * FROM "collection://..." LIMIT 10

However, when actually calling the tool, the Notion MCP backend returns:

MCP error -32602: Tool notion-query-data-sources not found

So the exposed tool schema and the registered runtime MCP tool set appear inconsistent.

What steps can reproduce the bug?

Uploaded thread: 019dd23a-0765-7713-a9d3-e46cc14f6c99

  1. In Codex Desktop, use the Notion connector.
  2. Search for a Notion database.
  3. Fetch the database. This returns a data source URL and a SQLite table definition, e.g.

collection://35fb1d57-69a4-4d67-9bea-2d0aad2a34d2

  1. Call notion_query_data_sources with a SQL query such as:
{
  "data": {
    "mode": "sql",
    "data_source_urls": ["collection://35fb1d57-69a4-4d67-9bea-2d0aad2a34d2"],
    "query": "SELECT Status, COUNT(*) AS count FROM \"collection://35fb1d57-69a4-4d67-9bea-2d0aad2a34d2\" GROUP BY Status"
  }
}


### What is the expected behavior?

_No response_

### Additional information

_No response_

View original on GitHub ↗

7 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #19669

Powered by Codex Action

wadjj · 2 months ago
Potential duplicates detected. Please review them and close your issue if it is a duplicate. - #19669 Powered by Codex Action

Not a duplicate, but I've found that this tool seems to require a more premium plan. Should post a clearer error message

LeonardoVolpini · 2 months ago

Hi @wadjj I have the same problem. Have you solved it?

chaehy5665 · 2 months ago

Additional reproduction from another Codex Desktop session, observed on 2026-05-18:

The currently exposed callable is not just the documented/logical name. Tool discovery exposes:

  • Namespace: mcp__codex_apps__notion
  • Callable: _notion_query_data_sources
  • Cached underlying/title: notion-query-data-sources

Calling the exposed callable directly still fails with the same backend error:

Error code: INVALID_ARGUMENT; Error: RuntimeException: Error calling MCP tool: [TextContent(type='text', text='MCP error -32602: Tool notion-query-data-sources not found', annotations=None, meta=None)]

The same Notion data source can be fetched successfully via the Notion fetch tool, and the fetch output includes a valid collection://... data source URL and schema. So this still looks like a runtime/tool registry mismatch rather than a database/schema/access issue.

Working fallbacks in the same session:

  • _fetch can fetch the database/data-source schema.
  • _search with data_source_url is available for search-style discovery.
  • Known pages can be fetched directly.
  • Page/property create/update paths can be used for write-compatibility checks.

Only SQL row-level data-source querying through _notion_query_data_sources appears blocked.

andrefadila · 1 month ago

I also have related issue with the Notion connector (plugin/apps) on notion_query_data_sources function.

Codex Version 26.602.30954

{
  "callId": "call_qzSZHVn7VAt8USIw8jJixhnb",
  "invocation": {
    "server": "codex_apps",
    "tool": "notion_notion-query-data-sources",
    "arguments": {
      "data": {
        "data_source_urls": [
          "collection://55615095-47e4-424f-b330-97902xxxxxx"
        ],
        "query": "SELECT url, \"Account Name\", \"Email (Manual Input)\" FROM \"collection://55615095-47e4-424f-b330-97902xxxxxx\" WHERE \"Email (Manual Input)\" = ? LIMIT 5",
        "params": [
          "xxxxxx@gmail.com"
        ]
      }
    }
  },
  "durationMs": 2494,
  "result": {
    "type": "success",
    "content": [
      {
        "type": "text",
        "text": "Error code: INVALID_ARGUMENT; Error: RuntimeException: validation_error"
      }
    ],
    "structuredContent": null,
    "raw": {
      "content": [
        {
          "type": "text",
          "text": "Error code: INVALID_ARGUMENT; Error: RuntimeException: validation_error"
        }
      ],
      "structuredContent": null,
      "_meta": null
    }
  }
}

This query works if I am using Notion MCP. In Codex Notion Plugin got validation error.

wadjj · 1 month ago
Hi @wadjj I have the same problem. Have you solved it?

I don't think it's solvable, notion mcp does not post a clear error message for tools that require business or enterprise plans, and codex doesn't know better.

Fransouski · 1 month ago

Same problem here.

"Tool notion-query-data-sources not found"

both on ChatGPT or Codex

The other tools seem to work fine

As codex suggested me, I've sent a bug report with /feedback
<img width="517" height="280" alt="Image" src="https://github.com/user-attachments/assets/b3bde1bf-7cef-4f8a-873f-d126bf9f4cd9" />

Feedback ID
019ebba3-b50b-7193-ab41-74b663467cc9