Skip to main content
Glama
isaacwasserman

mcp-snowflake-server

append_insight

Add data insights discovered from analysis to track findings in Snowflake integration.

Instructions

Add a data insight to the memo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
insightYesData insight discovered from analysis

Implementation Reference

  • The main handler function for the 'append_insight' tool. It validates the input arguments, adds the insight to the SnowflakeDB instance, sends a resource update notification for the memo, and returns a confirmation message.
    async def handle_append_insight(arguments, db, _, __, server, exclude_json_results=False):
        if not arguments or "insight" not in arguments:
            raise ValueError("Missing insight argument")
    
        db.add_insight(arguments["insight"])
        await server.request_context.session.send_resource_updated(AnyUrl("memo://insights"))
        return [types.TextContent(type="text", text="Insight added to memo")]
  • Registration of the 'append_insight' tool in the all_tools list. Includes the tool name, description, input schema definition, handler reference, and tags.
    Tool(
        name="append_insight",
        description="Add a data insight to the memo",
        input_schema={
            "type": "object",
            "properties": {
                "insight": {
                    "type": "string",
                    "description": "Data insight discovered from analysis",
                }
            },
            "required": ["insight"],
        },
        handler=handle_append_insight,
        tags=["resource_based"],
    ),
  • Helper method in the SnowflakeDB class that appends the provided insight string to the internal list of insights, which powers the memo resource.
    def add_insight(self, insight: str) -> None:
        """Add a new insight to the collection"""
        self.insights.append(insight)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/isaacwasserman/mcp-snowflake-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server