mcp-interviewer icon indicating copy to clipboard operation
mcp-interviewer copied to clipboard

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.

Open nik1097 opened this issue 1 year ago • 2 comments

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.

nik1097 avatar Sep 17 '25 16:09 nik1097

@nik1097 Thanks for your help reporting issues! Can you please confirm that #27 fixed this issue for you?

tylerpayne avatar Sep 17 '25 17:09 tylerpayne

#27 has fixed this issue, thanks!

nik1097 avatar Sep 17 '25 19:09 nik1097