@centia-io/mcp-server 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/centia-api.json +109 -52
  2. package/package.json +1 -1
package/centia-api.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "tags": [
14
14
  "Methods"
15
15
  ],
16
- "description": "Call a RPC method",
16
+ "description": "Call a JSON-RPC method with or without parameters. The method must be defined in the database. See /api/v4/methods (postRpc) ",
17
17
  "operationId": "postCall",
18
18
  "requestBody": {
19
19
  "description": "RPC method call",
@@ -28,9 +28,44 @@
28
28
  },
29
29
  "responses": {
30
30
  "200": {
31
- "description": "OK",
31
+ "description": "Ok",
32
32
  "content": {
33
- "application/json": {}
33
+ "application/json": {},
34
+ "application/gpx": {},
35
+ "application/octet-stream": {}
36
+ }
37
+ },
38
+ "400": {
39
+ "description": "Bad request"
40
+ }
41
+ }
42
+ }
43
+ },
44
+ "/api/v4/call/dry": {
45
+ "post": {
46
+ "tags": [
47
+ "Methods"
48
+ ],
49
+ "description": "Dry run the RPC-JSON call to infer the types and store them. \n Types are only inferred and stored when dry running calls. Dry runs doesn't make effects on the database.\n Dry-run before getting TypeScript types from /api/v4/interfaces (getTypeScript)",
50
+ "operationId": "postCallDry",
51
+ "requestBody": {
52
+ "description": "RPC method call",
53
+ "required": true,
54
+ "content": {
55
+ "application/json": {
56
+ "schema": {
57
+ "$ref": "#/components/schemas/Call"
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "responses": {
63
+ "200": {
64
+ "description": "Ok",
65
+ "content": {
66
+ "application/json": {},
67
+ "application/gpx": {},
68
+ "application/octet-stream": {}
34
69
  }
35
70
  },
36
71
  "400": {
@@ -925,7 +960,7 @@
925
960
  "tags": [
926
961
  "Methods"
927
962
  ],
928
- "description": "Get JSON-RPC method(s)",
963
+ "description": "Get JSON-RPC method definitions.",
929
964
  "operationId": "getRpc",
930
965
  "parameters": [
931
966
  {
@@ -952,11 +987,35 @@
952
987
  }
953
988
  }
954
989
  },
990
+ "delete": {
991
+ "tags": [
992
+ "Methods"
993
+ ],
994
+ "description": "Delete JSON-RPC method(s).",
995
+ "operationId": "deleteRpc",
996
+ "parameters": [
997
+ {
998
+ "name": "method",
999
+ "in": "path",
1000
+ "description": "Name of method",
1001
+ "required": true,
1002
+ "example": "myStatement"
1003
+ }
1004
+ ],
1005
+ "responses": {
1006
+ "204": {
1007
+ "description": "Method deleted"
1008
+ },
1009
+ "404": {
1010
+ "description": "Not found"
1011
+ }
1012
+ }
1013
+ },
955
1014
  "patch": {
956
1015
  "tags": [
957
1016
  "Methods"
958
1017
  ],
959
- "description": "Update JSON-RPC method(s)",
1018
+ "description": "Update existing JSON-RPC method(s).",
960
1019
  "operationId": "patchRpc",
961
1020
  "parameters": [
962
1021
  {
@@ -996,7 +1055,7 @@
996
1055
  "tags": [
997
1056
  "Methods"
998
1057
  ],
999
- "description": "Create JSON-RPC method(s)",
1058
+ "description": "Create JSON-RPC method(s). This means you define a named method which holds your SQL query along with optional instructions on how to interpret and format the data types.",
1000
1059
  "operationId": "postRpc",
1001
1060
  "requestBody": {
1002
1061
  "description": "RPC method to create",
@@ -1022,32 +1081,6 @@
1022
1081
  }
1023
1082
  }
1024
1083
  },
1025
- "/api/v4/methods/{id}": {
1026
- "delete": {
1027
- "tags": [
1028
- "Methods"
1029
- ],
1030
- "description": "Delete JSON-RPC method(s)",
1031
- "operationId": "deleteRpc",
1032
- "parameters": [
1033
- {
1034
- "name": "id",
1035
- "in": "path",
1036
- "description": "Name of method",
1037
- "required": true,
1038
- "example": "myStatement"
1039
- }
1040
- ],
1041
- "responses": {
1042
- "204": {
1043
- "description": "Method deleted"
1044
- },
1045
- "404": {
1046
- "description": "Not found"
1047
- }
1048
- }
1049
- }
1050
- },
1051
1084
  "/api/v4/oauth": {
1052
1085
  "post": {
1053
1086
  "tags": [
@@ -1208,7 +1241,7 @@
1208
1241
  "tags": [
1209
1242
  "Methods"
1210
1243
  ],
1211
- "description": "Get the interfaces for all RPC-JSON methods.",
1244
+ "description": "Get the interfaces for all RPC-JSON methods. Returns TypeScript interfaces inferred from dry-runs via /api/v4/call/dry (postCallDry)",
1212
1245
  "operationId": "getTypeScript",
1213
1246
  "responses": {
1214
1247
  "200": {
@@ -1550,11 +1583,13 @@
1550
1583
  "200": {
1551
1584
  "description": "Ok",
1552
1585
  "content": {
1553
- "application/json": {}
1586
+ "application/json": {},
1587
+ "application/gpx": {},
1588
+ "application/octet-stream": {}
1554
1589
  }
1555
1590
  },
1556
1591
  "500": {
1557
- "description": "Internal error. Most like an SQL error."
1592
+ "description": "Internal error. Most likely an SQL error."
1558
1593
  }
1559
1594
  }
1560
1595
  }
@@ -1837,7 +1872,7 @@
1837
1872
  "tags": [
1838
1873
  "Users"
1839
1874
  ],
1840
- "description": "Get rules",
1875
+ "description": "Get user(s)",
1841
1876
  "operationId": "getUser",
1842
1877
  "parameters": [
1843
1878
  {
@@ -1870,7 +1905,7 @@
1870
1905
  "tags": [
1871
1906
  "Users"
1872
1907
  ],
1873
- "description": "New user",
1908
+ "description": "Create user(s)",
1874
1909
  "operationId": "postUser",
1875
1910
  "requestBody": {
1876
1911
  "description": "New user",
@@ -1901,7 +1936,7 @@
1901
1936
  "tags": [
1902
1937
  "Users"
1903
1938
  ],
1904
- "description": "Delete user",
1939
+ "description": "Delete user(s)",
1905
1940
  "operationId": "deleteUsers",
1906
1941
  "parameters": [
1907
1942
  {
@@ -1925,7 +1960,7 @@
1925
1960
  "tags": [
1926
1961
  "Users"
1927
1962
  ],
1928
- "description": "Update user",
1963
+ "description": "Update user(s)",
1929
1964
  "operationId": "patchUser",
1930
1965
  "parameters": [
1931
1966
  {
@@ -1981,13 +2016,13 @@
1981
2016
  },
1982
2017
  "id": {
1983
2018
  "title": "Identifier",
1984
- "description": "An identifier established by the Client that MUST contain a string if included",
2019
+ "description": "An identifier established by the Client that MUST contain a string if included.",
1985
2020
  "type": "string",
1986
2021
  "example": "1"
1987
2022
  },
1988
2023
  "method": {
1989
2024
  "title": "Method name",
1990
- "description": "A String containing the name of the method to be invoked or created",
2025
+ "description": "A String containing the name of the method to be invoked or created.",
1991
2026
  "type": "string",
1992
2027
  "example": "getDate"
1993
2028
  },
@@ -1998,9 +2033,14 @@
1998
2033
  "items": {
1999
2034
  "type": "object"
2000
2035
  },
2001
- "example": {
2002
- "my_date": "2011 04 01"
2003
- }
2036
+ "example": [
2037
+ {
2038
+ "my_date": "2011 04 01"
2039
+ },
2040
+ {
2041
+ "my_string": "hello world"
2042
+ }
2043
+ ]
2004
2044
  }
2005
2045
  },
2006
2046
  "type": "object"
@@ -2102,7 +2142,7 @@
2102
2142
  },
2103
2143
  "type": {
2104
2144
  "title": "Type",
2105
- "description": "The type of the column, like varchar, integer, boolean etc.",
2145
+ "description": "The type of the column, like varchar, integer, boolean etc. Array types are denoted by adding [] to the type, e.g. varchar[].",
2106
2146
  "type": "string",
2107
2147
  "example": "int"
2108
2148
  },
@@ -2128,6 +2168,12 @@
2128
2168
  "by default"
2129
2169
  ],
2130
2170
  "example": "always"
2171
+ },
2172
+ "comment": {
2173
+ "title": "Comment",
2174
+ "description": "Comment on the column.",
2175
+ "type": "string",
2176
+ "example": "This is a comment on the column"
2131
2177
  }
2132
2178
  },
2133
2179
  "type": "object"
@@ -2470,7 +2516,7 @@
2470
2516
  },
2471
2517
  "q": {
2472
2518
  "title": "Query",
2473
- "description": "SQL statement. SELECT, INSERT, UPDATE or DELETE.",
2519
+ "description": "SQL statement. SELECT, INSERT, UPDATE, DELETE or MERGE.",
2474
2520
  "type": "string",
2475
2521
  "example": "SELECT :my_date::date as my_date"
2476
2522
  },
@@ -2810,7 +2856,7 @@
2810
2856
  "properties": {
2811
2857
  "q": {
2812
2858
  "title": "Query",
2813
- "description": "SQL statement. SELECT, INSERT, UPDATE, DELETE or MERGE.",
2859
+ "description": "SQL statement. SELECT, INSERT, UPDATE, DELETE or MERGE. No DDL, transaction control, etc.",
2814
2860
  "type": "string",
2815
2861
  "example": "SELECT :my_date::date as my_date"
2816
2862
  },
@@ -2821,13 +2867,18 @@
2821
2867
  "items": {
2822
2868
  "type": "object"
2823
2869
  },
2824
- "example": {
2825
- "my_date": "2011 04 01"
2826
- }
2870
+ "example": [
2871
+ {
2872
+ "my_date": "2011 04 01"
2873
+ },
2874
+ {
2875
+ "my_string": "hello world"
2876
+ }
2877
+ ]
2827
2878
  },
2828
2879
  "type_hints": {
2829
2880
  "title": "Type hints",
2830
- "description": "For JSON represented parameters which are not of JSON type.",
2881
+ "description": "For JSON represented parameters which are not of JSON/JSONB type.",
2831
2882
  "type": "object",
2832
2883
  "example": {
2833
2884
  "my_date": "date"
@@ -2843,7 +2894,7 @@
2843
2894
  },
2844
2895
  "output_format": {
2845
2896
  "title": "Output format",
2846
- "description": "The wanted output format.",
2897
+ "description": "The wanted output format. json, csv, ndjson, excel or ogr/[any ogr vector format] (e.g 'ogr/ESRI Shape')",
2847
2898
  "type": "string",
2848
2899
  "default": "json",
2849
2900
  "example": "csv"
@@ -3004,6 +3055,12 @@
3004
3055
  "items": {
3005
3056
  "$ref": "#/components/schemas/Constraint"
3006
3057
  }
3058
+ },
3059
+ "comment": {
3060
+ "title": "Comment",
3061
+ "description": "Comment on the table",
3062
+ "type": "string",
3063
+ "example": "This is a comment on the table"
3007
3064
  }
3008
3065
  },
3009
3066
  "type": "object"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centia-io/mcp-server",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "publishConfig": { "access": "public" },
5
5
  "description": "Centia MCP Server",
6
6
  "type": "module",