create_table
Generate a new table in the SQLite database by executing a CREATE TABLE SQL statement, enabling structured data storage for variance analysis in conversation logs.
Instructions
Create a new table in the SQLite database
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | CREATE TABLE SQL statement |
Implementation Reference
- src/mcp_variance_log/server.py:377-381 (handler)Handler function for the 'create_table' tool. Validates that the input query starts with 'CREATE TABLE', executes it using the database utility, and returns a success message.elif name == "create_table": if not arguments["query"].strip().upper().startswith("CREATE TABLE"): raise ValueError("Only CREATE TABLE statements are allowed") db._execute_query(arguments["query"]) return [types.TextContent(type="text", text="Table created successfully")]
- src/mcp_variance_log/server.py:198-208 (registration)Registration of the 'create_table' tool in the list_tools handler, including its description and input schema for validation.types.Tool( name="create_table", description="Create a new table in the SQLite database", inputSchema={ "type": "object", "properties": { "query": {"type": "string", "description": "CREATE TABLE SQL statement"}, }, "required": ["query"], }, ),