Add mcp.types as a permanent alias for mcp_types (#3190)
This commit is contained in:
parent
923341c98a
commit
b7c9a916d6
6 changed files with 467 additions and 364 deletions
|
|
@ -1,4 +1,5 @@
|
|||
from mcp_types import (
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
from mcp.types import (
|
||||
CallToolRequestParams,
|
||||
CallToolResult,
|
||||
ListToolsResult,
|
||||
|
|
@ -7,8 +8,6 @@ from mcp_types import (
|
|||
Tool,
|
||||
)
|
||||
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
|
||||
SEARCH_BOOKS = Tool(
|
||||
name="search_books",
|
||||
description="Search the catalog by title or author.",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from mcp_types import (
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
from mcp.types import (
|
||||
CallToolRequestParams,
|
||||
CallToolResult,
|
||||
ListToolsResult,
|
||||
|
|
@ -7,8 +8,6 @@ from mcp_types import (
|
|||
Tool,
|
||||
)
|
||||
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
|
||||
SEARCH_BOOKS = Tool(
|
||||
name="search_books",
|
||||
description="Search the catalog by title or author.",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from mcp_types import (
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
from mcp.types import (
|
||||
CallToolRequestParams,
|
||||
CallToolResult,
|
||||
ListToolsResult,
|
||||
|
|
@ -7,8 +8,6 @@ from mcp_types import (
|
|||
Tool,
|
||||
)
|
||||
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
|
||||
SEARCH_BOOKS = Tool(
|
||||
name="search_books",
|
||||
description="Search the catalog by title or author.",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from mcp_types import (
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
from mcp.types import (
|
||||
CallToolRequestParams,
|
||||
CallToolResult,
|
||||
ListToolsResult,
|
||||
|
|
@ -7,8 +8,6 @@ from mcp_types import (
|
|||
Tool,
|
||||
)
|
||||
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
|
||||
SEARCH_BOOKS = Tool(
|
||||
name="search_books",
|
||||
description="Search the catalog by title or author.",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ from collections.abc import AsyncIterator
|
|||
from contextlib import asynccontextmanager
|
||||
from dataclasses import dataclass
|
||||
|
||||
from mcp_types import (
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
from mcp.types import (
|
||||
CallToolRequestParams,
|
||||
CallToolResult,
|
||||
ListToolsResult,
|
||||
|
|
@ -11,8 +12,6 @@ from mcp_types import (
|
|||
Tool,
|
||||
)
|
||||
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
|
||||
|
||||
@dataclass
|
||||
class Catalog:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
from mcp_types import (
|
||||
from pydantic import BaseModel
|
||||
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
from mcp.types import (
|
||||
CallToolRequestParams,
|
||||
CallToolResult,
|
||||
ListToolsResult,
|
||||
|
|
@ -7,9 +10,6 @@ from mcp_types import (
|
|||
TextContent,
|
||||
Tool,
|
||||
)
|
||||
from pydantic import BaseModel
|
||||
|
||||
from mcp.server import Server, ServerRequestContext
|
||||
|
||||
SEARCH_BOOKS = Tool(
|
||||
name="search_books",
|
||||
|
|
|
|||
Loading…
Reference in a new issue