An MCP server for fetching and publishing code snippets to the Nostr network
NostrCodeSnippetMcp has three tools with basic schema and description coverage, but significant gaps in parameter documentation, error handling guidance, and output schema clarity. All three tools have descriptions (good baseline), but lack depth and LLM optimization. Input schemas are present and use Zod, but parameter descriptions are minimal. Output is hardcoded to generic JSON text responses without structured schemas. Error handling returns raw error messages without recovery guidance. The naming is clear and verb-first (fetch, publish), which is a strength. However, the server lacks tool annotations, detailed parameter constraints, and proper composition patterns. Average per-tool score: 42.
Fetches code snippets authored by the current user from the Nostr network
Fetches recent code snippets from the Nostr network
Publishes a code snippet to the Nostr network
Output schema is not documented. All tools return generic JSON text wrapped in a text content block. LLMs cannot determine what fields to expect in the JSON response (e.g., the structure of 'events' returned from Nostr queries). This forces LLMs to guess at field names and breaks downstream tool composition.
Parameter descriptions lack detail and constraints. 'limit' is described as 'Maximum number of snippets to fetch' but provides no bounds (min/max). 'language' and 'tags' have minimal guidance on valid values. No examples or format specifications. LLMs cannot determine valid input ranges and may pass absurd values.
Error handling returns raw error messages without recovery guidance. When NSEC is not set or Nostr queries fail, the tool returns the error text but does not tell the LLM what to do next (e.g., 'Set the NSEC environment variable' or 'Retry with different relay URLs'). No categorization of retryable vs. fatal errors.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 50 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 36 | - | v1 |
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). While the schema marks risks as READ_ONLY or WRITE at the server level, individual tools do not declare their risk profile via annotations. This prevents clients from applying appropriate safeguards or logging policies per tool.
publishNostrCodeSnippet is a destructive operation (publishes to Nostr) but has no dry-run, confirmation, or preview step. Agents can irreversibly publish snippets without confirmation. No idempotency guarantee, repeated calls will publish duplicate events.
Missing pagination guidance for list-like tools. fetchRecentNostrCodeSnippets and fetchMyNostrCodeSnippets accept a 'limit' parameter but provide no offset/cursor and no indication of total count. If there are 1000 snippets, an LLM cannot page through results. The baseline rubric expects paginated tools to support multiple pages.
Tool descriptions are too brief (55-60 chars). They state what the tool does but not WHEN to use it or what it returns. Per the rubric baseline, descriptions should be 34-392 chars. Example: 'Fetches recent code snippets from the Nostr network' could expand to 'Fetches the most recent code snippets from the Nostr network. Use this to discover newly published snippets. Returns an array of event objects with content, author, and metadata.'
No permission gates or scope declarations. publishNostrCodeSnippet uses a private key (NSEC) injected via env var, but the tool provides no way to audit or restrict which agents can publish. No scope declaration (e.g., 'requires: publish:nostr'). This violates the least-privilege pattern.