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
| Field | Type | Description |
|---|---|---|
questionrequired | string | The question, in plain language. Name places and time periods explicitly. 1 to 4000 characters. |
conversation_id | string | Ask a follow-up in this conversation. Omit to start a new conversation. 1 to 100 characters. |
schema | string | 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. 1 to 200 characters. |
mode | "standard" | "analysis" | standard (default) queries the data. analysis interprets earlier answers in the conversation. |
Structured output
| Field | Type | Description |
|---|---|---|
message_idrequired | string | |
conversation_idrequired | string | |
answerrequired | string | |
sqlrequired | string | null | |
rowsrequired | object[] | |
row_countrequired | integer | |
rows_truncatedrequired | boolean | |
geography_idsrequired | string[] | |
execution_time_msrequired | number | null | |
tokensrequired | object | |
tokens.inputrequired | integer | |
tokens.outputrequired | integer | |
tokens.totalrequired | integer | |
usagerequired | object | |
usage.tokens_usedrequired | integer | |
usage.token_limitrequired | integer | |
usage.percent_usedrequired | number | |
usage.resets_atrequired | string | null | When the quota next resets, at 00:00 UTC. Null when it does not reset on a schedule, as during a trial. |
disclaimerrequired | string |
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
| Field | Type |
|---|---|
schemasrequired | object[] |
schemas[].namerequired | string |
schemas[].table_countrequired | integer | null |
schemas[].column_countrequired | integer | 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
| Field | Type | Description |
|---|---|---|
message_idrequired | string | The answer's message_id. 1 to 100 characters. |
offset | integer | Rows to skip. Default 0. at least 0, default 0. |
limit | integer | Rows to return, 1 to 200. Default 50. 1 to 200, default 50. |
Structured output
| Field | Type |
|---|---|
rowsrequired | object[] |
totalrequired | integer |
limitrequired | integer |
offsetrequired | integer |
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
| Field | Type | Description |
|---|---|---|
message_idrequired | string | The message_id of an answer from ask_data_question. 1 to 100 characters. |
Structured output
| Field | Type |
|---|---|
sqlrequired | string |
sectionsrequired | object[] |
sections[].sql_sectionrequired | string |
sections[].explanationrequired | string |
sections[].start_charrequired | integer | null |
sections[].end_charrequired | integer | null |
sections[].matchedrequired | boolean |
input_tokens | integer |
output_tokens | integer |
total_tokens | integer |
timestamprequired | string |
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
| Field | Type | Description |
|---|---|---|
message_idrequired | string | The message_id of an answer from ask_data_question. 1 to 100 characters. |
Structured output
| Field | Type |
|---|---|
chartTyperequired | string |
indexrequired | string |
categoriesrequired | string[] |
datarequired | object[] |
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
| Field | Type | Description |
|---|---|---|
message_idrequired | string | The message_id of an answer from ask_data_question. 1 to 100 characters. |
Structured output
| Field | Type |
|---|---|
message_idrequired | string |
mime_typerequired | "image/png" |
width_pxrequired | integer |
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
| Field | Type | Description |
|---|---|---|
message_idrequired | string | The message_id of an answer from ask_data_question. 1 to 100 characters. |
page_count | integer | Approximate length in pages, 1 to 10. Default 1. 1 to 10, default 1. |
Structured output
| Field | Type |
|---|---|
titlerequired | string |
summaryrequired | string |
sectionsrequired | object[] |
sections[].headingrequired | string |
sections[].contentrequired | string |
datarequired | object[] |
metadatarequired | object |
metadata.queryrequired | string |
metadata.generatedAtrequired | string |
metadata.reportTyperequired | string |
markdownrequired | string |
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
| Field | Type | Description |
|---|---|---|
limit | integer | 1 to 100. Default 20. 1 to 100, default 20. |
offset | integer | Conversations 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
| Field | Type | Description |
|---|---|---|
conversationsrequired | object[] | |
conversations[].conversation_idrequired | string | |
conversations[].titlerequired | string | null | |
conversations[].schemarequired | string | null | |
conversations[].message_countrequired | integer | |
conversations[].branched_fromrequired | string | null | |
conversations[].sourcerequired | "app" | "api" | "mcp" | Where the conversation started: the TeroAI web app, the REST API, or an MCP client. |
conversations[].created_atrequired | string | |
conversations[].updated_atrequired | string | |
totalrequired | integer | |
limitrequired | integer | |
offsetrequired | integer |
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
| Field | Type | Description |
|---|---|---|
conversation_idrequired | string | The conversation_id. 1 to 100 characters. |
message_limit | integer | Messages to return, from the start. 1 to 100. Default 50. 1 to 100, default 50. |
Structured output
| Field | Type | Description |
|---|---|---|
conversation_idrequired | string | |
titlerequired | string | null | |
schemarequired | string | null | |
message_countrequired | integer | |
branched_fromrequired | string | null | |
sourcerequired | "app" | "api" | "mcp" | Where the conversation started: the TeroAI web app, the REST API, or an MCP client. |
created_atrequired | string | |
updated_atrequired | string | |
messagesrequired | object[] | |
messages[].message_idrequired | string | |
messages[].rolerequired | "user" | "assistant" | "system" | |
messages[].contentrequired | string | |
messages[].sqlrequired | string | null | |
messages[].row_countrequired | integer | null | |
messages[].feedbackrequired | "up" | "down" | null | |
messages[].created_atrequired | string | |
messages_totalrequired | integer |
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
| Field | Type | Description |
|---|---|---|
conversation_idrequired | string | The conversation_id. 1 to 100 characters. |
titlerequired | string | The new title, up to 200 characters. 1 to 200 characters. |
Structured output
| Field | Type | Description |
|---|---|---|
conversation_idrequired | string | |
titlerequired | string | null | |
schemarequired | string | null | |
message_countrequired | integer | |
branched_fromrequired | string | null | |
sourcerequired | "app" | "api" | "mcp" | Where the conversation started: the TeroAI web app, the REST API, or an MCP client. |
created_atrequired | string | |
updated_atrequired | string |
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
| Field | Type | Description |
|---|---|---|
conversation_idrequired | string | The conversation_id. 1 to 100 characters. |
Structured output
| Field | Type |
|---|---|
conversation_idrequired | string |
deletedrequired | true |
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
| Field | Type | Description |
|---|---|---|
conversation_idrequired | string | The conversation_id. 1 to 100 characters. |
up_to_message_id | string | Copy only up to this message. Omit to copy the whole conversation. 1 to 100 characters. |
title | string | A title for the new conversation. Omit to keep the parent's title. 1 to 200 characters. |
Structured output
| Field | Type | Description |
|---|---|---|
conversation_idrequired | string | |
titlerequired | string | null | |
schemarequired | string | null | |
message_countrequired | integer | |
branched_fromrequired | string | null | |
sourcerequired | "app" | "api" | "mcp" | Where the conversation started: the TeroAI web app, the REST API, or an MCP client. |
created_atrequired | string | |
updated_atrequired | string |
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
| Field | Type | Description |
|---|---|---|
message_idrequired | string | The answer's message_id. 1 to 100 characters. |
ratingrequired | "up" | "down" | null | "up", "down", or null to clear. |
Structured output
| Field | Type |
|---|---|
message_idrequired | string |
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
| Field | Type | Description |
|---|---|---|
tokens_usedrequired | integer | |
token_limitrequired | integer | |
percent_usedrequired | number | |
resets_atrequired | string | null | When the quota next resets, at 00:00 UTC. Null when it does not reset on a schedule, as during a trial. |
planrequired | string | null | |
limitsrequired | object[] | 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[].usedrequired | integer | |
limits[].limitrequired | integer | |
limits[].resets_atrequired | string | null | When the counter next resets. Weeks start Tuesday 07:00 America/New_York. Null when it does not reset, as during a trial. |
limits[].ends_at | string | null | Trial only: when the trial ends. |
Input JSON Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}