Skip to Content
MCPTool reference

Tool reference

Generated from the server’s own tool definitions when the docs are built, so it matches what tools/list returns. Tools marked Spends quota use your organization’s monthly tokens; the others are free.

Server teroai version 1.0.0 · 14 tools. A client sees only the tools its credential's scopes allow.

Server instructions

What the server tells every client when it connects.

TeroAI answers questions about US geospatial and census-style data. Start with ask_data_question; it returns a message_id that generate_chart, generate_map, generate_report, explain_sql and get_answer_rows work from, and a conversation_id for follow-ups.

Tools that call the AI spend the organization's monthly token quota and take seconds to minutes; the others are free.

Answers are AI-generated from TeroAI's datasets and may be inaccurate, incomplete or misleading. They are not professional advice. Verify important figures before relying on them; the SQL is returned so they can be checked.

Tools

ask_data_question · Ask a data question

data:querySpends quota

Answers a question about TeroAI's US geospatial and census-style datasets (demographics, economics, congressional districts, ZIP codes and similar) by writing and running SQL. Use it whenever the user wants figures, rankings, comparisons or lists that the data can answer; call list_data_schemas first if you are unsure a dataset covers the topic.

Returns a plain-language answer, the SQL, up to 50 result rows, the total row_count, and the conversation_id and message_id. When rows_truncated is true, page through the rest with get_answer_rows. Pass message_id to generate_chart, generate_map, generate_report or explain_sql to work with the answer.

Omit conversation_id to start a new conversation; pass it to ask a follow-up that builds on earlier answers. A conversation holds at most 10 questions; after that, call branch_conversation or start a new one. mode "analysis" reasons over answers already in the conversation instead of querying again, and needs conversation_id.

Takes 10 to 100 seconds. Spends the organization's monthly token quota.

Answers are AI-generated from TeroAI's datasets and may be inaccurate, incomplete or misleading. They are not professional advice. Verify important figures before relying on them; the SQL is returned so they can be checked.

Input

FieldTypeDescription
questionrequiredstringThe question, in plain language. Name places and time periods explicitly. 1 to 4000 characters.
conversation_idstringAsk a follow-up in this conversation. Omit to start a new conversation. 1 to 100 characters.
schemastringThe dataset to ask, by name from list_data_schemas, for a new conversation. Omit it to use the organization's default. A follow-up always uses its conversation's dataset; naming another fails with schema_mismatch. 1 to 200 characters.
mode"standard" | "analysis"standard (default) queries the data. analysis interprets earlier answers in the conversation.
Structured output
FieldTypeDescription
message_idrequiredstring
conversation_idrequiredstring
answerrequiredstring
sqlrequiredstring | null
rowsrequiredobject[]
row_countrequiredinteger
rows_truncatedrequiredboolean
geography_idsrequiredstring[]
execution_time_msrequirednumber | null
tokensrequiredobject
tokens.inputrequiredinteger
tokens.outputrequiredinteger
tokens.totalrequiredinteger
usagerequiredobject
usage.tokens_usedrequiredinteger
usage.token_limitrequiredinteger
usage.percent_usedrequirednumber
usage.resets_atrequiredstring | nullWhen the quota next resets, at 00:00 UTC. Null when it does not reset on a schedule, as during a trial.
disclaimerrequiredstring
Input JSON Schema
{
  "type": "object",
  "properties": {
    "question": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4000,
      "description": "The question, in plain language. Name places and time periods explicitly."
    },
    "conversation_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Ask a follow-up in this conversation. Omit to start a new conversation."
    },
    "schema": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "The dataset to ask, by name from list_data_schemas, for a new conversation. Omit it to use the organization's default. A follow-up always uses its conversation's dataset; naming another fails with schema_mismatch."
    },
    "mode": {
      "type": "string",
      "enum": [
        "standard",
        "analysis"
      ],
      "description": "standard (default) queries the data. analysis interprets earlier answers in the conversation."
    }
  },
  "required": [
    "question"
  ],
  "additionalProperties": false
}

list_data_schemas · List datasets

data:readFreeRead-onlyIdempotent

Lists the datasets (database schemas) the organization's TeroAI products cover, with their table and column counts. Datasets of products the organization does not have are not listed and cannot be asked. Use it to check that a topic is covered, or to find a schema name to pass to ask_data_question. Free: spends no quota.

