append_insight
Add data insights discovered from analysis to the memo for tracking and reference in Snowflake operations.
Instructions
Add a data insight to the memo
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| insight | Yes | Data insight discovered from analysis |
Implementation Reference
- The handler function that executes the append_insight tool logic. It validates the input, adds the insight to the database memo using db.add_insight, notifies the session of a resource update for the insights 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")]
- Input schema definition for the append_insight tool, specifying an object with a required 'insight' string property.input_schema={ "type": "object", "properties": { "insight": { "type": "string", "description": "Data insight discovered from analysis", } }, "required": ["insight"], },
- src/mcp_snowflake_server/server.py:445-460 (registration)Registers the append_insight tool in the all_tools list, including its name, description, input schema, 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"], ),