fix(yoast): advertise noindex as a single boolean type, not [boolean, null]#28
fix(yoast): advertise noindex as a single boolean type, not [boolean, null]#28dallinchase wants to merge 1 commit into
Conversation
… null] The yoast_update_seo / yoast_bulk_update_seo input schema advertised noindex as type: ['boolean', 'null']. Anthropic's tool-schema validator rejects a 'null' member in a JSON Schema type array and returns a 400 for the ENTIRE tools/list request, which takes every tool on the server offline for Claude / Anthropic API clients, not just this field. Schema now advertises type: 'boolean'. The runtime handler is unchanged and still accepts an explicit null (tri-state true/false/null is preserved; covered by the existing 'noindex tri-state: null is preserved' test). Added a regression test asserting no field in the shared Yoast property set uses a type array containing 'null'. dist/ is a build artifact (npm run build / prepare) and is intentionally left out of this PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe ChangesYoast noindex Schema Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
yoast_update_seoandyoast_bulk_update_seoadvertisenoindexin their input schema as:Anthropic's tool-schema validator (Claude Code, Claude Desktop, and the Anthropic API tool-use endpoint) rejects a
"null"member inside a JSON Schematypearray. Because tools are validated as a set, this doesn't just disable thenoindexfield — it returns a400for the entiretools/listresponse, so every tool on the Block MCP server becomes unavailable to Anthropic clients. The server effectively goes dark for Claude users, with an error that points at schema validation rather than this one field.Fix
Advertise the single scalar type:
The runtime handler is unchanged — it still accepts an explicit
null(input.noindex === null), so the tri-state semantics (true= noindex /false= explicit index /null= clear to post-type default) are fully preserved. Only the advertised schema drops the rejectednullmember. Callers that want the default behavior can omit the field or passnull.Tests
noindex tri-state: null is preservedtest still passes — confirms behavior is unchanged.YOAST_FIELD_PROPERTIESset advertises atypearray containing"null".Note on
dist/dist/index.cjsis a build artifact (npm run build/ thepreparehook) and is intentionally left out of this PR to keep the diff reviewable. It will regenerate on install/release.Repro
Connect Block MCP to any Anthropic client with Yoast SEO active on the target site and request
tools/list— it returns a400validation error citing thenulltype member, and no tools load. With this change,tools/listsucceeds.🤖 Generated with Claude Code
Summary by CodeRabbit
Tests
Refactor
noindexfield type in Yoast SEO tool schema.