Problem
The AnophelesDescribe class is limited to listing public API methods with their descriptions, and lacks introspection of method parameters, including names, types, default values, and descriptions. This makes it hard to understand how to use a method correctly without reading the API documentation or its docstring manually, and especially difficult for automated tools or AI agents that need a structured view of parameter metadata.
Current Solution
Executing describe_api only returns a dataframe containing method names, a short summary description, and their category. Example:
poetry run python -c "import malariagen_data; \
ag3 = malariagen_data.Ag3(); \
df = ag3.describe_api(); \
print(df.head(1));"
Output:
| method |
summary |
category |
| aa_allele_frequencies |
Compute amino acid substitution frequencies for... |
analysis |
Proposed Solution
Adding a describe_method in the AnophelesDescribe class that allows users to input an existing API method name, then get a data structure containing this method's parameters, types, defaults, and a short description for each parameter. This structured output improves programmatic discovery of the API, enables interactive exploration of the possible arguments of available methods, and opens the way for supporting tooling and agents.
Example:
poetry run python -c "import malariagen_data; \
ag3 = malariagen_data.Ag3(); \
df = ag3.describe_method('aa_allele_frequencies'); \
print(df.head(1));"
Output:
| parameter |
type |
default |
description |
| transcript |
str |
None |
Gene transcript identifier. |
Problem
The AnophelesDescribe class is limited to listing public API methods with their descriptions, and lacks introspection of method parameters, including names, types, default values, and descriptions. This makes it hard to understand how to use a method correctly without reading the API documentation or its docstring manually, and especially difficult for automated tools or AI agents that need a structured view of parameter metadata.
Current Solution
Executing
describe_apionly returns a dataframe containing method names, a short summary description, and their category. Example:Output:
Proposed Solution
Adding a
describe_methodin the AnophelesDescribe class that allows users to input an existing API method name, then get a data structure containing this method's parameters, types, defaults, and a short description for each parameter. This structured output improves programmatic discovery of the API, enables interactive exploration of the possible arguments of available methods, and opens the way for supporting tooling and agents.Example:
Output: