mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-20 20:44:17 +02:00
back to original methods
This commit is contained in:
parent
ad107d258b
commit
697ea615ee
1 changed files with 14 additions and 8 deletions
|
|
@ -105,22 +105,28 @@ async def inspect_fastmcp_v2(mcp: FastMCP[Any]) -> FastMCPInfo:
|
|||
FastMCPInfo dataclass containing the extracted information
|
||||
"""
|
||||
# Get all components and apply server-level filtering
|
||||
all_tools = await mcp._tool_manager.list_tools()
|
||||
all_prompts = await mcp._prompt_manager.list_prompts()
|
||||
all_resources = await mcp._resource_manager.list_resources()
|
||||
all_templates = await mcp._resource_manager.list_resource_templates()
|
||||
all_tools = await mcp.get_tools()
|
||||
all_prompts = await mcp.get_prompts()
|
||||
all_resources = await mcp.get_resources()
|
||||
all_templates = await mcp.get_resource_templates()
|
||||
|
||||
# Filter components based on server's include_tags/exclude_tags
|
||||
tools_list = [tool for tool in all_tools if mcp._should_enable_component(tool)]
|
||||
tools_list = [
|
||||
tool for tool in all_tools.values() if mcp._should_enable_component(tool)
|
||||
]
|
||||
prompts_list = [
|
||||
prompt for prompt in all_prompts if mcp._should_enable_component(prompt)
|
||||
prompt
|
||||
for prompt in all_prompts.values()
|
||||
if mcp._should_enable_component(prompt)
|
||||
]
|
||||
resources_list = [
|
||||
resource for resource in all_resources if mcp._should_enable_component(resource)
|
||||
resource
|
||||
for resource in all_resources.values()
|
||||
if mcp._should_enable_component(resource)
|
||||
]
|
||||
templates_list = [
|
||||
template
|
||||
for template in all_templates
|
||||
for template in all_templates.values()
|
||||
if mcp._should_enable_component(template)
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue