Skip to content

Bump to 0.2.0 to unblock republishing to npm (fixes #31) - #32

Open
benmont wants to merge 1 commit into
calebl:mainfrom
benmont:fix/republish-sdk-refactor
Open

Bump to 0.2.0 to unblock republishing to npm (fixes #31)#32
benmont wants to merge 1 commit into
calebl:mainfrom
benmont:fix/republish-sdk-refactor

Conversation

@benmont

@benmont benmont commented Jul 9, 2026

Copy link
Copy Markdown

Summary

Fixes #31.

The npm-published 0.1.2 package predates this project's migration off mcp-framework (#15) and still ships that older implementation, even though main moved on some time ago. As a result, npm and GitHub have quietly diverged since April 2025 — anyone installing via npx ynab-mcp-server gets the old, buggy build while main already contains the fix.

Concretely, the old mcp-framework-based build has two bugs that are already fixed on main by virtue of the SDK migration, but were never shipped:

  1. Invalid MCP content type on tool errors. mcp-framework's BaseTool.createErrorResponse returns { content: [{ type: "error", text: ... }] }. "error" isn't a valid MCP content block type (valid types are text, image, audio, resource_link, resource), so MCP clients reject these responses with a schema validation error instead of showing the real failure message. For a mutating tool like create_transaction, this means a client can't tell whether the call actually succeeded or failed without independently re-checking state. main's tools already return type: "text" with a JSON { success, error } payload via the shared getErrorMessage helper, so this is fixed — just not released.
  2. Wrong generated input schema for optional booleans. mcp-framework's getJsonSchemaType doesn't unwrap ZodOptional, so fields like cleared/approved on create_transaction are reported to callers as type: "string" even though the validator requires real booleans. This is moot on main since tool schemas are now passed straight through to @modelcontextprotocol/sdk.

This PR doesn't change any tool logic — it:

  • Bumps package.json/src/index.ts version from 0.1.2 to 0.2.0
  • Rebuilds dist/ from current main source
  • Adds a CHANGELOG.md entry summarizing everything that's shipped since 0.1.2 (SDK migration, tool renaming with ynab_ prefix, new tools, consistent error handling), so this is ready for npm publish

Test plan

  • npm run build succeeds
  • npm test — 169/169 tests pass
  • Maintainer: npm publish after merge so the fix actually reaches users

The npm-published 0.1.2 package still ships the old mcp-framework-based
implementation, which returns invalid MCP content blocks (type: "error")
on tool failures and misreports optional boolean fields as strings in
generated input schemas. Both of these are already fixed on main via the
migration to @modelcontextprotocol/sdk (PR calebl#15), but main was never
republished under a new version, so npm and GitHub have diverged since
April 2025.

This bumps package.json/index.ts to 0.2.0, rebuilds dist/, and adds a
CHANGELOG entry summarizing everything that shipped since 0.1.2 so this
is ready to `npm publish`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create_transaction/error responses use invalid type: "error" content block, breaking MCP clients

1 participant