Skip to content

Commit 35ae787

Browse files
committed
fixing a psycho error
1 parent c5b1fda commit 35ae787

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ classifiers = [
1818
"Programming Language :: Python :: 3.12",
1919
]
2020
dependencies = [
21-
"mcp==1.2.1",
21+
"mcp==1.4.1",
2222
"mcpcat-api==0.1.3",
2323
"pydantic>=2.0.0",
2424
]

tests/test_tool_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ async def test_original_functionality_preserved(self):
507507
# Complete a todo
508508
complete_result = await client.call_tool(
509509
"complete_todo",
510-
{"id": "1", "context": "Completing the first todo"}
510+
{"id": 1, "context": "Completing the first todo"}
511511
)
512512

513513
assert "Completed todo" in complete_result.content[0].text

tests/test_utils/todo_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class Todo:
1414
"""Todo item."""
1515

16-
def __init__(self, id: str, text: str, completed: bool = False):
16+
def __init__(self, id: int, text: str, completed: bool = False):
1717
self.id = id
1818
self.text = text
1919
self.completed = completed
@@ -33,7 +33,7 @@ def create_todo_server():
3333
def add_todo(text: str) -> str:
3434
"""Add a new todo item."""
3535
nonlocal next_id
36-
todo = Todo(str(next_id), text)
36+
todo = Todo(next_id, text)
3737
todos.append(todo)
3838
next_id += 1
3939
return f'Added todo: "{text}" with ID {todo.id}'
@@ -52,7 +52,7 @@ def list_todos() -> str:
5252
return "\n".join(todo_list)
5353

5454
@server.tool()
55-
def complete_todo(id: str) -> str:
55+
def complete_todo(id: int) -> str:
5656
"""Mark a todo item as completed."""
5757
for todo in todos:
5858
if todo.id == id:

0 commit comments

Comments
 (0)