mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-08-19 09:30:21 +00:00
chore(lighthouse): change wording in new MCP Server class
This commit is contained in:
@@ -10,15 +10,10 @@ from prowler_mcp_server.lib.errors import tool_errors
|
||||
class ProwlerMCP(FastMCP):
|
||||
"""A FastMCP server whose tools all report failures the same way.
|
||||
|
||||
`FastMCP.tool()` is the single funnel every registration goes through -- the
|
||||
`FastMCP.tool()` is the single funnel every registration goes through, the
|
||||
`@server.tool()` and bare `@server.tool` decorator forms, and the direct
|
||||
`mcp.tool(fn)` call `BaseTool` uses to auto-register -- so applying
|
||||
`mcp.tool(fn)` call `BaseTool` uses to auto-register, so applying
|
||||
`tool_errors` here covers all of them at once.
|
||||
|
||||
It is applied here rather than by hand because forgetting it is silent and
|
||||
expensive: every server sets `mask_error_details=True`, so an unwrapped tool
|
||||
answers `Error calling tool 'x'` and nothing else. Nothing about the tool looks
|
||||
wrong, and the schema, the name and the description are all still correct.
|
||||
"""
|
||||
|
||||
def tool(self, name_or_fn: Any = None, **kwargs: Any) -> Any:
|
||||
|
||||
Reference in New Issue
Block a user