Skip to content
This repository was archived by the owner on Nov 27, 2026. It is now read-only.

Build the template on nimblebrain-server-sdk - #19

Merged
mgoldsborough merged 2 commits into
mainfrom
use-server-sdk
Nov 15, 2026
Merged

mgoldsborough merged 2 commits into
mainfrom
use-server-sdk

Conversation

@mgoldsborough

@mgoldsborough mgoldsborough commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A server started from this template begins on nimblebrain-server-sdk (>=0.6.1) and uses it for tool annotations, the error contract, skills and tests.

Changes

  • Annotations. list_items and get_item carry READS. A tool with no annotation reads to a client as a destructive write.
  • Errors. A tool returns a failure with to_tool_error(ServiceError(...)). A caller's mistake (limit outside 1-100, an empty item_id) is bad_input, refused before the API is called. An API failure is classified by its status with ServiceError.from_upstream; the API's own text goes to detail, which is logged and not returned. A missing EXAMPLE_API_KEY is auth_required.
  • Skill. The skill is the directory src/mcp_example/skills/example/, registered with add_skills and served at skill://example/SKILL.md through the MCP Skills extension. The server instructions name that URI. The SKILL.md describes the two tools, so it is a working example and not a set of TODO headings.
  • Listing rows. list_items builds each row with listing_row: a uri, and description_preview in place of the full description. The uri resolves: the resource template example://items/{item_id} returns the whole record, through the same read as get_item. A failed read raises a resource error carrying the classified, host-safe message, since a resource read has no tool error envelope.
  • Tests. tests/test_server.py runs every test that crosses the wire on both protocol versions (mode="auto" for 2026-07-28, mode="legacy" for 2025-11-25), checks the skill with served_skills and the listing with assert_bounded_rows, and asserts the error envelope a host receives.
  • Docs. README.md, CLAUDE.md and CONTRIBUTING.md state the SDK conventions and link the SDK guides (quickstart, errors, skills, testing).

Server Tools

Tool Description
list_items READS. Returns bounded rows; refuses a limit outside 1-100 as bad_input
get_item READS. Returns the whole item; refuses an empty item_id as bad_input

Companion Skills

Skill Description
example When to use list_items and get_item, and how to act on an error code

Notes for the reviewer

  • A client that read skill://example/usage reads skill://example/SKILL.md.
  • A failed call is an error result with structured_content.error (code, retryable, message, and upstream_status for an API failure). The message for an API failure is the SDK's generic text for the code, and the status is in upstream_status, not in the message text.
  • pytest.ini, the ruff rules, the scan workflow and the licence are untouched. The suite passes with error::mcp.MCPDeprecationWarning, and mpak-scanner reports no critical or high finding on the CI bundle or on the bundle make bundle builds with the dependencies vendored.
  • The four docs.nimblebrain.ai/server-sdk/ links resolve once the SDK docs are published. No workflow here checks links.

Testing

make check                      # format, lint, typecheck, 49 tests
npx @anthropic-ai/mcpb pack && uvx mpak-scanner scan *.mcpb

Each Python snippet in the README was extracted and run.

Tools carry the SDK's annotations and return failures through its error
contract, the skill is a directory served by add_skills, and the server
tests run on both protocol versions with the SDK's testing helpers.
A row is a summary, so its uri is a resource template that returns the
record get_item returns, read through the same classified error path.
@mgoldsborough

Copy link
Copy Markdown
Contributor Author

QA Review: use-server-sdk

Scope: 9 files, +403/−139 · prepared review worktree · reviewed: 250d37d · CI: green
Risk: LOW
Why this exists: Give new servers working SDK conventions for annotations, classified errors, skills, and bounded listings with resolvable item resources.

Critical (must fix)

None.

Fix in-PR

None.

Suggestions

None.

What Looks Good

  • Both protocol versions exercise skill delivery, listing previews, full-item resource reads, and host-visible error envelopes.
  • Caller validation precedes API access; classified upstream failures keep API text out of client responses.
  • Local verification: PYTHONDONTWRITEBYTECODE=1 .venv/bin/python -m pytest -p no:cacheprovider tests/ -q — 49 passed. Worktree remained unchanged.
  • Supplied lint, test, bundle, and scan checks passed.

Body claims

  • Confirmed the SDK dependency, READS annotations, skill registration, listing previews, resource template, and 49-test count.
  • BREAKING: the old skill URI is replaced, listing descriptions become previews, and error responses adopt the SDK envelope. These changes are explicitly documented and appropriate to the template migration.
  • ADDITIVE: the item resource template resolves listing URIs through the same read function as get_item.
  • Scanner severity details, vendored-bundle scanning, and execution of README snippets were not independently reproduced. External documentation links were not checked in this offline review.
machine record
{
  "kind": "review",
  "pr": 19,
  "round": 1,
  "reviewed": "250d37d04fb4f7a15ffdd909c68354b88c9d6bfd",
  "delta_base": null,
  "ci": "green",
  "risk": "LOW",
  "stop_gate": "n/a",
  "verdict": "No blocking findings; eligible for qa-reviewed.",
  "label": "eligible-on-green",
  "findings": []
}

@mgoldsborough mgoldsborough added the qa-reviewed QA review completed with no critical issues label Nov 15, 2026
@mgoldsborough
mgoldsborough merged commit 918ba0c into main Nov 15, 2026
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

qa-reviewed QA review completed with no critical issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant