f / f/mcptools

why does mcp tools say that the value is null when it is provided

Open
#73 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.6k
Forks
127
PR merge metrics
No merged PRs in 30d

Description

Here is how I am using mcptools to access my springboot mcp-server:

Tool is:
`@Tool(name = "searchPeopleByName", description = "Search for people by name")
public List searchPeopleByName(String name) {`

` mcp call searchPeopleByName --params '{"name":"John"}' java -jar ./target/springboot-mcp-server-1.0-SNAPSHOT.jar `

Here is what mcptools returns:
**Cannot invoke "String.toLowerCase()" because "name" is null**

The same goes for getting a person by ID
`@Tool(name = "getPersonById", description = "Find a person by their ID")
public Person getPersonById(Long id) {`

`mcp call getPersonById --params '{"id": 1}' java -jar ./target/springboot-mcp-server-1.0-SNAPSHOT.jar`

Here is the response:
**Cannot invoke "Object.hashCode()" because "key" is null**

When I test this code using springboot-mcp-client, all these methods work as specified. However, I want the capability of testing mcp-servers using stdio on the CLI. I was hoping your tool would help. However, other than the most simple commands that take no params, all it says is that the key is null.

Any help would be appreciated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.