Skip to content

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

Description

@jbrinnand

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<Person> 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions