Skip to content

Conversation

@Ilan-kayesar
Copy link

Motivation and Context

This is from issue 226:
#226
We want to add the description of the arguments from the docstring of the function to the jsonschema automatically.
Currently supported docstrings format are:
Google, sphinx, numpy.

How Has This Been Tested?

Previous tests with no docstrings or descriptions in the annotated type pass.
Added tests to make sure code catches the descriptions from all the formats.

Breaking Changes

If a user has a function with a docstring, we will now collect the argument's description.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Implementation is taken in parts from the similar implementation in pedantic AI

@contextmanager
def _disable_griffe_logging():
"""disables griffe logging"""
# Hacky, but suggested here: https://github.com/mkdocstrings/griffe/issues/293#issuecomment-2167668117
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we not pass in warnings=False as per the last comment in that thread?

@maxisbey maxisbey added enhancement Request for a new feature that's not currently supported P2 Moderate issues affecting some users, edge cases, potentially valuable feature labels Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Request for a new feature that's not currently supported P2 Moderate issues affecting some users, edge cases, potentially valuable feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants