Endpoints: 28,729MCP servers: 18,413Payout addresses: 2,071Paid calls: 1,561Letters: 14Defects: 1,336counted 3 min ago
teppi

Server definition

Hash
sha256:f0e6e7070289d463e680cd66c1a3ffc76fcef116ea03f4ff47afcc1a451e3745
What it is
What a remote MCP server returned when asked what it offers: 12 tools

The blob, as servednamed by its sha256

{ "instructions": "Morocco's administrative divisions: régions, provinces and préfectures, cercles, communes and arrondissements, with HCP census population for 2024 and 2014 and OpenStreetMap boundaries. Units are identified by HCP geographic codes such as 01.511.01.0, and a slug such as tanger works wherever a code does. To answer a question about a named place, call search first to get its code. get_commune answers about a commune or an arrondissement, including the communes it borders, and get_unit about a région, a province or a cercle. For coordinates, commune_at gives the commune that contains them. get_indicators gives the census figures on age, education, languages, work and housing for any unit or the whole country, from 2024, from 2014, or both to see what changed, and list_communes can rank communes by any of them or by the change since 2014. get_economy gives the 2024 count of economic establishments for the same units: businesses by sector, by size and by when they were founded, and the permanent jobs they hold. get_housing gives the 2024 urban housing stock: how many dwellings a town has, how many stand empty, what kind they are and what they are made of. get_insights gives up to 3 of a commune's 2024 census figures that stand out, each with its context worked out from the census: the communes it borders on the same figure, and the same figure in 2014 beside Morocco's, where the two censuses can be compared. A census figure in a commune of 2,000 households or more is marked sampled. get_neighbourhoods gives a commune's named neighbourhoods and its postcodes, and get_douars a rural commune's fractions and douars, with each douar's people and households and, for one of 30 households or more, how far it is from a road, a school and a health centre. No language model writes or judges any of it.", "tools": [ { "description": "The commune whose boundary contains a point, with its names, type, parents and population, and in Casablanca, Rabat, Fès, Marrakech, Salé and Tanger the arrondissement too. Use it to turn coordinates, from a map or a device, into a commune. Sidi Mohamed Benmansour has no boundary, and neither do about 88 km² between Ifrane and Boulemane.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "lat": { "description": "Latitude, in degrees.", "maximum": 90, "minimum": -90, "type": "number" }, "lng": { "description": "Longitude, in degrees.", "maximum": 180, "minimum": -180, "type": "number" } }, "required": [ "lat", "lng" ], "type": "object" }, "name": "commune_at", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "arrondissement": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name_ar": { "type": "string" }, "name_fr": { "type": "string" } }, "required": [ "code", "name_fr", "name_ar" ], "type": "object" }, { "type": "null" } ] }, "commune": { "additionalProperties": false, "properties": { "area_km2": { "type": [ "number", "null" ] }, "centroid": { "anyOf": [ { "additionalProperties": false, "properties": { "lat": { "type": "number" }, "lng": { "type": "number" } }, "required": [ "lat", "lng" ], "type": "object" }, { "type": "null" } ] }, "cercle": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name": { "type": "string" } }, "required": [ "code", "name" ], "type": "object" }, { "type": "null" } ] }, "change_pct": { "type": [ "number", "null" ] }, "code": { "type": "string" }, "density": { "type": [ "number", "null" ] }, "name_ar": { "type": "string" }, "name_fr": { "type": "string" }, "population_2014": { "type": [ "number", "null" ] }, "population_2024": { "type": [ "number", "null" ] }, "province": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name": { "type": "string" } }, "required": [ "code", "name" ], "type": "object" }, "region": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name": { "type": "string" } }, "required": [ "code", "name" ], "type": "object" }, "slug": { "type": "string" }, "type": { "enum": [ "urban", "rural" ], "type": "string" } }, "required": [ "code", "slug", "name_fr", "name_ar", "type", "region", "province", "cercle", "population_2024", "population_2014", "change_pct", "area_km2", "density", "centroid" ], "type": "object" } }, "required": [ "commune", "arrondissement" ], "type": "object" } }, { "description": "Communes within a radius of a point, nearest first. Distance is measured to each commune's centroid, so the nearest commune isn't always the one that contains the point: commune_at gives that one.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "lat": { "description": "Latitude, in degrees.", "maximum": 90, "minimum": -90, "type": "number" }, "limit": { "description": "How many results. 10 when left out, at most 50.", "maximum": 50, "minimum": 1, "type": "integer" }, "lng": { "description": "Longitude, in degrees.", "maximum": 180, "minimum": -180, "type": "number" }, "radius_km": { "description": "Radius in km. 10 when left out, at most 100.", "exclusiveMinimum": 0, "maximum": 100, "type": "number" } }, "required": [ "lat", "lng" ], "type": "object" }, "name": "communes_near", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "results": { "items": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "distance_km": { "type": "number" }, "name_ar": { "type": "string" }, "name_fr": { "type": "string" }, "slug": { "type": "string" } }, "required": [ "code", "name_fr", "name_ar", "slug", "distance_km" ], "type": "object" }, "type": "array" } }, "required": [ "results" ], "type": "object" } }, { "description": "One commune's names, type, région, province and cercle, 2024 and 2014 population, the change between them, a point inside it, the communes it borders and how much boundary it shares with each, and in the 6 cities divided into them, its arrondissements with their population. Identify it by HCP code (01.511.01.0), the code as digits, or a slug (tanger).", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "id": { "description": "An HCP code, the code as digits, or a slug.", "minLength": 1, "type": "string" } }, "required": [ "id" ], "type": "object" }, "name": "get_commune", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "arrondissements": { "description": "Casablanca, Rabat, Fès, Marrakech, Salé and Tanger's arrondissements, most populous first; empty elsewhere.", "items": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name_ar": { "type": "string" }, "name_fr": { "type": "string" }, "population_2024": { "type": [ "number", "null" ] } }, "required": [ "code", "name_fr", "name_ar", "population_2024" ], "type": "object" }, "type": "array" }, "commune": { "additionalProperties": false, "properties": { "area_km2": { "type": [ "number", "null" ] }, "centroid": { "anyOf": [ { "additionalProperties": false, "properties": { "lat": { "type": "number" }, "lng": { "type": "number" } }, "required": [ "lat", "lng" ], "type": "object" }, { "type": "null" } ] }, "cercle": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name": { "type": "string" } }, "required": [ "code", "name" ], "type": "object" }, { "type": "null" } ] }, "change_pct": { "type": [ "number", "null" ] }, "code": { "type": "string" }, "density": { "type": [ "number", "null" ] }, "name_ar": { "type": "string" }, "name_fr": { "type": "string" }, "population_2014": { "type": [ "number", "null" ] }, "population_2024": { "type": [ "number", "null" ] }, "province": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name": { "type": "string" } }, "required": [ "code", "name" ], "type": "object" }, "region": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name": { "type": "string" } }, "required": [ "code", "name" ], "type": "object" }, "slug": { "type": "string" }, "type": { "enum": [ "urban", "rural" ], "type": "string" } }, "required": [ "code", "slug", "name_fr", "name_ar", "type", "region", "province", "cercle", "population_2024", "population_2014", "change_pct", "area_km2", "density", "centroid" ], "type": "object" }, "neighbours": { "description": "The communes this one borders, longest shared boundary first. Measured on the OpenStreetMap boundaries, so it is under ODbL.", "items": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "km": { "type": "number" }, "name_fr": { "type": "string" } }, "required": [ "code", "name_fr", "km" ], "type": "object" }, "type": "array" } }, "required": [ "commune", "arrondissements", "neighbours" ], "type": "object" } }, { "description": "The douars of a rural commune from HCP's 2024 census, the villages and hamlets it's made of, grouped in its fractions (mashyakha), named in Arabic only. Each has its kind (grouped, split into sub-douars, or dispersed), its households and its people. A douar has its name in Latin where a source writes one, and its point where GeoNames or OpenStreetMap maps it. With figures, a douar of 30 households or more also has the nationality, sex, age, civil registration and marital status of its people, the kind of dwelling its households live in, and the average distance in km from its dwellings to a paved road, an unpaved road a car can drive on, a primary school, a collège, a lycée and a health centre. HCP withholds those for a smaller douar, and says null. A town has no douars, though 21 communes counted as urban have some in their rural part.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "figures": { "description": "Include each douar's figures. Left out, a douar is its name, kind, households and people.", "type": "boolean" }, "fraction": { "description": "Only the douars of this fraction, by its 10-digit code.", "pattern": "^\\d{10}$", "type": "string" }, "unit": { "description": "A commune, by code or slug.", "minLength": 1, "type": "string" } }, "required": [ "unit" ], "type": "object" }, "name": "get_douars", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "douars": { "items": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "figures": { "anyOf": [ { "additionalProperties": { "additionalProperties": { "type": [ "number", "null" ] }, "propertyNames": { "type": "string" }, "type": "object" }, "propertyNames": { "type": "string" }, "type": "object" }, { "type": "null" } ], "description": "Null where HCP withholds them." }, "fraction": { "description": "The fraction's code.", "type": "string" }, "households": { "type": "number" }, "name_ar": { "type": "string" }, "name_latin": { "additionalProperties": false, "description": "Its name in Latin letters where a source writes one: the Ministry of National Education's school lists, OpenStreetMap, GeoNames, or 2 visitors who suggested it on the site. HCP names douars in Arabic only.", "properties": { "name": { "type": "string" }, "source": { "enum": [ "education", "osm", "geonames", "visitors" ], "type": "string" } }, "required": [ "name", "source" ], "type": "object" }, "place": { "additionalProperties": false, "description": "Its point, where GeoNames or OpenStreetMap maps it in the same commune. Matched by name.", "properties": { "lat": { "type": "number" }, "lng": { "type": "number" }, "source": { "enum": [ "geonames", "osm" ], "type": "string" } }, "required": [ "source", "lat", "lng" ], "type": "object" }, "population": { "type": "number" }, "type": { "enum": [ "grouped", "split", "dispersed" ], "type": "string" } }, "required": [ "code", "fraction", "name_ar", "type", "households", "population" ], "type": "object" }, "type": "array" }, "fractions": { "items": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "douars": { "type": "number" }, "households": { "type": "number" }, "label": { "description": "HCP's label in place of a name: a fraction outside the commune, or a notional one.", "enum": [ "outside", "notional" ], "type": "string" }, "name_ar": { "type": "string" }, "name_latin": { "additionalProperties": false, "description": "Where one of its douars has the same name and a source spells it.", "properties": { "name": { "type": "string" }, "source": { "enum": [ "education", "osm", "geonames", "visitors" ], "type": "string" } }, "required": [ "name", "source" ], "type": "object" }, "population": { "type": "number" } }, "required": [ "code", "name_ar", "douars", "households", "population" ], "type": "object" }, "type": "array" }, "message": { "description": "Present when the commune has no douars.", "type": "string" }, "total": { "description": "How many douars are returned.", "type": "number" }, "unit": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name_fr": { "type": "string" } }, "required": [ "code", "name_fr" ], "type": "object" } }, "required": [ "unit", "total", "fractions", "douars" ], "type": "object" } }, { "description": "HCP's 2024 count of economic establishments for Morocco or any région, province or préfecture, cercle, commune or arrondissement: how many establishments were mapped, how many are public services, how many are associations in premises of their own, how many are businesses, and how many permanent jobs those businesses hold. The businesses are split three ways, each covering all of them: by sector (industry, construction, commerce, services), by how many people work there (1, 2-3, 4-9, 10-49, 50 and over), and by when they were founded (before 1956 through 2020 and later). The weekly souks in use are counted beside them and are not part of the total.\n\nReading them: every figure is a count, taken during the census by field teams who mapped each establishment. Farming is out, the workbook counts every sector but agriculture, and the jobs are the permanent ones.\n\nRanking and comparing: to order communes by one of these, call list_communes with sort set to its path, such as economy.establishments.jobs, or by one of the 3 it works out from them: economy.per1000.establishments, economy.per1000.jobs, economy.perBusiness.jobs. To compare the régions, the provinces or the arrondissements, give level without a unit and get them all in one call.\n\nCasablanca and the 5 other cities divided into arrondissements are counted by arrondissement, so their figures are the sum of those, marked basis: arrondissement_sum. Say so when you report one.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "level": { "description": "With a unit, the level it's at, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune. Without a unit, region, province or arrondissement gives every one of that level in one call.", "enum": [ "commune", "arrondissement", "province", "region", "cercle" ], "type": "string" }, "topics": { "description": "Only these topics. Every topic when left out.", "items": { "enum": [ "establishments", "sector", "size", "founded" ], "type": "string" }, "type": "array" }, "unit": { "description": "A région, province or préfecture, cercle, commune or arrondissement, by code or slug. Morocco as a whole when left out.", "minLength": 1, "type": "string" } }, "type": "object" }, "name": "get_economy", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "results": { "items": { "additionalProperties": false, "properties": { "basis": { "const": "arrondissement_sum", "description": "Present on the 6 cities the census counts by arrondissement: these figures are the sum of their arrondissements, not a count HCP publishes for the city.", "type": "string" }, "figures": { "additionalProperties": { "additionalProperties": { "type": [ "number", "null" ] }, "propertyNames": { "type": "string" }, "type": "object" }, "description": "By topic, then by key. Counts of establishments, of permanent jobs, or of weekly souks.", "propertyNames": { "type": "string" }, "type": "object" }, "unit": { "additionalProperties": false, "properties": { "code": { "type": [ "string", "null" ] }, "level": { "type": "string" }, "name_ar": { "type": [ "string", "null" ] }, "name_fr": { "type": "string" } }, "required": [ "code", "level", "name_fr", "name_ar" ], "type": "object" } }, "required": [ "unit", "figures" ], "type": "object" }, "type": "array" } }, "required": [ "results" ], "type": "object" } }, { "description": "HCP's 2024 count of urban dwellings for Morocco or any unit that has an urban area: how many there are, how many are occupied, vacant or second homes, what kind they are (villa, apartment, traditional or modern Moroccan house, slum, rural-type), how old they are, what their walls and roofs are made of, how many are on the public electricity, water and sewerage networks, and HCP's housing shortfall. Every figure but the count is a percentage of that unit's urban dwellings. This counts dwellings, not households: a vacant flat is here and in nobody's census record, and get_indicators describes the dwelling each household lives in, for the whole country rather than the towns. A unit with no urban area has nothing here. For the households with running water or electricity in any commune, rural ones included, use get_indicators' amenities topic, and its wastewater topic for a public sewer; list_communes can sort by either, as in amenities.runningWater.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "level": { "description": "With a unit, the level it's at. Without one, region, province or arrondissement gives every one of that level.", "enum": [ "commune", "arrondissement", "province", "region", "cercle" ], "type": "string" }, "topics": { "description": "Only these topics. Every topic when left out.", "items": { "enum": [ "dwellings", "occupancy", "type", "age", "ageByType", "walls", "roofs", "networks" ], "type": "string" }, "type": "array" }, "unit": { "description": "A unit by code or slug. Morocco as a whole when left out.", "minLength": 1, "type": "string" } }, "type": "object" }, "name": "get_housing", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "results": { "items": { "additionalProperties": false, "properties": { "figures": { "additionalProperties": { "additionalProperties": { "type": [ "number", "null" ] }, "propertyNames": { "type": "string" }, "type": "object" }, "description": "By topic, then by key.", "propertyNames": { "type": "string" }, "type": "object" }, "unit": { "additionalProperties": false, "properties": { "code": { "type": [ "string", "null" ] }, "level": { "type": "string" }, "name_ar": { "type": [ "string", "null" ] }, "name_fr": { "type": "string" } }, "required": [ "code", "level", "name_fr", "name_ar" ], "type": "object" } }, "required": [ "unit", "figures" ], "type": "object" }, "type": "array" } }, "required": [ "results" ], "type": "object" } }, { "description": "HCP's census figures for Morocco or any région, province or préfecture, cercle, commune or arrondissement: age, marital status, fertility, disability, schooling, illiteracy, the languages people read and write and the local languages they use, education, work, employment status and how people get to work, and for households their size, dwelling, occupancy, amenities, wastewater, waste and cooking fuel.\n\nReading them: shares and rates are percentages from 0 to 100. Null means HCP publishes no figure there. Most come from the long questionnaire, which went to a random 20% of households in communes of 2,000 households or more, so there they're estimates.\n\nRanking and comparing: to order communes by one figure, call list_communes with sort set to its path, rather than this once per commune. To compare the régions, the provinces or the arrondissements, give level without a unit and get them all in one call.\n\nThe 2014 census is here too, under census. Age, education, local languages, illiteracy, fertility, disability, work, the ways of getting to work, dwellings, amenities, wastewater and waste ask what 2024 asks and can be read against it. Where people work and how children get to school are 2014 only. Five topics changed and can't be subtracted: marital status covered everyone rather than people aged 15 and over, schooling ages 7 to 12 rather than 6 to 11, reading and writing was asked as combinations of languages rather than one at a time, a household counted under every cooking fuel it used, and the employment shares took in unemployed people who had worked before. A unit the 2014 census didn't count has null there, Casablanca and the 5 other cities with arrondissements among them, since 2014 published those by arrondissement.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "area": { "description": "The whole unit (total), its urban or rural part, or each of the three. total when left out.", "enum": [ "total", "urban", "rural", "each" ], "type": "string" }, "census": { "description": "Which census. 2024 when left out. both gives the two together, to see what changed.", "enum": [ "2014", "2024", "both" ], "type": "string" }, "level": { "description": "With a unit, the level it's at, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune. Without a unit, region, province or arrondissement gives every one of that level in one call.", "enum": [ "commune", "arrondissement", "province", "region", "cercle" ], "type": "string" }, "sex": { "description": "Everyone (all), men, women, or each of the three. all when left out. Household figures have no sex.", "enum": [ "all", "male", "female", "each" ], "type": "string" }, "topics": { "description": "Only these topics. Every topic when left out. Two are easy to confuse: labour holds the labour force, the activity rate and the unemployment rate, while employmentStatus is how the people in work are employed, as employees, self-employed or apprentices.", "items": { "enum": [ "population", "sex", "age", "maritalStatus", "fertility", "disability", "schooling", "illiteracy", "languagesReadAndWritten", "education", "localLanguages", "labour", "employmentStatus", "commute", "households", "dwellingType", "occupancy", "dwellingAge", "amenities", "wastewater", "householdWaste", "cookingFuel" ], "type": "string" }, "type": "array" }, "unit": { "description": "A région, province or préfecture, cercle, commune or arrondissement, by code or slug. Morocco as a whole when left out.", "minLength": 1, "type": "string" } }, "type": "object" }, "name": "get_indicators", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "results": { "items": { "additionalProperties": false, "properties": { "figures": { "additionalProperties": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "additionalProperties": {}, "propertyNames": { "type": "string" }, "type": "object" }, { "type": "null" } ] }, "propertyNames": { "type": "string" }, "type": "object" }, { "type": "null" } ] }, "description": "By census year, then by area: people by sex, then households, each by topic and key. Null for an area the unit doesn't have, and for a census that didn't count it.", "propertyNames": { "type": "string" }, "type": "object" }, "from_local_administration": { "description": "HCP collected this unit's figures from the local administration, as its population moves with the seasons; only the counts are published.", "type": "boolean" }, "unit": { "additionalProperties": false, "properties": { "code": { "type": [ "string", "null" ] }, "level": { "type": "string" }, "name_ar": { "type": [ "string", "null" ] }, "name_fr": { "type": "string" } }, "required": [ "code", "level", "name_fr", "name_ar" ], "type": "object" } }, "required": [ "unit", "from_local_administration", "figures" ], "type": "object" }, "type": "array" } }, "required": [ "results" ], "type": "object" } }, { "description": "For a commune, up to 3 of its 2024 census figures that stand out: among the highest or lowest communes, moved far more or less than other communes since 2014, or far from its province's figure. Each comes with its context as numbers, worked out from the census: the commune's other figures here, the communes it borders on the same figure (their median and the one furthest from it), and the same figure in 2014 beside Morocco's, where the two censuses can be compared. A commune with any figure the two censuses disagree on is left out, on its own page and as a neighbour. Figures they measure differently, shares by sex and likely errors in the data are left out too. An economy or housing figure on fewer than 100 businesses or urban dwellings is left out, since a handful of them can swing a share. A census figure in a commune of 2,000 households or more is marked sampled, since the long questionnaire went to a sample of households there. No language model writes or judges any of it. Only communes have these, and most have none.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "level": { "description": "The level, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune.", "enum": [ "commune", "arrondissement", "province", "region", "cercle" ], "type": "string" }, "unit": { "description": "A commune, by code or slug.", "minLength": 1, "type": "string" } }, "required": [ "unit" ], "type": "object" }, "name": "get_insights", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "findings": { "items": { "additionalProperties": false, "properties": { "breakdown": { "anyOf": [ {}, { "type": "null" } ], "description": "The parts the figure is made of, where the dataset has them." }, "context": { "additionalProperties": false, "properties": { "neighbours": { "anyOf": [ { "additionalProperties": false, "properties": { "bordering": { "description": "How many communes it borders.", "type": "number" }, "compared": { "description": "How many of them have the figure to compare; the median is over these.", "type": "number" }, "furthest": { "additionalProperties": false, "description": "The bordering commune whose figure is furthest from this one's.", "properties": { "code": { "type": "string" }, "name": { "additionalProperties": false, "properties": { "ar": { "type": [ "string", "null" ] }, "fr": { "type": "string" } }, "required": [ "fr", "ar" ], "type": "object" }, "value": { "type": "number" } }, "required": [ "code", "name", "value" ], "type": "object" }, "median": { "type": "number" } }, "required": [ "bordering", "compared", "median", "furthest" ], "type": "object" }, { "type": "null" } ], "description": "The bordering communes on the same figure, or for a change on the same change; null when none can be compared." }, "others": { "description": "The commune's other figures here.", "items": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "kind": { "type": "string" }, "measure": { "type": "string" } }, "required": [ "id", "kind", "measure" ], "type": "object" }, "type": "array" }, "since2014": { "anyOf": [ { "additionalProperties": false, "properties": { "morocco": { "additionalProperties": false, "properties": { "now": { "type": "number" }, "then": { "type": "number" } }, "required": [ "then", "now" ], "type": "object" }, "now": { "type": "number" }, "then": { "type": "number" } }, "required": [ "then", "now", "morocco" ], "type": "object" }, { "type": "null" } ], "description": "The figure in 2014 and 2024, here and across Morocco; null where the two censuses can't be compared." } }, "required": [ "others", "neighbours", "since2014" ], "type": "object" }, "direction": { "enum": [ "high", "low" ], "type": "string" }, "id": { "type": "string" }, "kind": { "description": "extreme: among the highest or lowest communes; change: moved far more or less than other communes since 2014; gap: far from its province's figure.", "enum": [ "extreme", "change", "gap" ], "type": "string" }, "line": { "additionalProperties": false, "description": "The figure in a sentence, in English, French and Arabic.", "properties": { "ar": { "type": "string" }, "en": { "type": "string" }, "fr": { "type": "string" } }, "required": [ "en", "fr", "ar" ], "type": "object" }, "measure": { "description": "The figure's field, as get_indicators, get_economy and get_housing name it.", "type": "string" }, "reference": { "description": "What it stands out from: the communes' mean, its province's figure, or 0 for a change.", "type": "number" }, "sampled": { "description": "True when the figure is a census figure in a commune of 2,000 households or more, where the long questionnaire went to a sample. False for an economy or housing figure, and for a smaller commune.", "type": "boolean" }, "value": { "description": "The 2024 figure, or for a change the points it moved since 2014.", "type": "number" } }, "required": [ "id", "kind", "measure", "value", "reference", "direction", "sampled", "line", "breakdown", "context" ], "type": "object" }, "type": "array" }, "message": { "description": "Present when no figures are published for this place.", "type": "string" }, "unit": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "level": { "type": "string" }, "name_ar": { "type": [ "string", "null" ] }, "name_fr": { "type": "string" } }, "required": [ "code", "level", "name_fr", "name_ar" ], "type": "object" } }, "required": [ "unit", "findings" ], "type": "object" } }, { "description": "The neighbourhoods OpenStreetMap and Poste Maroc name in a commune, a city's arrondissements included, with the arrondissement each was placed in where it has a point, where its name comes from, and the postcodes Poste Maroc lists under it; and the commune's postcodes. The census publishes nothing by neighbourhood: the figures are the commune's, or the arrondissement's. To find which commune a neighbourhood is in, call search with its name instead.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "limit": { "description": "How many neighbourhoods, in alphabetical order. 200 when left out; Casablanca has over 1,400.", "maximum": 2000, "minimum": 1, "type": "integer" }, "unit": { "description": "A commune, by code or slug.", "minLength": 1, "type": "string" } }, "required": [ "unit" ], "type": "object" }, "name": "get_neighbourhoods", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "message": { "description": "Present when the commune has no named neighbourhoods, whether or not it has postcodes.", "type": "string" }, "neighbourhoods": { "items": { "additionalProperties": false, "properties": { "arrondissement": { "description": "The arrondissement's code, where it was placed in one by its point.", "type": [ "string", "null" ] }, "name_ar": { "type": "string" }, "name_fr": { "type": "string" }, "postcodes": { "items": { "type": "string" }, "type": "array" }, "source": { "enum": [ "osm", "poste", "hand", "village" ], "type": "string" } }, "required": [ "name_fr", "name_ar", "arrondissement", "source", "postcodes" ], "type": "object" }, "type": "array" }, "postcodes": { "items": { "type": "string" }, "type": "array" }, "total": { "description": "How many neighbourhoods the commune has, whatever the limit.", "type": "number" }, "unit": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name_fr": { "type": "string" } }, "required": [ "code", "name_fr" ], "type": "object" } }, "required": [ "unit", "total", "postcodes", "neighbourhoods" ], "type": "object" } }, { "description": "One région, province, préfecture or cercle: its name in French and Arabic, its 2024 population and households, the units above it, how many units it holds, and the ones directly under it, named: a région's provinces, a province's cercles. This is the tool for a question about a unit above the commune, such as how many cercles a province has. For a commune or an arrondissement, call get_commune; to list a unit's communes, call list_communes with that unit.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "level": { "description": "The level, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune.", "enum": [ "region", "province", "cercle" ], "type": "string" }, "unit": { "description": "A région, province, préfecture or cercle, by code or slug.", "minLength": 1, "type": "string" } }, "required": [ "unit" ], "type": "object" }, "name": "get_unit", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "children": { "description": "The units directly under it. Empty for a cercle, whose communes come from list_communes.", "items": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "level": { "type": "string" }, "name_fr": { "type": "string" }, "population_2024": { "type": [ "number", "null" ] } }, "required": [ "code", "name_fr", "level", "population_2024" ], "type": "object" }, "type": "array" }, "counts": { "additionalProperties": { "type": "number" }, "description": "How many units of each level this one holds.", "propertyNames": { "type": "string" }, "type": "object" }, "unit": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "households_2024": { "type": [ "number", "null" ] }, "level": { "type": "string" }, "name_ar": { "type": "string" }, "name_fr": { "type": "string" }, "population_2024": { "type": [ "number", "null" ] }, "province": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name": { "type": "string" } }, "required": [ "code", "name" ], "type": "object" }, { "type": "null" } ] }, "region": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name": { "type": "string" } }, "required": [ "code", "name" ], "type": "object" }, { "type": "null" } ] } }, "required": [ "code", "level", "name_fr", "name_ar", "population_2024", "households_2024", "region", "province" ], "type": "object" } }, "required": [ "unit", "counts", "children" ], "type": "object" } }, { "description": "Which commune has the most or the least of something is one call here: sort by that figure, and every commune in the filter comes back in order with its value, with no need to look them up one by one. Communes filtered by région, province or préfecture, cercle, type or population, 50 to a page, in code order or sorted by name, population, change since 2014, density, area, any census indicator or any establishment count. Filters combine; each unit can be given by code or slug. With no filter it lists every commune, so sort: \"-population\" alone gives the largest in the country.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "cercle": { "description": "A cercle, by code or slug.", "type": "string" }, "max_population": { "description": "Only communes with at most this many people in 2024.", "maximum": 10000000, "minimum": 0, "type": "integer" }, "min_population": { "description": "Only communes with at least this many people in 2024.", "maximum": 10000000, "minimum": 0, "type": "integer" }, "page": { "description": "Page number, from 1.", "maximum": 10000, "minimum": 1, "type": "integer" }, "province": { "description": "A province or préfecture, by code or slug.", "type": "string" }, "region": { "description": "A région, by code or slug.", "type": "string" }, "sort": { "description": "A field to order by: code, name, population, change, density, area, or a census indicator by its path, such as labour.unemploymentRate or amenities.runningWater, as get_indicators names them. Put 2014. before the path for the 2014 figure, or change. for how far it moved since, as in change.illiteracy.rate10Plus. An establishment count goes under economy., as in economy.establishments.jobs or economy.sector.commerce, as get_economy names them. A count on its own ranks the biggest places first, so 3 figures worked out from 2 counts rank by size of place rather than size: economy.per1000.establishments, economy.per1000.jobs and economy.perBusiness.jobs. A leading minus puts the largest first. Code order when left out.", "type": "string" }, "type": { "description": "Urban or rural communes only.", "enum": [ "urban", "rural" ], "type": "string" } }, "type": "object" }, "name": "list_communes", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "communes": { "items": { "additionalProperties": false, "properties": { "area_km2": { "type": [ "number", "null" ] }, "centroid": { "anyOf": [ { "additionalProperties": false, "properties": { "lat": { "type": "number" }, "lng": { "type": "number" } }, "required": [ "lat", "lng" ], "type": "object" }, { "type": "null" } ] }, "cercle": { "anyOf": [ { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name": { "type": "string" } }, "required": [ "code", "name" ], "type": "object" }, { "type": "null" } ] }, "change_pct": { "type": [ "number", "null" ] }, "code": { "type": "string" }, "density": { "type": [ "number", "null" ] }, "indicator": { "additionalProperties": false, "description": "When sorted by a figure, the commune's value for it.", "properties": { "basis": { "const": "arrondissement_sum", "description": "The value is the sum of this city's arrondissements, which is how the census counts it.", "type": "string" }, "derived": { "description": "The division this figure came from, when it isn't a published one.", "type": "string" }, "path": { "type": "string" }, "value": { "type": [ "number", "null" ] } }, "required": [ "path", "value" ], "type": "object" }, "name_ar": { "type": "string" }, "name_fr": { "type": "string" }, "population_2014": { "type": [ "number", "null" ] }, "population_2024": { "type": [ "number", "null" ] }, "province": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name": { "type": "string" } }, "required": [ "code", "name" ], "type": "object" }, "region": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "name": { "type": "string" } }, "required": [ "code", "name" ], "type": "object" }, "slug": { "type": "string" }, "type": { "enum": [ "urban", "rural" ], "type": "string" } }, "required": [ "code", "slug", "name_fr", "name_ar", "type", "region", "province", "cercle", "population_2024", "population_2014", "change_pct", "area_km2", "density", "centroid" ], "type": "object" }, "type": "array" }, "page": { "type": "number" }, "total": { "type": "number" }, "total_pages": { "type": "number" } }, "required": [ "communes", "page", "total_pages", "total" ], "type": "object" } }, { "description": "Find régions, provinces and préfectures, cercles, communes and arrondissements of Morocco by name. Takes French or Arabic, a slug, or another name a place is known by: Fez finds Fès, Mogador finds Essaouira. A neighbourhood's name finds the arrondissement or commune it's in, with matched neighbourhood and the neighbourhood's names: Sidi Maârouf finds Aïn-Chock, in Casablanca. The census has no figures for a neighbourhood itself. A 5-digit postcode finds the commune it's in, with matched postcode: 20520 finds Casablanca. Returns codes; pass a commune's code to get_commune for its population and parents.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "levels": { "description": "Only these levels. Every level when left out.", "items": { "enum": [ "commune", "arrondissement", "province", "region", "cercle" ], "type": "string" }, "type": "array" }, "limit": { "description": "How many results. 10 when left out, at most 50.", "maximum": 50, "minimum": 1, "type": "integer" }, "query": { "description": "The name to look for, in French, Arabic or as a slug, or a unit's code.", "maxLength": 100, "minLength": 1, "type": "string" } }, "required": [ "query" ], "type": "object" }, "name": "search", "outputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "results": { "items": { "additionalProperties": false, "properties": { "code": { "type": "string" }, "level": { "enum": [ "commune", "arrondissement", "province", "region", "cercle" ], "type": "string" }, "matched": { "enum": [ "code", "exact", "alias", "prefix", "spelling", "trigram", "neighbourhood", "postcode" ], "type": "string" }, "name_ar": { "type": "string" }, "name_fr": { "type": "string" }, "neighbourhood_ar": { "type": "string" }, "neighbourhood_fr": { "type": "string" }, "postcode": { "type": "string" }, "slug": { "type": "string" } }, "required": [ "code", "level", "name_fr", "name_ar", "slug", "matched" ], "type": "object" }, "type": "array" } }, "required": [ "results" ], "type": "object" } } ] }
Verify it yourselfcurl -s https://api.teppi.xyz/v1/evidence/sha256:f0e6e7070289d463e680cd66c1a3ffc76fcef116ea03f4ff47afcc1a451e3745 | sha256sum