Skip to content

Tool metadata coding pattern, error handling, auto versioning, User-Agent header, test overhaul#48

Merged
kpto merged 21 commits into
mainfrom
dev
Jun 15, 2026
Merged

Tool metadata coding pattern, error handling, auto versioning, User-Agent header, test overhaul#48
kpto merged 21 commits into
mainfrom
dev

Conversation

kpto and others added 21 commits May 1, 2026 14:53
…I error handling and relaying (#36)

* Implemented session reuse and gql native batch querying (AI, reviewed)

* AI: Fixed tests

* Reduced docs, minor coding pattern adjustment, fixed tests

* Removed batch query and revert to original serialised method as the official GraphQL API does not support batch query

* Added error handling to relay upstream errors to result

* AI not reviewed: fixed test
* Pass explicit description to get_open_targets_graphql_schema tool registration so FastMCP 3.x's griffe parser does not truncate the category list

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Fix test_all_tools_have_readonly_hint: await create_server() and use get_tools/list_tools fallback for FastMCP 2.x and 3.x compatibility

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Pass explicit description to get_type_dependencies registration so FastMCP 3.x's griffe parser does not truncate the Examples and Returns blocks

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Remove mention to specific FastMCP version

* Formalised return object meta data

* Fixed syntax

* Refactoring models and tool function signatures

* Update helper.py

* Update search_entities.py

* Fixed type arguments not printed

* Moved all argument and return descriptions from texts to function annotations, renamed all texts from txt to md for auto wrapping

* Same as previous commit

* Updated search entities annotation, removed search entities jq postprocessing

* Updated description generation to use str if Field not exist in Annotated

* Updated created server to use new description generation method and supply the generated description explicitly

* Fixed wrong common mistakes file location

* AI: fix tests

* Added min_length=1 for list arguments, added batch_query key field checking

* Moved helper file and added docstrings fallback

---------

Co-authored-by: Francesco Carli <francesco.carli94@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…r message got hidden (#43)

* Return errors as ToolError to avoid error messages being hidden

* Removed key field check in individual query of batch query as a check has already been done before that in the beginning of the tool function.
…env variable for providing the serving URL in User-Agent value. (#45)
* Remove old test

* Added tool tests and GraphQL cassette

* Added settings test and invalid query tests

* Separated jq and no jq tests as two files

* Update README.md

* Added testing types in categories are up to date
@kpto kpto changed the title Enhance auto deployment, error handling, and testing framework Tool metadata coding pattern, error handling, auto versioning, User-Agent header, test overhaul May 7, 2026
@javfg
javfg self-requested a review June 9, 2026 15:34
@kpto
kpto merged commit 742f7ef into main Jun 15, 2026
1 check passed
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.

2 participants