debreu-mcp-admin 3.187.0 → 3.188.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 +8 -6
- package/dist/index.js.map +1 -1
- package/dist/transactionTools.d.ts +457 -0
- package/dist/transactionTools.js +144 -0
- package/dist/transactionTools.js.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
5
5
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
6
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
+
import { TRANSACTION_TOOLS, TRANSACTION_TOOL_NAMES } from "./transactionTools.js";
|
|
7
8
|
// <generated:deal-term-props>
|
|
8
9
|
// Generated from backend/app/services/project_deal_terms.py by
|
|
9
10
|
// scripts/gen_mcp_deal_term_props.py -- edit the field guide there, then re-run.
|
|
@@ -212,7 +213,7 @@ const OUTREACH_TOOL_NAMES = new Set([
|
|
|
212
213
|
/** Write tools whose 4xx detail is shown to the caller, like the outreach tools:
|
|
213
214
|
* their 400s explain a bad argument ("period_label 'last summer' is not a
|
|
214
215
|
* period: use YYYY, ...") that the model can fix and retry. */
|
|
215
|
-
const CLIENT_ERROR_TOOL_NAMES = new Set(["update_company", "update_project"]);
|
|
216
|
+
const CLIENT_ERROR_TOOL_NAMES = new Set(["update_company", "update_project", ...TRANSACTION_TOOL_NAMES]);
|
|
216
217
|
/** "HTTP 4xx: <detail>" from an ``HTTP 4xx: <body>`` error, or null. FastAPI
|
|
217
218
|
* bodies are ``{"detail": "..."}``, or a validation list on 422. */
|
|
218
219
|
function clientErrorMessage(msg) {
|
|
@@ -2888,7 +2889,7 @@ const USER_TOOLS = [
|
|
|
2888
2889
|
description: "Delete a record by type and UUID. Supported types: company, person, task, " +
|
|
2889
2890
|
"metric_schema, project, comment, status_definition, email, calendar, file, " +
|
|
2890
2891
|
"port_co_relationship, fund, email_template, biopharma_asset, biopharma_indication, " +
|
|
2891
|
-
"email_campaign (an outreach), workflow. " +
|
|
2892
|
+
"email_campaign (an outreach), workflow, transaction. " +
|
|
2892
2893
|
"Performs soft delete (email/calendar/file use the same cascade behavior as app deletes). " +
|
|
2893
2894
|
"For workflow, removes a tracker from a project — cascades its views and tracked " +
|
|
2894
2895
|
"companies/people; tasks keep their rows with workflow_id cleared. Add a tracker with add_tracker. " +
|
|
@@ -2930,6 +2931,7 @@ const USER_TOOLS = [
|
|
|
2930
2931
|
"biopharma_indication",
|
|
2931
2932
|
"email_campaign",
|
|
2932
2933
|
"workflow",
|
|
2934
|
+
"transaction",
|
|
2933
2935
|
],
|
|
2934
2936
|
description: "Type of record to delete.",
|
|
2935
2937
|
},
|
|
@@ -4020,7 +4022,7 @@ const ADMIN_TOOLS = [
|
|
|
4020
4022
|
},
|
|
4021
4023
|
];
|
|
4022
4024
|
// All tools combined
|
|
4023
|
-
const TOOLS = [...USER_TOOLS, ...ADMIN_TOOLS];
|
|
4025
|
+
const TOOLS = [...USER_TOOLS, ...TRANSACTION_TOOLS, ...ADMIN_TOOLS];
|
|
4024
4026
|
// ---------------------------------------------------------------------------
|
|
4025
4027
|
// User-facing tool handler body key constants
|
|
4026
4028
|
// ---------------------------------------------------------------------------
|
|
@@ -4075,8 +4077,8 @@ function extractActAsUser(args) {
|
|
|
4075
4077
|
}
|
|
4076
4078
|
async function handleUserTool(name, args) {
|
|
4077
4079
|
const { actAsUser, cleanArgs } = extractActAsUser(args);
|
|
4078
|
-
// Read tools all route through /api/v1/ext/tools/{slug}
|
|
4079
|
-
if (USER_READ_TOOL_NAMES.has(name)) {
|
|
4080
|
+
// Read tools and the Transactions tools all route through /api/v1/ext/tools/{slug}
|
|
4081
|
+
if (USER_READ_TOOL_NAMES.has(name) || TRANSACTION_TOOL_NAMES.has(name)) {
|
|
4080
4082
|
const slug = name.replace(/_/g, "-");
|
|
4081
4083
|
return textResult(await apiPost(`/api/v1/ext/tools/${slug}`, cleanArgs, undefined, actAsUser));
|
|
4082
4084
|
}
|
|
@@ -4783,7 +4785,7 @@ const DISABLED_TOOLS = new Set([
|
|
|
4783
4785
|
"create_biopharma_indication",
|
|
4784
4786
|
"update_biopharma_indication",
|
|
4785
4787
|
]);
|
|
4786
|
-
const server = new Server({ name: "debreu-mcp-admin", version: "3.
|
|
4788
|
+
const server = new Server({ name: "debreu-mcp-admin", version: "3.188.0" }, { capabilities: { tools: {} } });
|
|
4787
4789
|
// Metric-schema / status-definition EDIT tools, dropped from tools/list when the
|
|
4788
4790
|
// key owner has the `hide_configurations` flag (the same flag that hides the FE
|
|
4789
4791
|
// Configurations section). Reads stay listed — other tools depend on them.
|