@crscreditapi/finstack-mcp-server 0.7.0-3660044 → 0.7.0-92ce169

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.
@@ -7,9 +7,14 @@ export async function handleGetCustomerSummary(args) {
7
7
  const client = getClient(args.environment ?? 'prod');
8
8
  return getCustomerSummary(client, args.customer_code);
9
9
  }
10
+ // The portal's own default (0.9, Dice bigram similarity) is too strict for
11
+ // short-name lookups: "brainsome" vs "Brainsome LTD" scores 0.889 because the
12
+ // legal-suffix bigrams count against it. 0.6 still matches the short form of
13
+ // names with LTD / Inc / LLC / GmbH suffixes while rejecting unrelated names.
14
+ const DEFAULT_SEARCH_THRESHOLD = 0.6;
10
15
  export async function handleSearchCustomer(args) {
11
16
  const client = getClient(args.environment ?? 'prod');
12
- return searchCustomers(client, args.q, args.threshold);
17
+ return searchCustomers(client, args.q, args.threshold ?? DEFAULT_SEARCH_THRESHOLD);
13
18
  }
14
19
  export async function handleGetCustomerRevenue(args) {
15
20
  const client = getClient(args.environment ?? 'prod');
@@ -20,7 +20,7 @@ export const customerTools = [
20
20
  },
21
21
  {
22
22
  name: 'finstack_search_customer',
23
- description: "Find a B2B customer's code (CID) by fuzzy-matching their name. Use this when the user references a customer by name but hasn't supplied a CID — pass the returned customer_code into finstack_get_customer_summary. If no matches at the default threshold, lower it (e.g. 0.5) to broaden the search.",
23
+ description: "Find a B2B customer's code (CID) by fuzzy-matching their name. Use this when the user references a customer by name but hasn't supplied a CID — pass the returned customer_code into finstack_get_customer_summary. Default threshold is 0.6, which matches short names against their legal form ('brainsome' finds 'Brainsome LTD'). If there are no matches, retry once at 0.4; if there are too many, raise it.",
24
24
  inputSchema: {
25
25
  type: 'object',
26
26
  properties: {
@@ -31,7 +31,7 @@ export const customerTools = [
31
31
  },
32
32
  threshold: {
33
33
  type: 'number',
34
- description: 'Similarity threshold 0.0-1.0 (default 0.9). Lower for fuzzier matches.',
34
+ description: 'Similarity threshold 0.0-1.0 (default 0.6). Lower for fuzzier matches, raise to narrow.',
35
35
  minimum: 0,
36
36
  maximum: 1,
37
37
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crscreditapi/finstack-mcp-server",
3
- "version": "0.7.0-3660044",
3
+ "version": "0.7.0-92ce169",
4
4
  "description": "MCP server for Finstack",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",