Safety-first MCP server exposing the X (Twitter) API v2 as typed, policy-gated tools, with a two-axis policy model and 2026 pay-per-use cost controls.
Server defines 3 tools with explicit Zod schemas and policy-gated architecture. Tool names follow verb_noun pattern (x_auth_status, x_post_get, x_usage_get). Descriptions are present but brief (20-50 chars). Schemas are declared in tooldef.ts but actual parameter definitions not visible in provided code excerpt, only type imports shown. Error handling framework exists (XError mapping, policy validation) but recovery guidance not evident in tool descriptions. Security model is strong (OAuth scopes declared, policy matrix enforced, no secrets in params). Composition is clean (single responsibility per tool). Main gaps: parameter descriptions not visible, output schemas not documented in descriptions, no pagination/limit guidance in tool descriptions.
Confirm the auth mode, granted scopes, and the policy matrix
Retrieve a post by ID or URL
Get usage statistics (conditional tool)
Tool descriptions are under 50 characters and lack context for LLM selection. 'Confirm the auth mode, granted scopes, and the policy matrix' does not explain WHEN to call this tool or what the output enables.
Parameter schemas and descriptions not visible in provided code. Tooldef.ts imports Zod types but actual parameter definitions (required fields, types, constraints, descriptions) are not shown. Cannot verify if parameters have descriptions or if enums/constraints are declared.
Output schemas not documented in tool descriptions. LLMs need to know what fields to expect (e.g., does x_post_get return post_id, author_id, created_at, engagement_metrics?). No pagination guidance visible for tools that may return lists.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 39 | 2025-06-18+ | v2 |
Error recovery guidance absent from tool descriptions. Policy errors (POL-6, POL-7) are handled server-side but tool descriptions do not tell LLMs what to do if a policy cell is denied or a scope is missing.
x_usage_get marked as 'conditional tool' but no description explains the condition. When is this tool available? What determines availability? LLMs cannot reason about conditional tools without explicit guidance.