Closed
Description
If the model to return by a tool is defined like:
class Foo(BaseModel):
field_first: str | None = Field(
default=None, alias="first", description="The first field."
)
field_second: str | None = Field(
default=None, alias="second", description="The second field."
)
In outputSchema
of tools/list
they will be displayed as "first" and "second".
At the same time model_dump
in
will produce the dump with "field_first" and "field_second".
To keep the schema and the tool response consistent, consider adding by_alias=True
to the call of model_dump
.