Skip to content

Add type hints to MCP function parameters and return types#294

Open
ykd007 wants to merge 1 commit into
msoedov:mainfrom
ykd007:fix/mcp-type-hints-198
Open

Add type hints to MCP function parameters and return types#294
ykd007 wants to merge 1 commit into
msoedov:mainfrom
ykd007:fix/mcp-type-hints-198

Conversation

@ykd007
Copy link
Copy Markdown
Contributor

@ykd007 ykd007 commented May 15, 2026

Fixes #198

The functions in agentic_security/mcp/main.py had bare dict and list return annotations without generic parameters, and one function had a typo in its docstring.

Changes:

  • Import Any from typing for use in generic type hints
  • Refine return types: dictdict[str, Any] and listlist[Any] across all MCP tool functions
  • Fix typo in verify_llm docstring: spectspec
  • Fix copy-paste error in get_data_config docstring (it referenced stopping the scan instead of describing the data config response)

This improves IDE support, makes mypy/pyright output cleaner, and makes the API surface easier to understand at a glance.

The mcp/main.py functions had bare dict and list return annotations
with no generic parameters. This adds proper typing for IDE support
and static analysis tools, and fixes a small typo in the verify_llm
docstring (spect -> spec).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add type hints to function parameters in mcp

1 participant