Skip to main content
Glama

write_query

Execute INSERT, UPDATE, or DELETE SQL queries to manage data in the MCP Variance Log database, enabling precise control over recorded statistical variations in conversation structure.

Instructions

Execute an INSERT, UPDATE, or DELETE query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNon-SELECT SQL query to execute

Implementation Reference

  • Handler logic for the 'write_query' tool: validates that the query is not a SELECT, executes it using db._execute_query, and returns the results.
    if name == "write_query": if arguments["query"].strip().upper().startswith("SELECT"): raise ValueError("SELECT queries are not allowed for write_query") results = db._execute_query(arguments["query"]) return [types.TextContent(type="text", text=str(results))]
  • Registration of the 'write_query' tool in the list_tools decorator, including name, description, and input schema.
    types.Tool( name="write_query", description="Execute an INSERT, UPDATE, or DELETE query", inputSchema={ "type": "object", "properties": { "query": { "type": "string", "description": "Non-SELECT SQL query to execute" } }, "required": ["query"] } ),
  • JSON schema for the 'write_query' tool input: requires a 'query' string parameter.
    inputSchema={ "type": "object", "properties": { "query": { "type": "string", "description": "Non-SELECT SQL query to execute" } }, "required": ["query"] }

Other Tools

Related Tools

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/truaxki/mcp-variance-log'

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