@centia-io/mcp-server 1.0.22 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/centia-api.json +169 -9
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/centia-api.json
CHANGED
|
@@ -3904,7 +3904,7 @@
|
|
|
3904
3904
|
"tags": [
|
|
3905
3905
|
"Snapshots"
|
|
3906
3906
|
],
|
|
3907
|
-
"description": "The snapshot's Parquet file. Supports HEAD and single byte ranges (206/416). In redirect mode answers 302 to a short-lived storage URL.",
|
|
3907
|
+
"description": "The snapshot's primary data file: the Parquet when produced, else the only produced file; 409 when several formats were produced and none is Parquet (use /data/{format}). Supports HEAD and single byte ranges (206/416). In redirect mode answers 302 to a short-lived storage URL.",
|
|
3908
3908
|
"operationId": "getRelationSnapshotData",
|
|
3909
3909
|
"parameters": [
|
|
3910
3910
|
{
|
|
@@ -3944,10 +3944,7 @@
|
|
|
3944
3944
|
],
|
|
3945
3945
|
"responses": {
|
|
3946
3946
|
"200": {
|
|
3947
|
-
"description": "Whole file"
|
|
3948
|
-
"content": {
|
|
3949
|
-
"application/vnd.apache.parquet": {}
|
|
3950
|
-
}
|
|
3947
|
+
"description": "Whole file, in the media type of the format served (application/vnd.apache.parquet for Parquet)"
|
|
3951
3948
|
},
|
|
3952
3949
|
"206": {
|
|
3953
3950
|
"description": "Partial content"
|
|
@@ -3962,7 +3959,92 @@
|
|
|
3962
3959
|
"description": "No published snapshot for that date"
|
|
3963
3960
|
},
|
|
3964
3961
|
"409": {
|
|
3965
|
-
"description": "
|
|
3962
|
+
"description": "Several formats produced and none is Parquet; the message lists /data/{format} for each"
|
|
3963
|
+
},
|
|
3964
|
+
"416": {
|
|
3965
|
+
"description": "Range not satisfiable"
|
|
3966
|
+
},
|
|
3967
|
+
"502": {
|
|
3968
|
+
"description": "Snapshot storage unavailable"
|
|
3969
|
+
}
|
|
3970
|
+
}
|
|
3971
|
+
}
|
|
3972
|
+
},
|
|
3973
|
+
"/api/v4/schemas/{schema}/relations/{relation}/snapshots/{date}/data/{format}": {
|
|
3974
|
+
"get": {
|
|
3975
|
+
"tags": [
|
|
3976
|
+
"Snapshots"
|
|
3977
|
+
],
|
|
3978
|
+
"description": "The snapshot's data file in one named output format. Same HEAD/Range/redirect semantics as /data. 400 for an unknown format id, 404 when the snapshot did not produce that format (it was skipped or never requested).",
|
|
3979
|
+
"operationId": "getRelationSnapshotDataFormat",
|
|
3980
|
+
"parameters": [
|
|
3981
|
+
{
|
|
3982
|
+
"name": "schema",
|
|
3983
|
+
"in": "path",
|
|
3984
|
+
"required": true,
|
|
3985
|
+
"schema": {
|
|
3986
|
+
"type": "string"
|
|
3987
|
+
}
|
|
3988
|
+
},
|
|
3989
|
+
{
|
|
3990
|
+
"name": "relation",
|
|
3991
|
+
"in": "path",
|
|
3992
|
+
"required": true,
|
|
3993
|
+
"schema": {
|
|
3994
|
+
"type": "string"
|
|
3995
|
+
}
|
|
3996
|
+
},
|
|
3997
|
+
{
|
|
3998
|
+
"name": "date",
|
|
3999
|
+
"in": "path",
|
|
4000
|
+
"required": true,
|
|
4001
|
+
"schema": {
|
|
4002
|
+
"type": "string",
|
|
4003
|
+
"format": "date"
|
|
4004
|
+
}
|
|
4005
|
+
},
|
|
4006
|
+
{
|
|
4007
|
+
"name": "format",
|
|
4008
|
+
"in": "path",
|
|
4009
|
+
"description": "Output format id",
|
|
4010
|
+
"required": true,
|
|
4011
|
+
"schema": {
|
|
4012
|
+
"type": "string",
|
|
4013
|
+
"enum": [
|
|
4014
|
+
"parquet",
|
|
4015
|
+
"flatgeobuf"
|
|
4016
|
+
]
|
|
4017
|
+
},
|
|
4018
|
+
"example": "flatgeobuf"
|
|
4019
|
+
},
|
|
4020
|
+
{
|
|
4021
|
+
"name": "Range",
|
|
4022
|
+
"in": "header",
|
|
4023
|
+
"required": false,
|
|
4024
|
+
"schema": {
|
|
4025
|
+
"type": "string"
|
|
4026
|
+
},
|
|
4027
|
+
"example": "bytes=0-1023"
|
|
4028
|
+
}
|
|
4029
|
+
],
|
|
4030
|
+
"responses": {
|
|
4031
|
+
"200": {
|
|
4032
|
+
"description": "Whole file"
|
|
4033
|
+
},
|
|
4034
|
+
"206": {
|
|
4035
|
+
"description": "Partial content"
|
|
4036
|
+
},
|
|
4037
|
+
"302": {
|
|
4038
|
+
"description": "Redirect to a presigned URL (redirect mode)"
|
|
4039
|
+
},
|
|
4040
|
+
"400": {
|
|
4041
|
+
"description": "Unknown format id"
|
|
4042
|
+
},
|
|
4043
|
+
"403": {
|
|
4044
|
+
"description": "Insufficient privileges"
|
|
4045
|
+
},
|
|
4046
|
+
"404": {
|
|
4047
|
+
"description": "No published snapshot for that date, or that format was not produced"
|
|
3966
4048
|
},
|
|
3967
4049
|
"416": {
|
|
3968
4050
|
"description": "Range not satisfiable"
|
|
@@ -7704,7 +7786,7 @@
|
|
|
7704
7786
|
"description": "A published snapshot of a relation.",
|
|
7705
7787
|
"properties": {
|
|
7706
7788
|
"snapshot_date": {
|
|
7707
|
-
"description": "Read API for published
|
|
7789
|
+
"description": "Read API for published snapshots of a relation: list, metadata, and the\nfiles themselves with HEAD + byte-range support so Parquet readers (DuckDB\nread_parquet) can fetch footers and row groups selectively.\n\nA snapshot holds one data file per produced output format (SnapshotFormat).\n`/data` serves the Parquet, as it always has; `/data/{format}` serves a\nnamed one.\n\nAuthorization runs before any catalog file name or storage call: super\nusers always, sub-users by schema ownership or layer read privilege, and\nnever a sub-user the geofence filters (a whole-table file cannot honour a\nrow filter). Storage failures answer 502 without naming bucket or key.",
|
|
7708
7790
|
"type": "string",
|
|
7709
7791
|
"format": "date",
|
|
7710
7792
|
"example": "2026-09-16"
|
|
@@ -7727,6 +7809,13 @@
|
|
|
7727
7809
|
"type": "object"
|
|
7728
7810
|
}
|
|
7729
7811
|
},
|
|
7812
|
+
"formats": {
|
|
7813
|
+
"description": "One entry per requested output format; a produced one carries its `href` under /data/{format}.",
|
|
7814
|
+
"type": "array",
|
|
7815
|
+
"items": {
|
|
7816
|
+
"$ref": "#/components/schemas/SnapshotFormatResult"
|
|
7817
|
+
}
|
|
7818
|
+
},
|
|
7730
7819
|
"published": {
|
|
7731
7820
|
"type": "string",
|
|
7732
7821
|
"format": "date-time"
|
|
@@ -7752,7 +7841,7 @@
|
|
|
7752
7841
|
"description": "An import job of the scheduler. On PATCH every field is optional.",
|
|
7753
7842
|
"properties": {
|
|
7754
7843
|
"name": {
|
|
7755
|
-
"description": "
|
|
7844
|
+
"description": "Job name; the imported table is named after it, so it is normalised on write: transliterated to ASCII, lower-cased, characters other than letters, digits, / _ | + space and - removed, and every run of / _ | + space - replaced by a single underscore (\"Bygninger 2026-09\" becomes \"bygninger_2026_09\"). Read the job back to see the stored name.",
|
|
7756
7845
|
"type": "string",
|
|
7757
7846
|
"example": "bygninger"
|
|
7758
7847
|
},
|
|
@@ -7992,7 +8081,7 @@
|
|
|
7992
8081
|
"description": "A queued snapshot job.",
|
|
7993
8082
|
"properties": {
|
|
7994
8083
|
"id": {
|
|
7995
|
-
"description": "Asynchronous
|
|
8084
|
+
"description": "Asynchronous snapshots of a table or view to object storage.\n\nPOST queues a job (202) and a cron worker (app/scripts/snapshot_worker.php)\nexports the relation with ogr2ogr in every requested output format\n(SnapshotFormat: Parquet, FlatGeobuf) and uploads one data-<id>.<ext> per\nformat plus metadata-<id>.json. GET returns the job status, including what\nbecame of each format. Super-user only.",
|
|
7996
8085
|
"type": "string",
|
|
7997
8086
|
"example": "0b8c2f2e-2f5a-4d9c-9d3a-1b2c3d4e5f60"
|
|
7998
8087
|
},
|
|
@@ -8012,6 +8101,54 @@
|
|
|
8012
8101
|
},
|
|
8013
8102
|
"type": "object"
|
|
8014
8103
|
},
|
|
8104
|
+
"SnapshotFormatResult": {
|
|
8105
|
+
"description": "One output format of a snapshot and what became of it: `requested` before the worker ran, then `produced` (with file, size and media type) or `skipped` (with a reason, e.g. a geometry-only format on a relation without geometry).",
|
|
8106
|
+
"properties": {
|
|
8107
|
+
"format": {
|
|
8108
|
+
"type": "string",
|
|
8109
|
+
"enum": [
|
|
8110
|
+
"parquet",
|
|
8111
|
+
"flatgeobuf"
|
|
8112
|
+
],
|
|
8113
|
+
"example": "parquet"
|
|
8114
|
+
},
|
|
8115
|
+
"status": {
|
|
8116
|
+
"type": "string",
|
|
8117
|
+
"enum": [
|
|
8118
|
+
"requested",
|
|
8119
|
+
"produced",
|
|
8120
|
+
"skipped"
|
|
8121
|
+
],
|
|
8122
|
+
"example": "produced"
|
|
8123
|
+
},
|
|
8124
|
+
"file": {
|
|
8125
|
+
"description": "Produced only: file name in the snapshot directory.",
|
|
8126
|
+
"type": "string",
|
|
8127
|
+
"example": "data-0b8c2f2e-2f5a-4d9c-9d3a-1b2c3d4e5f60.parquet"
|
|
8128
|
+
},
|
|
8129
|
+
"size_bytes": {
|
|
8130
|
+
"description": "Produced only.",
|
|
8131
|
+
"type": "integer",
|
|
8132
|
+
"example": 123456
|
|
8133
|
+
},
|
|
8134
|
+
"media_type": {
|
|
8135
|
+
"description": "Produced only.",
|
|
8136
|
+
"type": "string",
|
|
8137
|
+
"example": "application/vnd.apache.parquet"
|
|
8138
|
+
},
|
|
8139
|
+
"reason": {
|
|
8140
|
+
"description": "Skipped only: why this format could not be produced.",
|
|
8141
|
+
"type": "string",
|
|
8142
|
+
"example": "relation has no geometry column"
|
|
8143
|
+
},
|
|
8144
|
+
"href": {
|
|
8145
|
+
"description": "Produced only, and only in the relation snapshot read API: where to download this format.",
|
|
8146
|
+
"type": "string",
|
|
8147
|
+
"example": "/api/v4/schemas/geodanmark/relations/bygning/snapshots/2026-09-16/data/parquet"
|
|
8148
|
+
}
|
|
8149
|
+
},
|
|
8150
|
+
"type": "object"
|
|
8151
|
+
},
|
|
8015
8152
|
"SnapshotRequest": {
|
|
8016
8153
|
"description": "A request to snapshot a table or view to Parquet on S3.",
|
|
8017
8154
|
"required": [
|
|
@@ -8036,6 +8173,22 @@
|
|
|
8036
8173
|
"description": "Optional EPSG code to reproject to. Omit to keep the native SRID.",
|
|
8037
8174
|
"type": "integer",
|
|
8038
8175
|
"example": 25832
|
|
8176
|
+
},
|
|
8177
|
+
"formats": {
|
|
8178
|
+
"title": "Formats",
|
|
8179
|
+
"description": "Output formats to produce, in the order they are produced. Omit to use the server default (App.php `snapshot.formats`). Must be non-empty and free of duplicates. A format that needs geometry (FlatGeobuf) is skipped with a reason for a relation without a geometry column — unless every requested format needs one, which is refused up front.",
|
|
8180
|
+
"type": "array",
|
|
8181
|
+
"items": {
|
|
8182
|
+
"type": "string",
|
|
8183
|
+
"enum": [
|
|
8184
|
+
"parquet",
|
|
8185
|
+
"flatgeobuf"
|
|
8186
|
+
]
|
|
8187
|
+
},
|
|
8188
|
+
"example": [
|
|
8189
|
+
"parquet",
|
|
8190
|
+
"flatgeobuf"
|
|
8191
|
+
]
|
|
8039
8192
|
}
|
|
8040
8193
|
},
|
|
8041
8194
|
"type": "object"
|
|
@@ -8062,6 +8215,13 @@
|
|
|
8062
8215
|
],
|
|
8063
8216
|
"example": 25832
|
|
8064
8217
|
},
|
|
8218
|
+
"formats": {
|
|
8219
|
+
"description": "One entry per requested output format and its outcome.",
|
|
8220
|
+
"type": "array",
|
|
8221
|
+
"items": {
|
|
8222
|
+
"$ref": "#/components/schemas/SnapshotFormatResult"
|
|
8223
|
+
}
|
|
8224
|
+
},
|
|
8065
8225
|
"status": {
|
|
8066
8226
|
"type": "string",
|
|
8067
8227
|
"enum": [
|
package/dist/index.js
CHANGED
|
@@ -286,7 +286,7 @@ const operationMap = new Map();
|
|
|
286
286
|
// Binary file endpoints: their tools answer with the file's URL and HEAD
|
|
287
287
|
// metadata instead of the body — a Parquet file cannot travel through an MCP
|
|
288
288
|
// text result.
|
|
289
|
-
const BINARY_URL_TOOLS = new Set(["getRelationSnapshotData", "getRelationSnapshotFile"]);
|
|
289
|
+
const BINARY_URL_TOOLS = new Set(["getRelationSnapshotData", "getRelationSnapshotDataFormat", "getRelationSnapshotFile"]);
|
|
290
290
|
for (const [pathStr, pathItem] of Object.entries(apiSpec.paths)) {
|
|
291
291
|
for (const [method, operation] of Object.entries(pathItem)) {
|
|
292
292
|
if (method === "parameters")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@centia-io/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"author": "",
|
|
25
25
|
"license": "ISC",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@centia-io/sdk": "^0.2.
|
|
27
|
+
"@centia-io/sdk": "^0.2.16",
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
29
29
|
"axios": "^1.13.5",
|
|
30
30
|
"zod": "^4.3.6"
|