MCP Tools Reference
Through MCP, agents can use the following tools to interact with the Context File System.
Availability for each tool is controlled by your File Level Security (FLS) configuration.
Tools overview
| Tool | Default name | Function | Risk level |
|---|---|---|---|
get_data_schema | get_data_schema | Get the data structure | 🟢 Read-only |
get_all_data | get_all_data | Read all data | 🟢 Read-only |
query_data | query_data | Query with conditional filters | 🟢 Read-only |
preview | preview_data | Quickly preview part of the data | 🟢 Read-only |
select | select_data | Return specific fields | 🟢 Read-only |
create | create_element | Create a new item | 🟡 Write |
update | update_element | Modify an existing item | 🟡 Write |
delete | delete_element | Delete an item | 🔴 Destructive |
Read-only tools
get_data_schema
Returns the current data structure so the agent can understand which fields exist and what their types are. Agents usually call this before querying.
Input parameters: None
Example response:
{
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"price": { "type": "number" },
"status": { "type": "string", "enum": ["active", "inactive"] }
}
}
}
}get_all_data
Returns the full dataset with no filtering. This is best for smaller datasets.
Input parameters: None
Example response:
[
{ "id": "1", "name": "Widget Pro", "price": 99.99 },
{ "id": "2", "name": "Widget Mini", "price": 59.99 }
]query_data
Runs a conditional query with support for filters, sorting, and limits.
Input parameters:
| Parameter | Type | Description |
|---|---|---|
filter | object | Filter conditions, see syntax below |
limit | number | Maximum number of rows to return |
offset | number | Skip the first N rows, for pagination |
Filter syntax:
// Equals
{ "status": { "$eq": "active" } }
// Greater than
{ "price": { "$gt": 50 } }
// Included in an array
{ "category": { "$in": ["electronics", "accessories"] } }
// Combined conditions, AND
{
"$and": [
{ "status": { "$eq": "active" } },
{ "price": { "$lt": 100 } }
]
}
// Combined conditions, OR
{
"$or": [
{ "priority": { "$eq": "urgent" } },
{ "priority": { "$eq": "high" } }
]
}Supported operators: $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin
preview
Quickly previews the first few records so the agent can understand the shape of the data without pulling everything.
Input parameters:
| Parameter | Type | Description |
|---|---|---|
limit | number | Number of preview rows, default is 5 |
select
Returns only specified fields, which reduces token usage when the dataset contains many fields but the agent only needs a few of them.
Input parameters:
| Parameter | Type | Description |
|---|---|---|
fields | string[] | Field names to return |
filter | object | Optional, same filter syntax as query_data |
Example:
{
"fields": ["id", "name", "price"],
"filter": { "status": { "$eq": "active" } }
}Write tools
Write tools must be explicitly enabled in FLS configuration before they can be used.
create
Creates a new item in the dataset.
Input parameters:
| Parameter | Type | Description |
|---|---|---|
data | object | The data object to create |
path | string | Optional, where to insert into the JSON structure |
Example:
{
"data": {
"name": "New Widget",
"price": 79.99,
"status": "active"
}
}update
Modifies fields on existing items.
Input parameters:
| Parameter | Type | Description |
|---|---|---|
filter | object | Used to locate the items to update, same syntax as query_data |
data | object | Fields and values to write |
Example:
{
"filter": { "id": { "$eq": "123" } },
"data": { "price": 89.99, "status": "active" }
}delete
Deletes items matching the filter. This action cannot be undone, so authorize it carefully.
Input parameters:
| Parameter | Type | Description |
|---|---|---|
filter | object | Used to locate the items to delete |
Example:
{
"filter": { "status": { "$eq": "archived" } }
}Customizing tool names
Default tool names such as create_element can be customized in MCP configuration so the agent gets clearer context:
{
"tools_definition": {
"create": {
"name": "add_product",
"description": "Add a new product to the catalog"
},
"query_data": {
"name": "search_products",
"description": "Search products by condition"
}
}
}