Skip to content

Report generation fails when tool parameters don't have a type or description field defined. The num_tokens_for_tool() function assumes these fields are always present, causing crashes when they're missing from the parameter schema. #26

@nik1097

Description

@nik1097

The function directly accesses [properties[key]["type"]] and [properties[key]["description"]] without checking if these keys exist. When tools have parameters that lack type or description fields, this causes KeyError exceptions that crash the report generation process.

Based on the repository information, here's the link to the file in the GitHub repository:

https://github.com/microsoft/mcp-interviewer/blob/main/src/mcp_interviewer/statistics/tool.py

This link points to the tool.py file in the statistics directory on the main branch of the microsoft/mcp-interviewer repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions