Endpoints: 28,729MCP servers: 18,413Payout addresses: 2,071Paid calls: 1,533Letters: 13Defects: 1,322counted just now
teppi

Server definition

Hash
sha256:27461ab9a87c7b0d9d5790cda9bdaac5ac410b6647081320dd219af0f09edcc6
What it is
What a remote MCP server returned when asked what it offers: 7 tools

The blob, as servednamed by its sha256

{ "instructions": "# Idescat MCP — Usage guidance\n\nTools to query the official statistics of Catalonia (Idescat): list of statistics, tables and data in JSON-stat format.\n\n---\n\n## 1. Choosing a statistic\n\nAlways start with `get_idescat_stats` to locate the statistic. For each one, check two key fields before choosing:\n- `datasets` (boolean): if `true` the statistic is normalized and you can use the rest of the tools (`get_idescat_stat_tables`, `get_table_metadata`, `get_table_data`, `get_table_geo`, `render_table`). If `false`, ONLY `get_idescat_stats` and `get_idescat_stat` are available.\n- `geo` (array): available territorial breakdown levels (`cat`=Catalonia, `prov`=provinces, `at`=territorial plan areas, `com`=comarques and Aran, `mun`=municipalities, `dis`=districts, `sec`=census tracts). ALWAYS check `geo` before choosing a statistic for a territorial query: if comarca-level data is requested, pick a statistic whose `geo` includes `com`.\n\n### Population figures\n\nWhen population data is requested there are several sources: the main and richest one is **CENSPH** (population and housing census, annual); for half-yearly estimates there is **EP** (population estimates, half-yearly); and there is also **PMH** (municipal population register, annual). By default use CENSPH (or EP for half-yearly data). NEVER use the PMH statistic for population data unless the user explicitly asks for it.\n\n---\n\n## 2. Data-retrieval flow\n\n1. When the user asks for specific data from a table, call `get_table_metadata` first. If the question is about a specific territory (comarca, municipality, province, area), pass the proper `geo` parameter (e.g. `geo='com'`, `geo='mun'`, `geo='prov'`); if you don't know the codes, call `get_table_geo`.\n2. Check the metadata `size` field: multiply all array elements. If the product exceeds 20,000, do not fetch the whole table; tell the user and offer the HTML link to the table.\n3. To fetch data always use `get_table_data` (or `render_table`), which accepts optional filters:\n - For a SINGLE territory or a subset (e.g. GDP of one comarca), call `get_table_data` with the proper `geo` and a filter on the territorial dimension (e.g. `geo='com'` and `filters={\"COM\":\"21\"}`), and/or `last` to limit the periods. Remember that without `geo` the call returns the Catalonia total (`geo='cat'`) by default, which does NOT include comarques, municipalities or provinces.\n - When you need the full dataset (≤ 20,000 cells), call `get_table_data` without filters.\n\n---\n\n## 3. Interpreting JSON-stat\n\nNote: within a JSON-stat dataset, `id` refers to the ORDERED list of dimension names (see below) — this is unrelated to a statistic's acronym (`stat` parameter, section 5) or a table's numeric identifier (section 6).\n\nDataset structure:\n- `id`: ORDERED list of dimension names. This is the order that governs position calculations (NOT the key order of `dimension`).\n- `size`: number of categories per dimension (same order as `id`).\n- `dimension.{name}.category.index`: 0-based position of each category code within the dimension. It comes in one of two forms: an object `{code: position}` or a list `[code0, code1, ...]` (the position is the list index). ALWAYS use this index; do not assume alphabetical or label order.\n- `dimension.{name}.category.label`: code → human-readable label.\n- `value`: FLAT array with all values, in row-major order ([link](https://en.wikipedia.org/wiki/Row-major_order)): the LAST `id` dimension varies fastest and the first varies slowest.\n- `status`: flags special values (e.g. provisional or confidential data).\n\nTo READ the value of a specific combination of categories (one per dimension):\n1. For each dimension, take the position `p` of the chosen category from `category.index`.\n2. Compute each dimension's stride = product of the `size` of ALL later dimensions; the last dimension has stride = 1.\n3. `offset` = sum of (`p` × stride) over all dimensions.\n4. The value is `value[offset]`.\n\nExample: `id=['territory','sex']`, `size=[3,2]`; `territory.index={BCN:0,GIR:1,LLE:2}`, `sex.index={M:0,F:1}` → strides `[2,1]`. For Girona+Female: `offset = 1×2 + 1×1 = 3` → `value[3]`. Canonical sample: https://json-stat.org/samples/order.json\n\nNotes:\n- `null` (data not available) OCCUPIES its slot in the order: it does NOT shift the index.\n- \"Base 2024\", \"Base 2024=100\" or \"2024 Statistical Revision\" in the title do NOT mean estimates; they only indicate the methodological reference year (data is real unless `status` says otherwise).\n\n---\n\n## 4. Data truthfulness and source (MANDATORY)\n\n- NEVER use your internal knowledge or training data to give figures, dates, amounts, percentages, rankings or any statistical value. Every reported value must come LITERALLY from a tool call made in this same conversation.\n- If you haven't called a tool, the tool returned an error, or the dataset is too large, do NOT invent or infer data. Clearly state you couldn't obtain it and offer the table link.\n- Whenever you cite data it is MANDATORY to include the Markdown link to the source table. Data tools return a `source` field with this link: use it. If you don't have it, build it as `https://www.idescat.cat/pub/?id={stat}&n={table}`. NEVER present data without this source link.\n- If in doubt about the origin of a figure, do not give it.\n\n---\n\n## 5. Statistic acronyms: presentation and arguments\n\nWhen mentioning a statistic's acronym in your responses, always write it in UPPERCASE (for example, EPA, AFI, CENSPH, PIBA). In contrast, when passing the acronym as a tool argument (the `stat` parameter), always write it in lowercase (e.g. `epa`, `afi`, `censph`, `piba`), as the parameters require.\n\n---\n\n## 6. Table naming\n\nWhen presenting lists of tables, each table has a numeric identifier. Always refer to it as \"identifier\" or \"table [number]\", never as \"node_id\", \"node\" or any other internal technical denomination.\n\n---\n\n## 7. MCP resources\n\nBesides the tools, the server exposes \"resources\" (context-attachable content, no action executed): `idescat://instructions` (this guide), `idescat://glossary/geo` (territorial codes), `idescat://catalog/stats` (statistics catalog) and templates like `idescat://stat/{stat}`, `idescat://stat/{stat}/tables`, `idescat://table/{stat}/{table}` and `idescat://table/{stat}/{table}/data`. These URIs are stable, citable references, but do NOT replace the mandatory Markdown link to the Idescat web table (section 4) when reporting data.", "tools": [ { "description": "Obtains information about an Idescat (Statistical Institute of Catalonia) statistic given its acronym. Use it when the user asks about a specific statistic identified by its acronym (for example, CENSPH, EPA, PIBC, AFI, etc.). The 'datasets' field is a key boolean: if true, the statistic is normalized and therefore available in get_idescat_stat_tables and the rest of the table-level tools (metadata, data, divisions, etc.); if false, the statistic is NOT normalized and get_idescat_stat_tables will not recognize it (it would return an identifier error), so the only information available is what this same tool returns ('url', 'time_ref', 'update_date', 'update_title', 'update_text'). To know if a statistic has queryable tables, this tool is enough, without calling get_idescat_stat_tables. The 'url' field is a relative address to https://www.idescat.cat. The 'geo' field is an array with the available geographical disaggregation levels (e.g., 'cat', 'prov', 'at', 'com', 'mun', 'dis', 'sec'). POPULATION FIGURES: when population data is requested, the main and richest source is CENSPH (population and housing census, annual); for semi-annual estimates there is EP (population estimates, semi-annual); and there is also PMH (municipal register of inhabitants, annual). By default, choose CENSPH (or EP if semi-annual data is requested) and NEVER use PMH for population data unless the user explicitly asks for it.", "inputSchema": { "properties": { "stat": { "description": "Statistic acronym in lowercase (for example, 'afi', 'censph')", "type": "string" } }, "required": [ "stat" ], "type": "object" }, "name": "get_idescat_stat", "outputSchema": null }, { "description": "Obtains the list of tables for an Idescat statistic given its official acronym. Use it when the user asks what tables or information a statistic has. The response contains a 'tables' array where each element has 'id' (numerical identifier) and 'name' (table title). Present each table as: name (id). Inform the user that they can request more details about a table by indicating its identifier.", "inputSchema": { "properties": { "stat": { "description": "Statistic acronym in lowercase (for example, 'censph', 'piba')", "type": "string" } }, "required": [ "stat" ], "type": "object" }, "name": "get_idescat_stat_tables", "outputSchema": null }, { "description": "Obtains the complete list of Idescat statistics (all, normalized and non-normalized). It has no parameters. The response contains a 'statistics' array where each element has: 'acronym' (lowercase acronym, e.g., 'censph', to be used as the 'stat' argument of the other tools), 'name' (title), 'description' (summary), 'datasets' (boolean), 'geo' (array of available territorial disaggregations), and 'url' (initial web address, relative to https://www.idescat.cat). Use it when the user asks what statistics are available or when a statistic needs to be found by name or territorial disaggregation. THREE KEY FIELDS to decide the flow: (1) 'datasets' — if true, the statistic is normalized and you can use the rest of the tools (get_idescat_stat_tables, get_table_metadata, get_table_data, get_table_geo, render_table); if false, ONLY the information from this tool and get_idescat_stat is available. (2) 'geo' — available levels of geographical disaggregation (e.g., 'cat'=Catalonia, 'prov'=provinces, 'at'=territorial plan areas, 'com'=counties and Aran, 'mun'=municipalities, 'dis'=districts, 'sec'=census sections). ALWAYS CHECK 'geo' before choosing a statistic for a territorial query: if the user asks for county data, choose a statistic that includes 'com' in 'geo'. (3) 'url' — home page of the statistic on the Idescat website. POPULATION FIGURES: when population data is requested, there are several sources: the main and richest is CENSPH (population and housing census, annual); for semi-annual estimates there is EP (population estimates, semi-annual); and there is also PMH (municipal register of inhabitants, annual). By default, choose CENSPH (or EP if semi-annual data is requested) and NEVER use PMH for population data unless the user explicitly asks for it.", "inputSchema": { "properties": {}, "type": "object" }, "name": "get_idescat_stats", "outputSchema": null }, { "description": "Retrieves the data (values) of an Idescat table in JSON-stat format for a territorial division. You can retrieve the ENTIRE table (without filters) or only a SUBSET by passing the OPTIONAL parameters 'filters' (specific categories per dimension) and/or 'last' (number of last time periods); filtering returns smaller responses and allows querying tables that as a whole would exceed the limit. The filters use the dimension identifiers and category codes (category.index) returned by get_table_metadata (with the same 'geo'). IMPORTANT: the 20,000 cell limit is checked AFTER applying the filters; if it exceeds it, it returns a 'Dataset too large' error and you must add more filters (filters, last). You can call get_table_metadata beforehand to know the dimensions, periods, and category codes. The result contains: 'id' (dimension names in order), 'size' (number of categories per dimension), 'value' (flat array of values), 'dimension' (details per dimension: codes in category.index, labels in category.label, units in category.unit), 'role' (which dimensions are time, geo, or metric), 'status' (marks special values). HOW TO READ 'value' (row-major order): the array is FLAT; the LAST dimension of 'id' varies fastest and the first slowest. To get the value of a combination of categories (one per dimension) follow these 4 steps: (1) for each dimension, look for the POSITION (0-based) of the chosen category in dimension.{nom}.category.index — this 'index' can be a code→position object or a list of codes (the position is the index within the list); ALWAYS use this index, DO NOT assume alphabetical order or by label; (2) the stride of each dimension = product of the 'size' of the SUBSEQUENT dimensions (the last dimension has stride 1); (3) offset = sum of (position × stride) of all dimensions; (4) the searched value is value[offset]. Use the order of the 'id' array in all steps (NOT the order of keys in 'dimension'). EXAMPLE: id=['territory','sex'], size=[3,2], territory.index={BCN:0,GIR:1,LLE:2}, sex.index={M:0,F:1} → strides=[2,1]; for Girona+Woman: offset = 1×2 + 1×1 = 3, i.e., value[3]. Canonical ordering sample: https://json-stat.org/samples/order.json. WARNINGS: 1) null values (data not available) OCCUPY their position within the order: they DO NOT shift the index. 2) 'Base 2024', 'Base 2024=100' or '2024 Statistical Revision' in the title DO NOT indicate estimates; they are only the year of methodological reference and the data are real and definitive unless 'status' indicates otherwise.", "inputSchema": { "properties": { "filters": { "additionalProperties": { "type": "string" }, "description": "OPTIONAL filter by dimension: the keys are dimension identifiers (for example, 'SEX', 'COM', 'YEAR') and the values are category codes separated by commas (for example, {\"SEX\": \"F\", \"COM\": \"01,TOTAL\"}). The codes are obtained from category.index of get_table_metadata. Without filters, the entire table is retrieved.", "type": "object" }, "geo": { "description": "Territorial division code (optional, defaults to 'cat' = Catalonia as a whole). Other values: 'prov', 'at', 'com', 'mun', 'dis', 'sec'. It must match the 'geo' checked in get_table_metadata. Divisions other than 'cat' usually exceed the 20,000 cell limit; in this case add filters (filters, last) to reduce the selection.", "type": "string" }, "last": { "description": "OPTIONAL. Number of last time periods to retrieve (for example, 2 = the two most recent years). Do not combine it with an explicit filter on the time dimension", "type": "integer" }, "stat": { "description": "Statistic acronym in lowercase (for example, 'censph', 'piba')", "type": "string" }, "table": { "description": "Numerical identifier of the table, obtained from get_idescat_stat_tables (for example, '21654', '8607')", "type": "string" } }, "required": [ "stat", "table" ], "type": "object" }, "name": "get_table_data", "outputSchema": null }, { "description": "Obtains the list of territorial divisions available for an Idescat table (for example: cat=Catalonia, com=counties and Aran, mun=municipalities, prov=provinces, at=territorial plan areas). The response contains a 'divisions' array where each element has 'id' (division code) and 'name' (label). Often it is NOT necessary to call it because get_table_metadata already returns these divisions in 'link.related'. Use it only if you need the list of divisions without having called the metadata. The 'id' code is the value to pass to the 'geo' parameter of get_table_metadata, get_table_data, or render_table. If not specified, these tools use the 'cat' division (Catalonia as a whole) by default.", "inputSchema": { "properties": { "stat": { "description": "Statistic acronym in lowercase (for example, 'censph', 'piba')", "type": "string" }, "table": { "description": "Numerical identifier of the table, obtained from get_idescat_stat_tables (for example, '21654', '8607')", "type": "string" } }, "required": [ "stat", "table" ], "type": "object" }, "name": "get_table_geo", "outputSchema": null }, { "description": "Obtains the metadata for a specific Idescat table in JSON-stat format, given the statistic acronym (stat) and the table identifier (table). Use it when the user wants to know the details of a table: dimensions, categories available for each dimension (time periods, territorial scopes, sex, etc.), date of last update, units, etc. The acronym and identifier are previously obtained with get_idescat_stat_tables. At the end of the response, always include this Markdown link (substituting {stat} and {table} in lowercase): [See the results in this table](https://www.idescat.cat/pub/?id={stat}&n={table}). TERRITORIAL DIVISIONS: the response includes 'link.related', an array with other available territorial divisions (provinces, counties, municipalities, etc.); therefore it is often NOT necessary to call get_table_geo. If you pass the 'geo' parameter (for example geo='com' or geo='mun'), you get the metadata for that division, which includes the codes and labels (category.index / category.label) for the geographical dimension and the rest of the dimensions; use these codes directly to build the 'filters' parameter of get_table_data or render_table, without having to test and correct. SIZE CONTROL: check the 'size' field (array): the product of all its elements is the total number of cells. If it exceeds 20,000 (common case for municipal data), DO NOT retrieve the entire table; use get_table_data with filters (filters, last) to reduce the selection. If it is equal to or less than 20,000, you can retrieve it entirely with get_table_data.", "inputSchema": { "properties": { "geo": { "description": "Territorial division code (optional, defaults to 'cat' = Catalonia as a whole). Other common values: 'prov' (provinces), 'at' (territorial plan areas), 'com' (counties and Aran), 'mun' (municipalities), 'dis' (census districts), 'sec' (census sections). See the available codes in 'link.related' of the response or in get_table_geo. Pass it to obtain the category codes for that division and be able to filter later.", "type": "string" }, "stat": { "description": "Statistic acronym in lowercase (for example, 'censph', 'piba')", "type": "string" }, "table": { "description": "Numerical identifier of the table, obtained from get_idescat_stat_tables (for example, '21654', '8607')", "type": "string" } }, "required": [ "stat", "table" ], "type": "object" }, "name": "get_table_metadata", "outputSchema": null }, { "description": "Returns a Markdown table already built with the filtered data from an Idescat table, ready to be shown to the user without having to interpret the JSON-stat. It includes the title, units, the table with category labels, status notes (e.g., provisional data), and ALWAYS a final link to the table on the Idescat website that must be kept in the response to the user. By default, it puts the time dimension in rows and the first dimension with more than one category in columns; this can be changed with the 'rows' and 'cols' parameters. All other dimensions with more than one category must be reduced to a single category with 'filters'. IMPORTANT (error self-correction): if the tool returns the error with 'pending_dimensions', DO NOT change tools: call render_table again adding the 'filters' parameter with a single category for each pending dimension (you can start from the 'suggested_filters' field that comes in the same error response, but choose the appropriate category for the user's question according to 'categories'). If it then returns the size error (maximum 40 rows × 15 columns), follow the 'how_to_fix' field: if the time dimension has too many columns, add the 'last' parameter (e.g., last: 12), and if the rows dimension is too large, filter it with 'filters' or swap 'rows'/'cols'. You can chain 'filters' and 'last' in the same call. The values '..' indicate data not available.", "inputSchema": { "properties": { "cols": { "description": "Identifier of the dimension that should go in the columns (for example, 'SEX'). Default: the first dimension with more than one category that is not the row one", "type": "string" }, "filters": { "additionalProperties": { "type": "string" }, "description": "Filters by dimension: the keys are dimension identifiers (for example, 'SEX', 'COM', 'YEAR') and the values are category codes separated by commas (for example, {\"SEX\": \"F\", \"COM\": \"01,TOTAL\"}). The codes are obtained from category.index of get_table_metadata", "type": "object" }, "geo": { "description": "Territorial division code, obtained from get_table_geo or from 'link.related' (per example, 'cat', 'com', 'mun', 'prov'). Default: 'cat' (Catalonia as a whole)", "type": "string" }, "last": { "description": "Number of last time periods to retrieve (for example, 2 = the two most recent years). Do not combine it with an explicit filter on the time dimension", "type": "integer" }, "rows": { "description": "Identifier of the dimension that should go in the rows (for example, 'YEAR'). Default: the time dimension (more periods fit in the rows than in the columns)", "type": "string" }, "stat": { "description": "Statistic acronym in lowercase (for example, 'censph', 'piba')", "type": "string" }, "table": { "description": "Numerical identifier of the table, obtained from get_idescat_stat_tables (for example, '21654', '8607')", "type": "string" } }, "required": [ "stat", "table" ], "type": "object" }, "name": "render_table", "outputSchema": null } ] }
Verify it yourselfcurl -s https://api.teppi.xyz/v1/evidence/sha256:27461ab9a87c7b0d9d5790cda9bdaac5ac410b6647081320dd219af0f09edcc6 | sha256sum