refactor: use snake case instead of camel case in types (#1894)
This commit is contained in:
parent
7080fcf1e6
commit
e94b386a13
3 changed files with 1063 additions and 1057 deletions
|
|
@ -21,7 +21,7 @@ async def list_tools() -> list[types.Tool]:
|
|||
types.Tool(
|
||||
name="advanced_tool",
|
||||
description="Tool with full control including _meta field",
|
||||
inputSchema={
|
||||
input_schema={
|
||||
"type": "object",
|
||||
"properties": {"message": {"type": "string"}},
|
||||
"required": ["message"],
|
||||
|
|
@ -37,7 +37,7 @@ async def handle_call_tool(name: str, arguments: dict[str, Any]) -> types.CallTo
|
|||
message = str(arguments.get("message", ""))
|
||||
return types.CallToolResult(
|
||||
content=[types.TextContent(type="text", text=f"Processed: {message}")],
|
||||
structuredContent={"result": "success", "message": message},
|
||||
structured_content={"result": "success", "message": message},
|
||||
_meta={"hidden": "data for client applications only"},
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|||
types.Tool(
|
||||
name="query_db",
|
||||
description="Query the database",
|
||||
inputSchema={
|
||||
input_schema={
|
||||
"type": "object",
|
||||
"properties": {"query": {"type": "string", "description": "SQL query to execute"}},
|
||||
"required": ["query"],
|
||||
|
|
|
|||
|
|
@ -21,12 +21,12 @@ async def list_tools() -> list[types.Tool]:
|
|||
types.Tool(
|
||||
name="get_weather",
|
||||
description="Get current weather for a city",
|
||||
inputSchema={
|
||||
input_schema={
|
||||
"type": "object",
|
||||
"properties": {"city": {"type": "string", "description": "City name"}},
|
||||
"required": ["city"],
|
||||
},
|
||||
outputSchema={
|
||||
output_schema={
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"temperature": {"type": "number", "description": "Temperature in Celsius"},
|
||||
|
|
|
|||
Loading…
Reference in a new issue