@limeadelabs/clarabit-mcp 2.0.2 → 2.1.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 +23 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -207,6 +207,9 @@ var ClarabitClient = class {
|
|
|
207
207
|
updateContextEntry(identifier, data) {
|
|
208
208
|
return this.request("PATCH", `/contexts/${encodeURIComponent(identifier)}`, data);
|
|
209
209
|
}
|
|
210
|
+
createContextEntry(data) {
|
|
211
|
+
return this.request("POST", "/contexts", data);
|
|
212
|
+
}
|
|
210
213
|
createSession(taskId, agentType, agentId) {
|
|
211
214
|
return this.request("POST", "/sessions", {
|
|
212
215
|
task_id: taskId,
|
|
@@ -799,6 +802,26 @@ function registerContextTools(server2, client2) {
|
|
|
799
802
|
}
|
|
800
803
|
}
|
|
801
804
|
);
|
|
805
|
+
server2.tool(
|
|
806
|
+
"cla_context_create",
|
|
807
|
+
"Create a new context entry. Required: name, entry_type, content. Optional: project_id (scope to project), workspace_id (when API key is not workspace-scoped), change_summary (initial commit message). Returns the new entry with id + slug.",
|
|
808
|
+
{
|
|
809
|
+
name: z9.string().describe("Display name of the entry"),
|
|
810
|
+
entry_type: z9.string().describe('Entry type (e.g., "instructions", "conventions", "architecture", "reference")'),
|
|
811
|
+
content: z9.string().describe("Initial markdown content"),
|
|
812
|
+
change_summary: z9.string().optional().describe("Initial commit message (defaults to a generic message if omitted)"),
|
|
813
|
+
project_id: z9.coerce.number().optional().describe("Scope entry to a project (omit for workspace-level)"),
|
|
814
|
+
workspace_id: z9.coerce.number().optional().describe("Workspace ID (only needed when API key is not workspace-scoped)")
|
|
815
|
+
},
|
|
816
|
+
async (params) => {
|
|
817
|
+
try {
|
|
818
|
+
const result = await client2.createContextEntry(params);
|
|
819
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
820
|
+
} catch (error) {
|
|
821
|
+
return handleError(error, client2.timeoutMs);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
);
|
|
802
825
|
server2.tool(
|
|
803
826
|
"cla_context_update",
|
|
804
827
|
"Update a context entry's content (requires write access)",
|