INNER CODE UNIT · Python

tool

concierge-hq/concierge · __init__.py:270

    def tool(self, **kwargs) -> Callable:
        """Register a tool. Delegates to underlying FastMCP.

        Example:
            @app.tool()
            def my_tool(arg: str) -> dict:
                return {"result": arg}
        """
        return self._server.tool(**kwargs)

    def _get_current_session_id(self) -> str:
        """Get current session ID from request context."""
        ctx = request_ctx.get()
        return ctx.request.headers.get("mcp-session-id")

    def get_state(self, key: str, default: Any = None) -> Any:
        """Get a value from session-aware state."""
        session_id = self._get_current_session_id()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…