inspector icon indicating copy to clipboard operation
inspector copied to clipboard

Empty string parameters are not sent (validation error missing required argument)

Open mrexodia opened this issue 7 months ago • 1 comments

Describe the bug Untouched fields are not sent at all, even if they are supposed to be empty.

To Reproduce Steps to reproduce the behavior:

With a function like this:

@mcp.tool()
def list_strings(filter: Annotated[str, Field(description='Filter to apply to the list. Case-insensitive contains or /regex/ syntax')], offset: Annotated[int, Field(description='Offset to start listing from (start at 0)')], count: Annotated[int, Field(description='Number of strings to list (100 is a good default, 0 means remainder)')]) -> Page[String]:
    """List all strings in the database (paginated)"""
    return make_jsonrpc_request('list_strings', filter, offset, count)

The filter parameter is not optional, but it has to be set to an empty string for an empty filter. When using the inspector not filling in the field causes the filter to be omitted completely:

Image

If you put x in the string field and then press backspace, everything will be sent correctly:

Image

It looks like other clients also have this behavior, discovered it from a discussion here: https://github.com/mrexodia/ida-pro-mcp/issues/67. In my opinion this is a bug.

Expected behavior Send an empty string if the user does not put one.

Logs If applicable, add logs to help explain your problem.

Additional context Add any other context about the problem here.

mrexodia avatar May 14 '25 10:05 mrexodia

@mrexodia I will check with this

kavinkumar807 avatar May 14 '25 14:05 kavinkumar807

This issue was resolved with PR #480 .

olaservo avatar Jul 14 '25 03:07 olaservo