Skip to main content
Glama
isaacgounton

SQLite MCP Server

create_table

Create a new table in a SQLite database by providing a full CREATE TABLE SQL statement.

Instructions

Create a new table in the database with a full CREATE TABLE SQL statement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesCREATE TABLE SQL statement

Implementation Reference

  • src/index.ts:221-231 (registration)
    Tool registration for 'create_table' in ListToolsRequestSchema handler. Defines the tool name, description, and input schema expecting a 'query' string parameter.
    {
      name: 'create_table',
      description: 'Create a new table in the database with a full CREATE TABLE SQL statement.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          query: { type: 'string', description: 'CREATE TABLE SQL statement' },
        },
        required: ['query'],
      },
    },
  • Input schema for create_table: accepts a single required 'query' string parameter containing the CREATE TABLE SQL statement.
      inputSchema: {
        type: 'object' as const,
        properties: {
          query: { type: 'string', description: 'CREATE TABLE SQL statement' },
        },
        required: ['query'],
      },
    },
  • Handler for the 'create_table' tool: extracts the query parameter, validates it is a CREATE TABLE statement, executes it via db.run(), and returns a success message.
    case 'create_table': {
      const { query } = toolArgs as { query: string };
      validateCreateTableQuery(query);
      db.run(query);
      return { content: [{ type: 'text', text: 'Table created successfully' }] };
    }
  • Validation helper that ensures the query string starts with 'create table' (case-insensitive), throwing an InvalidParams error otherwise.
    function validateCreateTableQuery(query: string): void {
      const normalized = query.trim().toLowerCase();
      if (!normalized.startsWith('create table')) {
        throw new McpError(ErrorCode.InvalidParams, 'Query must be a CREATE TABLE statement');
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It fails to mention side effects (e.g., if table exists), permission requirements, or that it modifies state, which is critical for a write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single efficient sentence with no wasted words, though minor expansion for behavioral details would improve it without harming conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with no output schema, the description covers the essential purpose but lacks details on error handling, permission requirements, or SQL dialect support.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes the 'query' parameter fully. The description adds the word 'full', implying a complete statement, but no additional meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'create', the resource 'table', and specifies it uses a full CREATE TABLE SQL statement, effectively distinguishing it from sibling tools like drop_table or list_tables.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for creating a table but provides no explicit guidance on when to use this tool versus alternatives like write_query, nor when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/isaacgounton/sqlite-mcp-server'

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