Repository navigation
Description
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
The Notion MCP connection used by the OpenClaw gateway agent rejects valid numeric ("number" type) property values when creating or updating a database page, while an identical tool call issued from a separate local MCP session succeeds.
Steps to reproduce
- Configure the official remote Notion MCP connector (HTTP transport, OAuth) and connect it both to an OpenClaw gateway agent session and to a separate local MCP client session, using the same integration and the same database.
- In a Notion database with a property of type "number", have the gateway agent call the page create/update tool with a valid parent (data source id) and a plain JSON number for that property (e.g. 10).
- Observe the error returned by the tool call:
Invalid number value for property <property>: <value>. Number values must be JavaScript numbers. - From the separate local MCP session (same integration, same database), issue the exact same call (same parent, same property name, same JS number value). Observe it succeeds.
Expected behavior
The identical tool call (same parent/data source id, same property, same JS number value) that succeeds via a local MCP session should also succeed when issued by the gateway agent.
Actual behavior
The gateway agent's call is rejected by the Notion API with "Invalid number value for property Volume (ml): 10. Number values must be JavaScript numbers." Reproduced 3 times in the same turn using different value encodings (plain JSON number, string "10", and via a follow-up update_properties call on an existing page) — all failed identically. The same value, same property, same parent, succeeded when sent via a separate local MCP session.
OpenClaw version
2026.6.11, reproduced again after upgrading to 2026.7.1 (gateway restarted and verified after the upgrade)
Operating system
Windows 10 Pro, build 10.0.19045
Install method
npm global
Model
anthropic/claude-haiku-4-5
Provider / routing chain
openclaw gateway agent -> anthropic (direct, anthropic-messages API) — no intermediate proxy observed in the session transcript.
Additional provider/model setup details
NOT_ENOUGH_INFO
Logs
Failing call (gateway agent session), 1st attempt:
tool: notion-create-pages
args: {"parent":{"type":"data_source_id","data_source_id":"<data_source_id>"},"pages":[{"properties":{"Registro":"...","Tipo":"...","Volume (ml)":10,"date:Quando:start":"2026-07-13T23:04:35","date:Quando:is_datetime":1}}]}
result (error): {"name":"APIResponseError","code":"validation_error","status":400,"body":"{\"message\":\"Invalid number value for property Volume (ml): 10. Number values must be JavaScript numbers.\"}"}
2nd attempt, same value as a string "10": identical error message.
3rd attempt, via notion-update-page / update_properties on an existing page, same value 10: identical error message.
Control test: the exact same parent/property/value, called from a separate local MCP session (not the gateway), succeeded and returned the created page with the property correctly set to 10.Screenshots, recordings, and evidence
No screenshots; evidence is the raw session transcript (.jsonl) showing the tool call arguments and error responses quoted above.
Impact and severity
Affected: any user relying on the gateway agent to write "number"-type properties via the official Notion MCP connector.
Severity: Blocks workflow for structured numeric data — the page is either not created, created without the numeric property set, or (if other properties are set first) left permanently missing that value.
Frequency: Always, in the observed session (3/3 attempts with varied value encodings failed identically; reproduced again after upgrading OpenClaw).
Consequence: Numeric data cannot be reliably recorded through the gateway agent; requires a manual workaround from a separate local MCP session to backfill the value.
Additional information
Confirmed bad on both 2026.6.11 and 2026.7.1. No known-good version identified (not tested on earlier versions). Temporary workaround: perform the same page create/update call from a local, non-gateway MCP session instead of the in-gateway agent session.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jul 15, 2026
Codex review: this still needs some work.
Summary
Keep open: the reporter established failures on official releases, while the merged union-preservation repair has not been verified against the reported Gateway-to-Notion workflow.
Reproducibility: The reporter supplies concrete official-release failures, but no high-confidence current-main reproduction is established; this read-only review executed no runtime tests or Notion calls.
Next step
Verify Notion numeric create/update calls on a Gateway containing the union repair and capture sanitized schemas and outbound argument types if rejection persists.
Review details
Best possible solution:
Confirm the repaired Gateway preserves numeric properties through successful Notion create and update calls, then repair only any demonstrated remaining conversion boundary.
Do we have a high-confidence way to reproduce the issue?
The reporter supplies concrete official-release failures, but no high-confidence current-main reproduction is established; this read-only review executed no runtime tests or Notion calls.
Is this the best way to solve the issue?
The merged shared-validator repair addresses a plausible mechanism; another MCP-specific coercion layer would be premature without a failing post-repair call and its actual schema.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against e3da7af76e91.
Label changes
Label changes:
No label changes.
Label justifications:
P2: The reported numeric-write failure blocks a bounded integration workflow with a separate-client workaround.impact:other: Rejected Notion MCP writes disrupt structured-data recording without demonstrated OpenClaw data loss.Evidence reviewed
Acceptance criteria:
What I checked:
packages/llm-core/src/validation.ts:232, e3da7af76e91)packages/llm-core/src/validation.ts:233, e491bbc1c69b)src/agents/agent-bundle-mcp-runtime.ts:790, e3da7af76e91)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed October 23, 2026, 12:10 PM ET / 16:10 UTC.
fix(mcp): coerce string numeric tool args to numbers per inputSchema
openclaw-barnacle commentedon Jul 30, 2026
This bug report has been automatically marked as stale due to inactivity.
ClawSweeper is checking whether current
mainalready fixes the reported behavior.Inactivity alone will not close a bug report.
Almeida-FilhoDG commentedon Aug 11, 2026
Reproduced fresh, side by side, same session, same property (
Volume (ml), typenumber), same data source — one call via a local (non-gateway) MCP session, one via the OpenClaw gateway agent, seconds apart.Schema contract (both sides declare the same thing): the
notion-create-pagestool schema exposed to both the local session and the gateway agent types property values asstring | number | string[] | null— a plain JSON number is an explicitly valid value on both sides.Local MCP session (not the gateway) — succeeds:
OpenClaw gateway agent session — fails, reproduced twice in a row, identical error both times:
Both
"Volume (ml)"values above are genuine JSON numbers in the tool-call arguments (2, not"2") — confirmed by inspecting the raw session transcript, not just the agent's paraphrase of it. The gateway path rejects a value it itself declared as valid, while the same value/property/data source succeeds through a local session moments apart. This is consistent with the earlier "keep open" review note about a possible schema-driven number-to-string conversion happening somewhere between the tool-call arguments and the actual outbound MCP/API call on the gateway path specifically — we were not able to capture raw wire-level (HTTP body) bytes past that point (no per-call verbose/debug logging option found for individual MCP tool calls in the current OpenClaw docs/CLI), so this evidence is at the tool-call/tool-result boundary, same granularity as the original report, but now captured as a true side-by-side (same test session, same minute, same property/value shape) rather than at separate times.Happy to run further targeted reproductions (e.g. with debug/verbose flags, if a maintainer can point to one that logs the actual outbound MCP request body) if that would help narrow this down further.
13 remaining items
openclaw-barnacle commentedon Oct 23, 2026
This bug report has had no qualifying human activity for 30 days. Please retest on the current release and share the result.
Without new human activity, Barnacle may close it as not planned 14 days after this message was posted. This is administrative inactivity cleanup, not a claim that the problem is fixed.
A human update restarts the inactivity clock; a new PR head also restarts it. A maintainer can add no-stale for a durable hold, or bad-barnacle to suppress Barnacle. Remove the hold when work can resume.
steipete commentedon Oct 24, 2026
Thanks for filing this. We're closing older issues that no longer look actionable on current
main.A schema-preserving fix for numeric MCP tool arguments has landed since this report, and we could not confirm the Notion number write still fails on current main. If it still happens on a recent release, please open a fresh issue with the version and the exact tool call.