Input

No arguments.

Structured output
FieldType
schemasrequiredobject[]
schemas[].namerequiredstring
schemas[].table_countrequiredinteger | null
schemas[].column_countrequiredinteger | null
Input JSON Schema
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

get_answer_rows · Get answer rows

conversations:readFreeRead-onlyIdempotent

Returns a page of the result rows of an earlier answer, by its message_id. Use it when ask_data_question reported rows_truncated, or to re-read rows of an answer from get_conversation. Free: spends no quota.

Input

FieldTypeDescription
message_idrequiredstringThe answer's message_id. 1 to 100 characters.
offsetintegerRows to skip. Default 0. at least 0, default 0.
limitintegerRows to return, 1 to 200. Default 50. 1 to 200, default 50.
Structured output
FieldType
rowsrequiredobject[]
totalrequiredinteger
limitrequiredinteger
offsetrequiredinteger
Input JSON Schema
{
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The answer's message_id."
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "description": "Rows to skip. Default 0."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 50,
      "description": "Rows to return, 1 to 200. Default 50."
    }
  },
  "required": [
    "message_id"
  ],
  "additionalProperties": false
}

explain_sql · Explain an answer's SQL

data:querySpends quotaRead-onlyIdempotent

Splits the SQL behind an answer into sections and explains each in plain language. Use it when the user wants to understand or check how an answer was computed. Takes a few seconds. Spends the organization's monthly token quota.

Input

FieldTypeDescription
message_idrequiredstringThe message_id of an answer from ask_data_question. 1 to 100 characters.
Structured output
FieldType
sqlrequiredstring
sectionsrequiredobject[]
sections[].sql_sectionrequiredstring
sections[].explanationrequiredstring
sections[].start_charrequiredinteger | null
sections[].end_charrequiredinteger | null
sections[].matchedrequiredboolean
input_tokensinteger
output_tokensinteger
total_tokensinteger
timestamprequiredstring
Input JSON Schema
{
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The message_id of an answer from ask_data_question."
    }
  },
  "required": [
    "message_id"
  ],
  "additionalProperties": false
}

generate_chart · Chart an answer

data:querySpends quotaRead-only

Chooses a chart for an answer's rows and returns its specification: chartType, the index column, the category columns and the data. It returns no image: render it yourself, for example as an artifact or with a charting library, or describe it. Works only on answers that returned rows. Spends the organization's monthly token quota.

Input

FieldTypeDescription
message_idrequiredstringThe message_id of an answer from ask_data_question. 1 to 100 characters.
Structured output
FieldType
chartTyperequiredstring
indexrequiredstring
categoriesrequiredstring[]
datarequiredobject[]
Input JSON Schema
{
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The message_id of an answer from ask_data_question."
    }
  },
  "required": [
    "message_id"
  ],
  "additionalProperties": false
}

generate_map · Map an answer

data:querySpends quotaRead-only

Draws a map of an answer's geographic rows, with the matching areas highlighted, and returns it as a PNG image 1200 pixels wide. Use it when an answer lists US congressional districts, the only geography it can draw today. Fails with a clear message when the rows have nothing it can draw. Not available for Site Selection (SSIS) answers. Spends the organization's monthly token quota.

Input

FieldTypeDescription
message_idrequiredstringThe message_id of an answer from ask_data_question. 1 to 100 characters.
Structured output
FieldType
message_idrequiredstring
mime_typerequired"image/png"
width_pxrequiredinteger
Input JSON Schema
{
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The message_id of an answer from ask_data_question."
    }
  },
  "required": [
    "message_id"
  ],
  "additionalProperties": false
}

generate_report · Write a report on an answer

data:querySpends quotaRead-only

Writes a report on an answer's rows: a title, a summary and sections, returned as markdown and as structured sections with the data. Use it when the user wants a write-up to share. Takes 10 to 60 seconds. Spends the organization's monthly token quota.

Input

