Skip to main content
Glama

MSSQL MCP Server

by EvilPhatBoi

insert_data

Inserts single or multiple records into an MSSQL database table using the SQL INSERT VALUES clause. Ensures column names and data types match the target table structure.

Instructions

Inserts data into an MSSQL Database table. Supports both single record insertion and multiple record insertion using standard SQL INSERT with VALUES clause. FORMAT EXAMPLES: Single Record Insert: { "tableName": "Users", "data": { "name": "John Doe", "email": "john@example.com", "age": 30, "isActive": true, "createdDate": "2023-01-15" } } Multiple Records Insert: { "tableName": "Users", "data": [ { "name": "John Doe", "email": "john@example.com", "age": 30, "isActive": true, "createdDate": "2023-01-15" }, { "name": "Jane Smith", "email": "jane@example.com", "age": 25, "isActive": false, "createdDate": "2023-01-16" } ] } GENERATED SQL FORMAT:

  • Single: INSERT INTO table (col1, col2) VALUES (@param1, @param2)
  • Multiple: INSERT INTO table (col1, col2) VALUES (@param1, @param2), (@param3, @param4), ... IMPORTANT RULES:
  • For single record: Use a single object for the 'data' field
  • For multiple records: Use an array of objects for the 'data' field
  • All objects in array must have identical column names
  • Column names must match the actual database table columns exactly
  • Values should match the expected data types (string, number, boolean, date)
  • Use proper date format for date columns (YYYY-MM-DD or ISO format)

Input Schema

NameRequiredDescriptionDefault
dataYes
tableNameYesName of the table to insert data into

Input Schema (JSON Schema)

{ "properties": { "data": { "oneOf": [ { "description": "Single record data object with column names as keys and values as the data to insert. Example: {\"name\": \"John\", \"age\": 30}", "type": "object" }, { "description": "Array of data objects for multiple record insertion. Each object must have identical column structure. Example: [{\"name\": \"John\", \"age\": 30}, {\"name\": \"Jane\", \"age\": 25}]", "items": { "type": "object" }, "type": "array" } ] }, "tableName": { "description": "Name of the table to insert data into", "type": "string" } }, "required": [ "tableName", "data" ], "type": "object" }
Install Server

Other Tools from MSSQL MCP Server

Related Tools

    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/EvilPhatBoi/McpSqlServer'

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