Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions litellm/proxy/_experimental/mcp_server/mcp_server_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,14 @@
validate_tool_name,
)
except ImportError:
from typing import Any
from pydantic import BaseModel
SEP_986_URL = "https://github.com/modelcontextprotocol/protocol/blob/main/proposals/0001-tool-name-validation.md"

def validate_tool_name(name: str) -> Any:
from pydantic import BaseModel

class ToolNameValidationResult(BaseModel):
is_valid: bool = True
warnings: list = []
class ToolNameValidationResult(BaseModel):
is_valid: bool = True
warnings: list = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warnings: list should use List from typing imports for proper type checking

Suggested change
warnings: list = []
warnings: List = []

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: litellm/proxy/_experimental/mcp_server/mcp_server_manager.py
Line: 78:78

Comment:
`warnings: list` should use `List` from typing imports for proper type checking

```suggestion
        warnings: List = []
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.


def validate_tool_name(name: str) -> ToolNameValidationResult:
return ToolNameValidationResult()


Expand Down
12 changes: 5 additions & 7 deletions litellm/proxy/management_endpoints/mcp_management_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,13 @@
validate_tool_name,
)
except ImportError:
from typing import Any
from pydantic import BaseModel

def validate_tool_name(name: str) -> Any:
from pydantic import BaseModel

class ToolNameValidationResult(BaseModel):
is_valid: bool = True
warnings: list = []
class ToolNameValidationResult(BaseModel):
is_valid: bool = True
warnings: list = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warnings: list should use List from typing imports for proper type checking

Suggested change
warnings: list = []
warnings: List = []

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: litellm/proxy/management_endpoints/mcp_management_endpoints.py
Line: 70:70

Comment:
`warnings: list` should use `List` from typing imports for proper type checking

```suggestion
            warnings: List = []
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.


def validate_tool_name(name: str) -> ToolNameValidationResult:
return ToolNameValidationResult()

from litellm.proxy._experimental.mcp_server.db import (
Expand Down
Loading