FieldTypeDescription
message_idrequiredstringThe message_id of an answer from ask_data_question. 1 to 100 characters.
page_countintegerApproximate length in pages, 1 to 10. Default 1. 1 to 10, default 1.
Structured output
FieldType
titlerequiredstring
summaryrequiredstring
sectionsrequiredobject[]
sections[].headingrequiredstring
sections[].contentrequiredstring
datarequiredobject[]
metadatarequiredobject
metadata.queryrequiredstring
metadata.generatedAtrequiredstring
metadata.reportTyperequiredstring
markdownrequiredstring
Input JSON Schema
{
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The message_id of an answer from ask_data_question."
    },
    "page_count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10,
      "default": 1,
      "description": "Approximate length in pages, 1 to 10. Default 1."
    }
  },
  "required": [
    "message_id"
  ],
  "additionalProperties": false
}

list_conversations · List conversations

conversations:readFreeRead-onlyIdempotent

Lists the user's TeroAI conversations, most recently updated first, with titles and message counts. Use it to find an earlier conversation to continue or read. By default it lists only conversations started through the API or an assistant; set source to "app" or "all" when the user asks about conversations from the TeroAI web app. Free: spends no quota.

Input

FieldTypeDescription
limitinteger1 to 100. Default 20. 1 to 100, default 20.
offsetintegerConversations to skip. Default 0. at least 0, default 0.
source"api" | "mcp" | "app" | "all"Which conversations: "api", "mcp", "app" (the TeroAI web app) or "all". Default: api and mcp.
Structured output
FieldTypeDescription
conversationsrequiredobject[]
conversations[].conversation_idrequiredstring
conversations[].titlerequiredstring | null
conversations[].schemarequiredstring | null
conversations[].message_countrequiredinteger
conversations[].branched_fromrequiredstring | null
conversations[].sourcerequired"app" | "api" | "mcp"Where the conversation started: the TeroAI web app, the REST API, or an MCP client.
conversations[].created_atrequiredstring
conversations[].updated_atrequiredstring
totalrequiredinteger
limitrequiredinteger
offsetrequiredinteger
Input JSON Schema
{
  "type": "object",
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 20,
      "description": "1 to 100. Default 20."
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "description": "Conversations to skip. Default 0."
    },
    "source": {
      "type": "string",
      "enum": [
        "api",
        "mcp",
        "app",
        "all"
      ],
      "description": "Which conversations: \"api\", \"mcp\", \"app\" (the TeroAI web app) or \"all\". Default: api and mcp."
    }
  },
  "additionalProperties": false
}

get_conversation · Read a conversation

conversations:readFreeRead-onlyIdempotent

Returns a conversation and its questions and answers in order, with each answer's SQL and row_count but without the rows; read rows with get_answer_rows. Free: spends no quota.

Input

FieldTypeDescription
conversation_idrequiredstringThe conversation_id. 1 to 100 characters.
message_limitintegerMessages to return, from the start. 1 to 100. Default 50. 1 to 100, default 50.
Structured output
FieldTypeDescription
conversation_idrequiredstring
titlerequiredstring | null
schemarequiredstring | null
message_countrequiredinteger
branched_fromrequiredstring | null
sourcerequired"app" | "api" | "mcp"Where the conversation started: the TeroAI web app, the REST API, or an MCP client.
created_atrequiredstring
updated_atrequiredstring
messagesrequiredobject[]
messages[].message_idrequiredstring
messages[].rolerequired"user" | "assistant" | "system"
messages[].contentrequiredstring
messages[].sqlrequiredstring | null
messages[].row_countrequiredinteger | null
messages[].feedbackrequired"up" | "down" | null
messages[].created_atrequiredstring
messages_totalrequiredinteger
Input JSON Schema
{
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The conversation_id."
    },
    "message_limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 50,
      "description": "Messages to return, from the start. 1 to 100. Default 50."
    }
  },
  "required": [
    "conversation_id"
  ],
  "additionalProperties": false
}

rename_conversation · Rename a conversation

conversations:writeFreeIdempotent

Sets a conversation's title. Free: spends no quota.

Input

FieldTypeDescription
conversation_idrequiredstringThe conversation_id. 1 to 100 characters.
titlerequiredstringThe new title, up to 200 characters. 1 to 200 characters.
Structured output
FieldTypeDescription
conversation_idrequiredstring
titlerequiredstring | null
schemarequiredstring | null
message_countrequiredinteger
branched_fromrequiredstring | null
sourcerequired"app" | "api" | "mcp"Where the conversation started: the TeroAI web app, the REST API, or an MCP client.
created_atrequiredstring
updated_atrequiredstring
Input JSON Schema
{
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The conversation_id."
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "The new title, up to 200 characters."
    }
  },
  "required": [
    "conversation_id",
    "title"
  ],
  "additionalProperties": false
}

