fix(tools): add missing inputSchema on get_current_user and list_users (#79)#95
Open
Abdeltoto wants to merge 1 commit into
Open
fix(tools): add missing inputSchema on get_current_user and list_users (#79)#95Abdeltoto wants to merge 1 commit into
Abdeltoto wants to merge 1 commit into
Conversation
smartsheet-platform#79) The MCP tool registrations for get_current_user and list_users were missing the inputSchema argument, causing the SDK to register tools with an invalid JSON schema. This breaks downstream consumers like @langchain/core/tools. Added {} as inputSchema (these tools take no parameters), matching the pattern already used by get_workspaces. Also adds a generic anti-regression test that loads every tool registrar and asserts the 4-arg server.tool() signature, so this class of bug fails CI immediately on any future tool. Closes smartsheet-platform#79 Made-with: Cursor
This was referenced Apr 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👋 Hi Smartsheet team,
First-time contributor here. I'm a Smartsheet power user running daily AI workflows on top of
smar-mcp(Claude + LangChain), and I noticed a handful of small papercuts while integrating the server into my agentic stack. Rather than just opening issues, I figured I'd send the fixes directly.This is the first of 3 small, independent PRs I'd like to contribute over the next few days:
url-utils.tsto help PR fix: EU region frontend authentication #88 (EU region auth fix) land. A few users have flagged that one as blocking.NPM_TOKENissues (root cause of The automated release is failing 🚨 #94).Each PR is fully self-contained and can be reviewed/merged independently. Happy to iterate on style, scope, or split things further if it helps. Thanks for open-sourcing this — really enjoying building on top of it. 🙏
Summary
Two
server.tool()calls insmartsheet-user-tools.tswere registered without aninputSchemaargument:get_current_userlist_usersThis causes the MCP SDK to register tools with an invalid/empty JSON schema, which breaks downstream consumers like
@langchain/core/tools(issue #79:Error: Invalid schema type or missing properties).Fix
Added
{}as the inputSchema for both tools (these tools take no parameters). Matches the pattern already used byget_workspacesinsmartsheet-workspace-tools.ts.Anti-regression test
Added
src/tools/__tests__/tool-registration-shape.test.tsthat loads every tool registrar in the codebase and asserts the 4-arg signatureserver.tool(name, description, inputSchema, handler)is used. Without the fix, this test fails on exactly the 2 affected tools.Going forward, any new tool added without a schema will fail CI immediately.
Test plan
npm test→ 79 passed (was 39, +40 from new file)npm run typecheckcleannpx eslintclean on changed filesmainwithout the fix (2 failures on the affected tools), passes with the fixCloses #79. Builds on the diagnosis from #80 by @rickliujh, adds anti-regression coverage to prevent recurrence.