English
Reference
MCP Tools Reference

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

ToolDefault nameFunctionRisk level
get_data_schemaget_data_schemaGet the data structure🟢 Read-only
get_all_dataget_all_dataRead all data🟢 Read-only
query_dataquery_dataQuery with conditional filters🟢 Read-only
previewpreview_dataQuickly preview part of the data🟢 Read-only
selectselect_dataReturn specific fields🟢 Read-only
createcreate_elementCreate a new item🟡 Write
updateupdate_elementModify an existing item🟡 Write
deletedelete_elementDelete 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:

ParameterTypeDescription
filterobjectFilter conditions, see syntax below
limitnumberMaximum number of rows to return
offsetnumberSkip 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:

ParameterTypeDescription
limitnumberNumber 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:

ParameterTypeDescription
fieldsstring[]Field names to return
filterobjectOptional, 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:

ParameterTypeDescription
dataobjectThe data object to create
pathstringOptional, 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:

ParameterTypeDescription
filterobjectUsed to locate the items to update, same syntax as query_data
dataobjectFields 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:

ParameterTypeDescription
filterobjectUsed 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"
    }
  }
}