@chaprola/mcp-server 1.2.0 → 1.3.0
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/dist/index.js +37 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -665,6 +665,43 @@ server.tool("chaprola_schedule_delete", "Delete a scheduled job by name", {
|
|
|
665
665
|
const res = await authedFetch("/schedule/delete", { name });
|
|
666
666
|
return textResult(res);
|
|
667
667
|
}));
|
|
668
|
+
// --- Record CRUD ---
|
|
669
|
+
server.tool("chaprola_insert_record", "Insert a new record into a data file's merge file (.MRG). The record appears at the end of the file until consolidation.", {
|
|
670
|
+
project: z.string().describe("Project name"),
|
|
671
|
+
file: z.string().describe("Data file name (without extension)"),
|
|
672
|
+
record: z.record(z.string()).describe("Field name → value pairs. Unspecified fields default to blanks."),
|
|
673
|
+
}, async ({ project, file, record }) => withBaaCheck(async () => {
|
|
674
|
+
const { username } = getCredentials();
|
|
675
|
+
const res = await authedFetch("/insert-record", { userid: username, project, file, record });
|
|
676
|
+
return textResult(res);
|
|
677
|
+
}));
|
|
678
|
+
server.tool("chaprola_update_record", "Update fields in a single record matched by a where clause. If no sort-key changes, updates in place; otherwise marks old record ignored and appends to merge file.", {
|
|
679
|
+
project: z.string().describe("Project name"),
|
|
680
|
+
file: z.string().describe("Data file name (without extension)"),
|
|
681
|
+
where: z.record(z.string()).describe("Field name → value pairs to identify exactly one record"),
|
|
682
|
+
set: z.record(z.string()).describe("Field name → new value pairs to update"),
|
|
683
|
+
}, async ({ project, file, where: whereClause, set }) => withBaaCheck(async () => {
|
|
684
|
+
const { username } = getCredentials();
|
|
685
|
+
const res = await authedFetch("/update-record", { userid: username, project, file, where: whereClause, set });
|
|
686
|
+
return textResult(res);
|
|
687
|
+
}));
|
|
688
|
+
server.tool("chaprola_delete_record", "Delete a single record matched by a where clause. Marks the record as ignored (.IGN). Physically removed on consolidation.", {
|
|
689
|
+
project: z.string().describe("Project name"),
|
|
690
|
+
file: z.string().describe("Data file name (without extension)"),
|
|
691
|
+
where: z.record(z.string()).describe("Field name → value pairs to identify exactly one record"),
|
|
692
|
+
}, async ({ project, file, where: whereClause }) => withBaaCheck(async () => {
|
|
693
|
+
const { username } = getCredentials();
|
|
694
|
+
const res = await authedFetch("/delete-record", { userid: username, project, file, where: whereClause });
|
|
695
|
+
return textResult(res);
|
|
696
|
+
}));
|
|
697
|
+
server.tool("chaprola_consolidate", "Merge a .MRG file into its parent .DA, producing a clean sorted data file. Deletes .MRG and .IGN after success. Aborts if .MRG was modified during the operation.", {
|
|
698
|
+
project: z.string().describe("Project name"),
|
|
699
|
+
file: z.string().describe("Data file name (without extension)"),
|
|
700
|
+
}, async ({ project, file }) => withBaaCheck(async () => {
|
|
701
|
+
const { username } = getCredentials();
|
|
702
|
+
const res = await authedFetch("/consolidate", { userid: username, project, file });
|
|
703
|
+
return textResult(res);
|
|
704
|
+
}));
|
|
668
705
|
// --- Start server ---
|
|
669
706
|
async function main() {
|
|
670
707
|
const transport = new StdioServerTransport();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaprola/mcp-server",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "MCP server for Chaprola — agent-first data platform. Gives AI agents
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "MCP server for Chaprola — agent-first data platform. Gives AI agents 46 tools for structured data storage, record CRUD, querying, schema inspection, web search, URL fetching, scheduled jobs, and execution via plain HTTP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|