debreu-mcp-admin 3.187.0 → 3.189.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 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) {
@@ -318,8 +319,9 @@ const COMMENT_DATA_MODELS = [
318
319
  "prospecting_portfolio_company",
319
320
  "deal_memo",
320
321
  "calendar",
322
+ "transaction",
321
323
  ];
322
- const COMMENT_DATA_MODEL_DESCRIPTION = "Record type. 'workflow' is a project tracker; 'deal_memo' is one stage's memo on a deal (it inherits that deal's access); 'calendar' is a meeting (pass its uuid from query_calendars / get_calendar; one thread spans every teammate's copy, open to whoever sees the meeting's full content); the prospecting_* types are prospecting-list rows (not CRM companies).";
324
+ const COMMENT_DATA_MODEL_DESCRIPTION = "Record type. 'workflow' is a project tracker; 'deal_memo' is one stage's memo on a deal (it inherits that deal's access); 'calendar' is a meeting (pass its uuid from query_calendars / get_calendar; one thread spans every teammate's copy, open to whoever sees the meeting's full content); the prospecting_* types are prospecting-list rows (not CRM companies); 'transaction' is a precedent deal (uuid from query_transactions).";
323
325
  // ---------------------------------------------------------------------------
324
326
  // User-facing read tool names — all POST to /api/v1/ext/tools/{slug}
325
327
  // ---------------------------------------------------------------------------
@@ -2888,7 +2890,7 @@ const USER_TOOLS = [
2888
2890
  description: "Delete a record by type and UUID. Supported types: company, person, task, " +
2889
2891
  "metric_schema, project, comment, status_definition, email, calendar, file, " +
2890
2892
  "port_co_relationship, fund, email_template, biopharma_asset, biopharma_indication, " +
2891
- "email_campaign (an outreach), workflow. " +
2893
+ "email_campaign (an outreach), workflow, transaction. " +
2892
2894
  "Performs soft delete (email/calendar/file use the same cascade behavior as app deletes). " +
2893
2895
  "For workflow, removes a tracker from a project — cascades its views and tracked " +
2894
2896
  "companies/people; tasks keep their rows with workflow_id cleared. Add a tracker with add_tracker. " +
@@ -2930,6 +2932,7 @@ const USER_TOOLS = [
2930
2932
  "biopharma_indication",
2931
2933
  "email_campaign",
2932
2934
  "workflow",
2935
+ "transaction",
2933
2936
  ],
2934
2937
  description: "Type of record to delete.",
2935
2938
  },
@@ -4020,7 +4023,7 @@ const ADMIN_TOOLS = [
4020
4023
  },
4021
4024
  ];
4022
4025
  // All tools combined
4023
- const TOOLS = [...USER_TOOLS, ...ADMIN_TOOLS];
4026
+ const TOOLS = [...USER_TOOLS, ...TRANSACTION_TOOLS, ...ADMIN_TOOLS];
4024
4027
  // ---------------------------------------------------------------------------
4025
4028
  // User-facing tool handler body key constants
4026
4029
  // ---------------------------------------------------------------------------
@@ -4075,8 +4078,8 @@ function extractActAsUser(args) {
4075
4078
  }
4076
4079
  async function handleUserTool(name, args) {
4077
4080
  const { actAsUser, cleanArgs } = extractActAsUser(args);
4078
- // Read tools all route through /api/v1/ext/tools/{slug}
4079
- if (USER_READ_TOOL_NAMES.has(name)) {
4081
+ // Read tools and the Transactions tools all route through /api/v1/ext/tools/{slug}
4082
+ if (USER_READ_TOOL_NAMES.has(name) || TRANSACTION_TOOL_NAMES.has(name)) {
4080
4083
  const slug = name.replace(/_/g, "-");
4081
4084
  return textResult(await apiPost(`/api/v1/ext/tools/${slug}`, cleanArgs, undefined, actAsUser));
4082
4085
  }
@@ -4783,7 +4786,7 @@ const DISABLED_TOOLS = new Set([
4783
4786
  "create_biopharma_indication",
4784
4787
  "update_biopharma_indication",
4785
4788
  ]);
4786
- const server = new Server({ name: "debreu-mcp-admin", version: "3.187.0" }, { capabilities: { tools: {} } });
4789
+ const server = new Server({ name: "debreu-mcp-admin", version: "3.189.0" }, { capabilities: { tools: {} } });
4787
4790
  // Metric-schema / status-definition EDIT tools, dropped from tools/list when the
4788
4791
  // key owner has the `hide_configurations` flag (the same flag that hides the FE
4789
4792
  // Configurations section). Reads stay listed — other tools depend on them.