@sodiumhq/mcp-pm 0.1.0-beta.6299 → 0.1.0-beta.6351

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/http.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as buildServer } from "./src-b0BBk3Y8.mjs";
2
+ import { t as buildServer } from "./src-CRE2Nlq7.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { SUPPORTED_PROTOCOL_VERSIONS, createMcpHandler } from "@modelcontextprotocol/server";
5
5
  import { createHash, randomUUID } from "node:crypto";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as buildServer } from "./src-b0BBk3Y8.mjs";
2
+ import { t as buildServer } from "./src-CRE2Nlq7.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { serveStdio } from "@modelcontextprotocol/server/stdio";
5
5
  import { parseArgs } from "node:util";
@@ -9376,15 +9376,25 @@ function captureClientInfo(server, api) {
9376
9376
  version: info.version
9377
9377
  });
9378
9378
  }
9379
+ function withAnnotationTitle(config) {
9380
+ if (!config.title) return config;
9381
+ return {
9382
+ ...config,
9383
+ annotations: {
9384
+ title: config.title,
9385
+ ...config.annotations
9386
+ }
9387
+ };
9388
+ }
9379
9389
  function registerTenantTool(server, api, name, config, cb) {
9380
9390
  const inputSchema = {
9381
9391
  ...config.inputSchema ?? {},
9382
9392
  practice: practiceField
9383
9393
  };
9384
- server.registerTool(name, {
9394
+ server.registerTool(name, withAnnotationTitle({
9385
9395
  ...config,
9386
9396
  inputSchema
9387
- }, async (args, extra) => {
9397
+ }), async (args, extra) => {
9388
9398
  const started = Date.now();
9389
9399
  captureClientInfo(server, api);
9390
9400
  const { practice, ...rest } = args;
@@ -9464,7 +9474,7 @@ async function buildServer(config) {
9464
9474
  openWorldHint: true
9465
9475
  }
9466
9476
  }, () => handleGetPracticeDetails(api));
9467
- server.registerTool("whoami", {
9477
+ server.registerTool("whoami", withAnnotationTitle({
9468
9478
  title: "Show current user and tenant info",
9469
9479
  description: "Returns the identity of the authenticated user (name, email, code), the tenant/practice the call runs against (name, code, status), and the practice name. Use this when the user asks 'who am I?', 'which tenant am I connected to?', 'what account is this?', or when debugging authentication/permission issues. The optional 'practice' argument picks the practice section shown; without it the user's lone practice is used, and the identity section still answers when no practice can be resolved.",
9470
9480
  inputSchema: { practice: practiceField },
@@ -9473,12 +9483,12 @@ async function buildServer(config) {
9473
9483
  idempotentHint: true,
9474
9484
  openWorldHint: true
9475
9485
  }
9476
- }, async (args) => {
9486
+ }), async (args) => {
9477
9487
  captureClientInfo(server, api);
9478
9488
  await resolveTenantForCall(api, args.practice);
9479
9489
  return handleWhoami(api);
9480
9490
  });
9481
- server.registerTool("list_practices", {
9491
+ server.registerTool("list_practices", withAnnotationTitle({
9482
9492
  title: "List the practices you can work in",
9483
9493
  description: "List the practices (tenants) the signed-in user belongs to. Use this when the user belongs to more than one practice and you need the codes to pass in other tools' 'practice' argument, or when the user asks 'which practices can I access?'. Practices flagged 'unavailable' cannot be worked in.",
9484
9494
  inputSchema: {},
@@ -9487,7 +9497,7 @@ async function buildServer(config) {
9487
9497
  idempotentHint: true,
9488
9498
  openWorldHint: true
9489
9499
  }
9490
- }, () => {
9500
+ }), () => {
9491
9501
  captureClientInfo(server, api);
9492
9502
  return handleListPractices(api);
9493
9503
  });
@@ -9694,7 +9704,7 @@ async function buildServer(config) {
9694
9704
  inputSchema: ListWorkflowOccurrencesInputSchema,
9695
9705
  annotations: reportAnnotations
9696
9706
  }, (args) => handleListWorkflowOccurrences(api, args));
9697
- server.registerTool("get_usage_examples", {
9707
+ server.registerTool("get_usage_examples", withAnnotationTitle({
9698
9708
  title: "Show example prompts for this integration",
9699
9709
  description: "Returns a curated cookbook of example prompts this Sodium integration answers well, grouped by topic (daily-workflow, clients, tasks-and-deadlines, client-requests, time-tracking, reports, companies-house, proposals-and-engagements, making-changes). Use when the user asks 'what can you do?', 'what can I ask about my Sodium data?', 'give me some examples', or seems unsure how to get value from the integration. Also useful onboarding a new user: show the overview, then drill into the topic nearest their role. Static content — makes no API call.",
9700
9710
  inputSchema: GetUsageExamplesInputSchema,
@@ -9703,7 +9713,7 @@ async function buildServer(config) {
9703
9713
  idempotentHint: true,
9704
9714
  openWorldHint: false
9705
9715
  }
9706
- }, (args) => handleGetUsageExamples(args));
9716
+ }), (args) => handleGetUsageExamples(args));
9707
9717
  const lookupAnnotations = {
9708
9718
  readOnlyHint: true,
9709
9719
  idempotentHint: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sodiumhq/mcp-pm",
3
- "version": "0.1.0-beta.6299",
3
+ "version": "0.1.0-beta.6351",
4
4
  "description": "Sodium Practice Management MCP server — lets AI assistants interact with your Sodium tenant",
5
5
  "type": "module",
6
6
  "bin": {