> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# mysql

> MySQL database queries and schema management

**Server path:** `/mysql` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                            | Description                                                                                                                                                             |
| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`mysql_get_info`](#mysql_get_info)             | Get MySQL database connection information                                                                                                                               |
| [`mysql_list_databases`](#mysql_list_databases) | List all databases on the MySQL server                                                                                                                                  |
| [`mysql_execute_query`](#mysql_execute_query)   | Execute a SQL query on MySQL. Use ? placeholders for parameterized queries (e.g., "SELECT \* FROM users WHERE id = ? AND status = ?"). Parameters are applied in order. |
| [`mysql_select_data`](#mysql_select_data)       | Select data from a MySQL table. Use ? placeholders in where with whereParams for safe parameterization.                                                                 |
| [`mysql_insert_data`](#mysql_insert_data)       | Insert data into a MySQL table                                                                                                                                          |
| [`mysql_update_data`](#mysql_update_data)       | Update data in a MySQL table. Use ? placeholders in where with whereParams for safe parameterization.                                                                   |
| [`mysql_delete_data`](#mysql_delete_data)       | Delete data from a MySQL table. Use ? placeholders in where with whereParams for safe parameterization.                                                                 |
| [`mysql_describe_table`](#mysql_describe_table) | Get table structure and column information                                                                                                                              |
| [`mysql_list_tables`](#mysql_list_tables)       | List all tables in the database                                                                                                                                         |
| [`mysql_create_table`](#mysql_create_table)     | Create a new table in MySQL                                                                                                                                             |

***

## mysql\_get\_info

Get MySQL database connection information

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## mysql\_list\_databases

List all databases on the MySQL server

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## mysql\_execute\_query

Execute a SQL query on MySQL. Use ? placeholders for parameterized queries (e.g., "SELECT \* FROM users WHERE id = ? AND status = ?"). Parameters are applied in order.

**Parameters:**

| Parameter    | Type      | Required | Default | Description                                                                                                |
| ------------ | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------- |
| `query`      | string    | Yes      | —       | The SQL query to execute. Use ? as placeholders for parameters (e.g., "SELECT \* FROM users WHERE id = ?") |
| `parameters` | string\[] | No       | —       | Array of parameter values to substitute for ? placeholders in order                                        |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "query": {
        "type": "string",
        "description": "The SQL query to execute. Use ? as placeholders for parameters (e.g., \"SELECT * FROM users WHERE id = ?\")"
      },
      "parameters": {
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": "Array of parameter values to substitute for ? placeholders in order"
      }
    },
    "required": [
      "PCID",
      "query"
    ]
  }
  ```
</Expandable>

***

## mysql\_select\_data

Select data from a MySQL table. Use ? placeholders in where with whereParams for safe parameterization.

**Parameters:**

| Parameter     | Type      | Required | Default | Description                                              |
| ------------- | --------- | -------- | ------- | -------------------------------------------------------- |
| `table`       | string    | Yes      | —       | Table name                                               |
| `columns`     | string\[] | No       | —       | Columns to select (defaults to all)                      |
| `where`       | string    | No       | —       | WHERE clause conditions (use ? for parameterized values) |
| `whereParams` | string\[] | No       | —       | Parameters for WHERE clause ? placeholders               |
| `orderBy`     | string    | No       | —       | ORDER BY clause                                          |
| `limit`       | number    | No       | —       | LIMIT number of results                                  |
| `offset`      | number    | No       | —       | OFFSET for pagination                                    |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "table": {
        "type": "string",
        "description": "Table name"
      },
      "columns": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Columns to select (defaults to all)"
      },
      "where": {
        "type": "string",
        "description": "WHERE clause conditions (use ? for parameterized values)"
      },
      "whereParams": {
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": "Parameters for WHERE clause ? placeholders"
      },
      "orderBy": {
        "type": "string",
        "description": "ORDER BY clause"
      },
      "limit": {
        "type": "number",
        "description": "LIMIT number of results"
      },
      "offset": {
        "type": "number",
        "description": "OFFSET for pagination"
      }
    },
    "required": [
      "PCID",
      "table"
    ]
  }
  ```
</Expandable>

***

## mysql\_insert\_data

Insert data into a MySQL table

**Parameters:**

| Parameter           | Type    | Required | Default | Description                                                                             |
| ------------------- | ------- | -------- | ------- | --------------------------------------------------------------------------------------- |
| `table`             | string  | Yes      | —       | Table name                                                                              |
| `data`              | object  | Yes      | —       | Data to insert as key-value pairs (supports nested objects and arrays for JSON columns) |
| `onDuplicateUpdate` | boolean | No       | `false` | Use ON DUPLICATE KEY UPDATE                                                             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "table": {
        "type": "string",
        "description": "Table name"
      },
      "data": {
        "type": "object",
        "additionalProperties": true,
        "description": "Data to insert as key-value pairs (supports nested objects and arrays for JSON columns)"
      },
      "onDuplicateUpdate": {
        "type": "boolean",
        "default": false,
        "description": "Use ON DUPLICATE KEY UPDATE"
      }
    },
    "required": [
      "PCID",
      "table",
      "data"
    ]
  }
  ```
</Expandable>

***

## mysql\_update\_data

Update data in a MySQL table. Use ? placeholders in where with whereParams for safe parameterization.

**Parameters:**

| Parameter     | Type      | Required | Default | Description                                                                             |
| ------------- | --------- | -------- | ------- | --------------------------------------------------------------------------------------- |
| `table`       | string    | Yes      | —       | Table name                                                                              |
| `data`        | object    | Yes      | —       | Data to update as key-value pairs (supports nested objects and arrays for JSON columns) |
| `where`       | string    | Yes      | —       | WHERE clause to identify rows to update (use ? for parameterized values)                |
| `whereParams` | string\[] | No       | —       | Parameters for WHERE clause ? placeholders                                              |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "table": {
        "type": "string",
        "description": "Table name"
      },
      "data": {
        "type": "object",
        "additionalProperties": true,
        "description": "Data to update as key-value pairs (supports nested objects and arrays for JSON columns)"
      },
      "where": {
        "type": "string",
        "description": "WHERE clause to identify rows to update (use ? for parameterized values)"
      },
      "whereParams": {
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": "Parameters for WHERE clause ? placeholders"
      }
    },
    "required": [
      "PCID",
      "table",
      "data",
      "where"
    ]
  }
  ```
</Expandable>

***

## mysql\_delete\_data

Delete data from a MySQL table. Use ? placeholders in where with whereParams for safe parameterization.

**Parameters:**

| Parameter     | Type      | Required | Default | Description                                                              |
| ------------- | --------- | -------- | ------- | ------------------------------------------------------------------------ |
| `table`       | string    | Yes      | —       | Table name                                                               |
| `where`       | string    | Yes      | —       | WHERE clause to identify rows to delete (use ? for parameterized values) |
| `whereParams` | string\[] | No       | —       | Parameters for WHERE clause ? placeholders                               |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "table": {
        "type": "string",
        "description": "Table name"
      },
      "where": {
        "type": "string",
        "description": "WHERE clause to identify rows to delete (use ? for parameterized values)"
      },
      "whereParams": {
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": "Parameters for WHERE clause ? placeholders"
      }
    },
    "required": [
      "PCID",
      "table",
      "where"
    ]
  }
  ```
</Expandable>

***

## mysql\_describe\_table

Get table structure and column information

**Parameters:**

| Parameter | Type   | Required | Default | Description            |
| --------- | ------ | -------- | ------- | ---------------------- |
| `table`   | string | Yes      | —       | Table name to describe |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "table": {
        "type": "string",
        "description": "Table name to describe"
      }
    },
    "required": [
      "PCID",
      "table"
    ]
  }
  ```
</Expandable>

***

## mysql\_list\_tables

List all tables in the database

**Parameters:**

| Parameter  | Type   | Required | Default | Description                                           |
| ---------- | ------ | -------- | ------- | ----------------------------------------------------- |
| `database` | string | No       | —       | Specific database name (uses default if not provided) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "database": {
        "type": "string",
        "description": "Specific database name (uses default if not provided)"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## mysql\_create\_table

Create a new table in MySQL

**Parameters:**

| Parameter   | Type      | Required | Default | Description                 |
| ----------- | --------- | -------- | ------- | --------------------------- |
| `tableName` | string    | Yes      | —       | Name of the table to create |
| `columns`   | object\[] | Yes      | —       | Table column definitions    |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "tableName": {
        "type": "string",
        "description": "Name of the table to create"
      },
      "columns": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Column name"
            },
            "type": {
              "type": "string",
              "description": "Column data type (e.g., VARCHAR(255), INT, TEXT)"
            },
            "nullable": {
              "type": "boolean",
              "default": true,
              "description": "Whether column can be NULL"
            },
            "primaryKey": {
              "type": "boolean",
              "default": false,
              "description": "Whether column is primary key"
            },
            "autoIncrement": {
              "type": "boolean",
              "default": false,
              "description": "Whether column auto-increments"
            }
          }
        },
        "description": "Table column definitions"
      }
    },
    "required": [
      "PCID",
      "tableName",
      "columns"
    ]
  }
  ```
</Expandable>
