@edda-business/mcp 0.53.0 → 0.54.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/package.json +1 -1
- package/src/server.js +22 -12
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -22,7 +22,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
22
22
|
import { z } from "zod";
|
|
23
23
|
import { get, post, del } from "./client.js";
|
|
24
24
|
|
|
25
|
-
export const SERVER_VERSION = "0.
|
|
25
|
+
export const SERVER_VERSION = "0.54.0";
|
|
26
26
|
|
|
27
27
|
// ─── helpers ──────────────────────────────────────────────────────────────────
|
|
28
28
|
|
|
@@ -710,27 +710,37 @@ export function createServer() {
|
|
|
710
710
|
// ===========================================================================
|
|
711
711
|
server.tool(
|
|
712
712
|
"propose_company_file",
|
|
713
|
-
"
|
|
714
|
-
"
|
|
715
|
-
"
|
|
716
|
-
"
|
|
717
|
-
"
|
|
718
|
-
"
|
|
719
|
-
"
|
|
713
|
+
"Propose a markdown file for the SHARED COMPANY vault — the workspace's declared knowledge " +
|
|
714
|
+
"(policies, playbooks, decisions, SOPs, how-we-work) that every member's agent can read via " +
|
|
715
|
+
"search_company_knowledge. This OPENS A PULL REQUEST against the connected company repo for a " +
|
|
716
|
+
"human to review and merge in GitHub — nothing goes live until it's merged (company knowledge " +
|
|
717
|
+
"is shared + institutional, so review-before-publish is the default; on merge the normal git " +
|
|
718
|
+
"sync ingests it). Use it to contribute company-wide knowledge. ADMIN-ONLY: only an owner/admin " +
|
|
719
|
+
"may propose; a regular member's agent can READ the vault but gets a permission message here. " +
|
|
720
|
+
"NOT the member's private notes (use propose_vault_file), NOT a note on a contact (use save_note).",
|
|
720
721
|
{
|
|
721
722
|
folder: z.string().describe("The company-vault folder to file under (e.g. 'company-wiki', 'decisions', 'projects', 'clients'). Must be an existing company folder; no slashes."),
|
|
722
723
|
name: z.string().describe("The file name, ending in .md, e.g. 'Refund Policy.md' or 'Q3 Planning — 2026-08-22.md'."),
|
|
723
724
|
content: z.string().describe("The full markdown content of the file."),
|
|
724
725
|
subfolder: z.string().optional().describe("Optional subfolder within the folder."),
|
|
726
|
+
message: z.string().optional().describe("Optional PR title / commit message describing the change."),
|
|
727
|
+
pr_group: z.string().optional().describe("Optional key to batch several proposals from one work session into a SINGLE pull request (same key → same PR)."),
|
|
725
728
|
},
|
|
726
|
-
async ({ folder, name, content, subfolder }) => {
|
|
729
|
+
async ({ folder, name, content, subfolder, message, pr_group }) => {
|
|
727
730
|
try {
|
|
728
|
-
await post("/v2/company/propose", { folder, name, content, subfolder });
|
|
729
|
-
|
|
731
|
+
const r = await post("/v2/company/propose", { folder, name, content, subfolder, message, pr_group });
|
|
732
|
+
const how = r?.added_to_existing ? "added to the open PR" : "opened a pull request";
|
|
733
|
+
return { content: [{ type: "text", text: `Proposed "${name}" — ${how}${r?.pr_url ? `: ${r.pr_url}` : ""}. Review the diff and merge it in GitHub to publish into company knowledge.` }] };
|
|
730
734
|
} catch (e) {
|
|
731
735
|
const msg = String(e?.message || e);
|
|
732
736
|
if (msg.includes("admins_only") || msg.includes("(403)")) {
|
|
733
|
-
return { content: [{ type: "text", text: `Not
|
|
737
|
+
return { content: [{ type: "text", text: `Not proposed — writing to the company vault is admin-only. You can READ it with search_company_knowledge, but only an owner/admin can propose changes.` }] };
|
|
738
|
+
}
|
|
739
|
+
if (msg.includes("no_company_repo")) {
|
|
740
|
+
return { content: [{ type: "text", text: `Not proposed — no company GitHub repo is connected. An admin connects one under Company vault first.` }] };
|
|
741
|
+
}
|
|
742
|
+
if (msg.includes("repo_write_denied")) {
|
|
743
|
+
return { content: [{ type: "text", text: `Not proposed — the connected repo token is read-only. An admin must reconnect it with Contents:write + Pull requests:write.` }] };
|
|
734
744
|
}
|
|
735
745
|
throw e;
|
|
736
746
|
}
|