delete_conversation · Delete a conversation

conversations:writeFreeDestructiveIdempotent

Deletes a conversation and its branches. It disappears from the user's TeroAI account and cannot be restored through this server. Only call it when the user has clearly asked to delete that conversation. Free: spends no quota.

Input

FieldTypeDescription
conversation_idrequiredstringThe conversation_id. 1 to 100 characters.
Structured output
FieldType
conversation_idrequiredstring
deletedrequiredtrue
Input JSON Schema
{
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The conversation_id."
    }
  },
  "required": [
    "conversation_id"
  ],
  "additionalProperties": false
}

branch_conversation · Branch a conversation

conversations:writeFree

Copies a conversation into a new one, up to and including up_to_message_id if given, and returns the new conversation_id. The copy takes the parent's title unless title is given. Use it to keep asking once a conversation reaches its 10-question limit, or to explore a different follow-up from an earlier answer. Free: spends no quota.

Input

FieldTypeDescription
conversation_idrequiredstringThe conversation_id. 1 to 100 characters.
up_to_message_idstringCopy only up to this message. Omit to copy the whole conversation. 1 to 100 characters.
titlestringA title for the new conversation. Omit to keep the parent's title. 1 to 200 characters.
Structured output
FieldTypeDescription
conversation_idrequiredstring
titlerequiredstring | null
schemarequiredstring | null
message_countrequiredinteger
branched_fromrequiredstring | null
sourcerequired"app" | "api" | "mcp"Where the conversation started: the TeroAI web app, the REST API, or an MCP client.
created_atrequiredstring
updated_atrequiredstring
Input JSON Schema
{
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The conversation_id."
    },
    "up_to_message_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Copy only up to this message. Omit to copy the whole conversation."
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "A title for the new conversation. Omit to keep the parent's title."
    }
  },
  "required": [
    "conversation_id"
  ],
  "additionalProperties": false
}

rate_answer · Rate an answer

conversations:writeFreeIdempotent

Records the user's thumbs up or down on an answer, which helps TeroAI improve. null clears the rating. Only call it when the user gives that feedback. Free: spends no quota.

Input

FieldTypeDescription
message_idrequiredstringThe answer's message_id. 1 to 100 characters.
ratingrequired"up" | "down" | null"up", "down", or null to clear.
Structured output
FieldType
message_idrequiredstring
ratingrequired"up" | "down" | null
Input JSON Schema
{
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The answer's message_id."
    },
    "rating": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "up",
            "down"
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "\"up\", \"down\", or null to clear."
    }
  },
  "required": [
    "message_id",
    "rating"
  ],
  "additionalProperties": false
}

get_usage · Get quota usage

usage:readFreeRead-onlyIdempotent

Returns how many tokens the organization has used this period, its monthly limit, the percentage used, when it resets, its plan, and every limit that applies (limits: this week, this month, the user's own week on plans with a member limit, a trial's allowance, Site Selection analyses). Use it before a long series of questions, or when a tool reports that a limit is used up. Free: spends no quota.

Input

No arguments.

Structured output
FieldTypeDescription
tokens_usedrequiredinteger
token_limitrequiredinteger
percent_usedrequirednumber
resets_atrequiredstring | nullWhen the quota next resets, at 00:00 UTC. Null when it does not reset on a schedule, as during a trial.
planrequiredstring | null
limitsrequiredobject[]Every limit that applies to the organization. A request is refused with token_limit_exceeded when any token limit is used up.
limits[].scoperequired"member_week" | "week" | "month" | "trial" | "runs"What the limit counts: tokens this week (week), this usage month (month), the credential's user this week (member_week), a trial's whole allowance (trial), or Site Selection analyses (runs).
limits[].usedrequiredinteger
limits[].limitrequiredinteger
limits[].resets_atrequiredstring | nullWhen the counter next resets. Weeks start Tuesday 07:00 America/New_York. Null when it does not reset, as during a trial.
limits[].ends_atstring | nullTrial only: when the trial ends.
Input JSON Schema
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
Last updated on