@vectros-ai/mcp-server 0.18.0 → 0.18.1

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/cli.mjs CHANGED
@@ -3,7 +3,7 @@
3
3
  // src/server.ts
4
4
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
5
5
 
6
- // node_modules/@vectros-ai/sdk/dist/index.mjs
6
+ // ../../node_modules/@vectros-ai/sdk/dist/index.mjs
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
9
9
  for (var name in all)
@@ -2433,7 +2433,7 @@ var AuthClient = class {
2433
2433
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/jwks");
2434
2434
  }
2435
2435
  /**
2436
- * Returns a page of per-subject PHI read-access rows: who read which subject's PHI, when, against which record, and whether any sensitive value was actually revealed in plaintext. Metadata only — never the PHI itself. This is the disclosure-accounting surface from which a covered entity derives its HIPAA §164.528 accounting of disclosures. Provide at least one query axis: a subject (`subjectType` + `subjectId`) within a `contextId` for the primary accounting query; `resourceId` within a `contextId` for 'who read this record'; `callerKeyId` for 'what did this credential read' (account-wide forensic); or `contextId` alone to enumerate a whole context. `from`/`to` bound the time window. Results are scoped to your account, derived from your token — never from input. Requires the `access-log:r` scope.
2436
+ * Returns a page of per-subject PHI read-access rows: who read which subject's PHI, when, against which record, and whether any sensitive value was actually revealed in plaintext. Metadata only — never the PHI itself. Rows exist only where read-access logging is enabled. Provide at least one query axis: a subject (`subjectType` + `subjectId`) within a `contextId` for the primary accounting query; `resourceId` within a `contextId` for 'who read this record'; `callerKeyId` for 'what did this credential read' (account-wide forensic); or `contextId` alone to enumerate a whole context. `from`/`to` bound the time window. Results are scoped to your account, derived from your token — never from input. Requires the `access-log:r` scope.
2437
2437
  *
2438
2438
  * @param {Vectros.GetAccessLogRequest} request
2439
2439
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -4138,7 +4138,7 @@ var AuthClient = class {
4138
4138
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers/{issuerId}");
4139
4139
  }
4140
4140
  /**
4141
- * Updates the mutable fields of a registered issuer: `subClaim`, `emailClaim`, `userinfoUri`, `capturedClaims`, `restrictedToDomain` (a new non-blank value must already be a VERIFIED domain for your account; an empty string clears it back to domain-less; see `IssuerUpdateRequest.restrictedToDomain` for the full semantics), `status` (`active`/`suspended` — a registration awaiting verification (`pending_verification`) accepts no status change until it is verified; a suspended issuer's tokens are rejected identically to an unregistered issuer at exchange time), and `selfSignupPolicies`. Fields omitted from the body are left unchanged (partial update). `issuer`, `jwksUri`, `audience`, and `contextId` are trust-anchor / routing-pin fields and are immutable via this route — supplying a value that differs from the current registration is rejected with 400; supplying the current value back is a no-op. Rotating a trust anchor requires deleting and re-registering the issuer, which is itself refused while any user is bound through it. **`subClaim` is identity-determining, not merely cosmetic**: it names which verified JWT claim is read as the federated user's identifier, so changing it on an issuer that already has bound users would silently re-identify (or, under self-signup, orphan) every one of them — changing it is therefore refused once any user has bound through this issuer, the same guard `DELETE` already applies, and is only free before the first real login. Requires a root API key or the bootstrap's provisioning capability, gated identically to every other operation on this surface. A credential confined to one app context may only update an issuer registered in that context; naming one registered in another context returns 404, identically to a nonexistent issuerId. A root API key may update any issuer.
4141
+ * Updates the mutable fields of a registered issuer: `subClaim`, `emailClaim`, `userinfoUri`, `capturedClaims`, `restrictedToDomain` (a new non-blank value must already be a VERIFIED domain for your account; an empty string clears it where permitted; see `IssuerUpdateRequest.restrictedToDomain` for the full semantics), `status` (`active`/`suspended` — a registration awaiting verification (`pending_verification`) accepts no status change until it is verified; a suspended issuer's tokens are rejected identically to an unregistered issuer at exchange time), and `selfSignupPolicies`. Fields omitted from the body are left unchanged (partial update). `issuer`, `jwksUri`, `audience`, and `contextId` are trust-anchor / routing-pin fields and are immutable via this route — supplying a value that differs from the current registration is rejected with 400; supplying the current value back is a no-op. Rotating a trust anchor requires deleting and re-registering the issuer, which is itself refused while any user is bound through it. **`subClaim` is identity-determining, not merely cosmetic**: it names which verified JWT claim is read as the federated user's identifier, so changing it on an issuer that already has bound users would silently re-identify (or, under self-signup, orphan) every one of them — changing it is therefore refused once any user has bound through this issuer, the same guard `DELETE` already applies, and is only free before the first real login. Requires a root API key or the bootstrap's provisioning capability, gated identically to every other operation on this surface. A credential confined to one app context may only update an issuer registered in that context; naming one registered in another context returns 404, identically to a nonexistent issuerId. A root API key may update any issuer.
4142
4142
  *
4143
4143
  * @param {Vectros.IssuerUpdateRequest} request
4144
4144
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -4948,7 +4948,7 @@ var ComplianceClient = class {
4948
4948
  this._options = normalizeClientOptionsWithAuth(options);
4949
4949
  }
4950
4950
  /**
4951
- * Submits a right-to-erasure request for a single end-subject (a user, or an identity entity in any namespace). Erasure removes exactly the data the subject solely owns across the declared contexts, plus its identity and lookup rows when all contexts are covered. It never touches another account's data and never cascades into another subject's data. The request is asynchronous: it returns 202 with a `requestId`; poll `GET /v1/erasure-requests/{id}` until the job completes to obtain the completion certificate. Requires a root API key — a scoped credential is rejected with 403.
4951
+ * Submits an erasure request for a single end-subject (a user, or an identity entity in any namespace). Erasure deletes the records, documents, folders and record schemas the subject solely owns across the declared contexts (and, for a user, its access profiles there), plus its identity and lookup rows when all contexts are covered. Rows co-owned with another owner scope or principal are kept; read-access log entries are not erased. The request is asynchronous: it returns 202 with a `requestId`; poll `GET /v1/erasure-requests/{id}` until the job completes to obtain the completion certificate. Requires a root API key — a scoped credential is rejected with 403.
4952
4952
  *
4953
4953
  * @param {Vectros.ErasureRequest} request
4954
4954
  * @param {ComplianceClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -5011,7 +5011,7 @@ var ComplianceClient = class {
5011
5011
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/erasure-requests");
5012
5012
  }
5013
5013
  /**
5014
- * Polls an erasure request by id. While the job is still running this returns its status only; once it completes, the response also includes the verifiable completion certificate (which contexts were swept, per-context deletion counts, whether the identity was kept, and reports of dangling references and shared rows left intact). Requires a root API key.
5014
+ * Polls an erasure request by id. While the job is still running this returns its status only; once it completes, the response also includes the completion certificate (which contexts were swept, per-context deletion counts, whether the identity was kept, and reports of dangling references and shared rows left intact). Requires a root API key.
5015
5015
  *
5016
5016
  * @param {Vectros.GetErasureRequestRequest} request
5017
5017
  * @param {ComplianceClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -7830,6 +7830,8 @@ var InferenceClient = class {
7830
7830
  throw new PaymentRequiredError(_response.error.body, _response.rawResponse);
7831
7831
  case 403:
7832
7832
  throw new ForbiddenError(_response.error.body, _response.rawResponse);
7833
+ case 413:
7834
+ throw new ContentTooLargeError(_response.error.body, _response.rawResponse);
7833
7835
  case 429:
7834
7836
  throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
7835
7837
  default:
@@ -7969,6 +7971,8 @@ var InferenceClient = class {
7969
7971
  throw new PaymentRequiredError(_response.error.body, _response.rawResponse);
7970
7972
  case 403:
7971
7973
  throw new ForbiddenError(_response.error.body, _response.rawResponse);
7974
+ case 413:
7975
+ throw new ContentTooLargeError(_response.error.body, _response.rawResponse);
7972
7976
  case 429:
7973
7977
  throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
7974
7978
  case 500:
@@ -10258,7 +10262,7 @@ function warnOnSuboptimalKey(key, log) {
10258
10262
  if (key.prefix === "sk") {
10259
10263
  log.warn(
10260
10264
  { prefix: key.prefix, env: key.env },
10261
- 'wildcard-scope key (sk_*) on a desktop MCP server is overly broad. For production, prefer a scoped ssk_* key bound to a narrowed AccessProfile. See the Vectros scoped-token documentation ("Recommended AccessProfile for MCP").'
10265
+ 'wildcard-scope key (sk_*) on a desktop MCP server is overly broad. For production, prefer a scoped ssk_* key bound to a narrowed AccessProfile: `npx -y @vectros-ai/cli bootstrap` mints one, and the "Recommended credential" section of this package\'s README describes it.'
10262
10266
  );
10263
10267
  } else if (key.prefix === "st") {
10264
10268
  log.warn(
@@ -10270,8 +10274,8 @@ function warnOnSuboptimalKey(key, log) {
10270
10274
 
10271
10275
  // src/build-info.ts
10272
10276
  var BUILD_INFO = {
10273
- mcpServer: true ? "0.18.0" : "dev",
10274
- sdk: true ? "0.46.0" : "dev"
10277
+ mcpServer: true ? "0.18.1" : "dev",
10278
+ sdk: true ? "0.47.0" : "dev"
10275
10279
  };
10276
10280
  function formatBuildInfo() {
10277
10281
  return `vectros-mcp-server ${BUILD_INFO.mcpServer} (sdk ${BUILD_INFO.sdk})`;
@@ -11320,7 +11324,7 @@ import { z as z10 } from "zod";
11320
11324
  // src/tools/provider-alias.ts
11321
11325
  import { z as z9 } from "zod";
11322
11326
  var providerAliasInput = z9.string().min(1, "providerAlias must be non-empty when supplied").optional().describe(
11323
- "Route THIS call through your own model provider instead of the platform-hosted default, by the alias of a provider config your account has activated. It works only after your account has set up that provider and signed the platform's risk-acceptance waiver; without both, the platform refuses the call with a 403, which is returned to you as written. A call served by your own provider leaves the platform-hosted Bedrock path, and Vectros's AWS BAA boundary. Omit it (the default) to use the platform-hosted path. When set, `model` names the model on your provider's own id space, and falls back to that provider config's default model when omitted."
11327
+ "Route THIS call through your own model provider instead of the platform-hosted default, by the alias of a provider config your account has activated. It works only after your account has set up that provider and signed the platform's risk-acceptance waiver; without both, the platform refuses the call with a 403, which is returned to you as written. If your account has accepted the Business Associate Agreement with Vectros in the developer portal, an account owner must also have attested that provider config in the developer portal (Model Providers); until then the platform refuses the call with a 403 that says it needs a BAA-holder attestation. A call served by your own provider leaves the Vectros perimeter. Omit it (the default) to use the platform-hosted path. When set, `model` names the model on your provider's own id space, and falls back to that provider config's default model when omitted."
11324
11328
  );
11325
11329
 
11326
11330
  // src/tools/rag_ask.ts
@@ -11332,7 +11336,7 @@ var inputSchema9 = {
11332
11336
  'System prompt that overrides the default for the generation step \u2014 e.g. "answer only from the provided context, cite sources, be concise". Default: a generic answer-from-context instruction.'
11333
11337
  ),
11334
11338
  model: z10.string().optional().describe(
11335
- "Inference model alias (e.g. claude-haiku-4-5, claude-sonnet-5, claude-opus-5-5). Default = tier-appropriate Haiku. See GET /v1/models for the catalog the calling key can reach. When `providerAlias` is set, this instead names the model on that provider's own id space."
11339
+ "Inference model alias (e.g. claude-haiku-5-5, claude-sonnet-5-5, claude-opus-5-5). Omit it to use the platform default, which GET /v1/models reports as `defaultModel`; that endpoint also lists the catalog the calling key can reach. When `providerAlias` is set, this instead names the model on that provider's own id space."
11336
11340
  ),
11337
11341
  providerAlias: providerAliasInput,
11338
11342
  search: z10.object({
@@ -11363,13 +11367,17 @@ var inputSchema9 = {
11363
11367
  createdBefore: z10.string().optional().describe("Same creation-time basis as createdAfter, bounding at/before this ISO 8601 UTC value."),
11364
11368
  requireComplete: z10.boolean().optional().describe("Fail closed (503) on a degraded search backend instead of grounding on partial results. Default false.")
11365
11369
  }).optional().describe("Retrieval params + scoping. Default mode HYBRID, limit " + SEARCH_MCP_DEFAULT_LIMIT + "."),
11366
- maxTokens: z10.number().int().min(1).optional().describe("Max output tokens."),
11367
- temperature: z10.number().min(0).max(1).optional().describe("Sampling temperature (0.0\u20131.0). Default 0.3 \u2014 lower favors deterministic, retrieval-grounded answers.")
11370
+ maxTokens: z10.number().int().min(1).optional().describe(
11371
+ "Max output tokens. claude-haiku-5-5, claude-sonnet-5, claude-sonnet-5-5 and claude-opus-5-5 can reason before they answer; when they do, the reasoning counts against this limit, so a small value can return little or no text. Leave headroom: 1024 or more for a short answer."
11372
+ ),
11373
+ temperature: z10.number().min(0).max(1).optional().describe(
11374
+ "Sampling temperature (0.0\u20131.0). Default 0.3 \u2014 lower favors deterministic, retrieval-grounded answers. The platform ignores it for claude-haiku-5-5, claude-sonnet-5, claude-sonnet-5-5 and claude-opus-5-5, which sample at their own default; it applies to models that accept a temperature, such as claude-haiku-4-5."
11375
+ )
11368
11376
  };
11369
11377
  var ragAsk = ({ client, log }) => ({
11370
11378
  name: "rag_ask",
11371
11379
  title: "RAG ask (corpus-wide)",
11372
- description: "Ask a question grounded against your tenant's indexed content. Vectros performs a hybrid search, injects the top-K passages into the prompt, and streams a model answer back. Scope retrieval with `search` (ownership \u2014 `scope` for one ownership dimension or `scopeFilters` for several at once, e.g. one client within one org \u2014 folder, type, metadata filters, date window) to ground on a subset \u2014 e.g. one patient or one folder \u2014 and steer generation with `instructions` / `temperature`. The full answer is returned as a single response; progress notifications keep the call alive during the 30-45s generation window. Calls without `providerAlias` are served by platform-hosted AWS Bedrock. A call that sets `providerAlias` goes to your own model provider, outside Vectros's AWS BAA boundary.",
11380
+ description: "Ask a question grounded against your tenant's indexed content. Vectros performs a hybrid search, injects the top-K passages into the prompt, and streams a model answer back. Scope retrieval with `search` (ownership \u2014 `scope` for one ownership dimension or `scopeFilters` for several at once, e.g. one client within one org \u2014 folder, type, metadata filters, date window) to ground on a subset \u2014 e.g. one patient or one folder \u2014 and steer generation with `instructions` (and `temperature`, for the models that accept one). The full answer is returned as a single response; progress notifications keep the call alive during the 30-45s generation window. Calls without `providerAlias` are served by platform-hosted AWS Bedrock. A call that sets `providerAlias` goes to your own model provider, outside Vectros's AWS BAA boundary.",
11373
11381
  inputSchema: inputSchema9,
11374
11382
  // NOT a pure read: this call reserves an atomic hold against the caller's prepaid inference
11375
11383
  // balance before generation starts, then debits it on completion — a real financial side
@@ -11471,10 +11479,12 @@ var inputSchema10 = {
11471
11479
  documentId: z11.string().min(1, "documentId is required").describe("ID of the document to ask against."),
11472
11480
  prompt: z11.string().min(1, "prompt is required").describe("Question to ask about the document."),
11473
11481
  model: z11.string().optional().describe(
11474
- "Inference model alias. Default = tier-appropriate Haiku. See GET /v1/models for the catalog the calling key can reach. When `providerAlias` is set, this instead names the model on that provider's own id space."
11482
+ "Inference model alias. Omit it to use the platform default, which GET /v1/models reports as `defaultModel`; that endpoint also lists the catalog the calling key can reach. When `providerAlias` is set, this instead names the model on that provider's own id space."
11475
11483
  ),
11476
11484
  providerAlias: providerAliasInput,
11477
- maxTokens: z11.number().int().min(1).optional().describe("Max output tokens.")
11485
+ maxTokens: z11.number().int().min(1).optional().describe(
11486
+ "Max output tokens. claude-haiku-5-5, claude-sonnet-5, claude-sonnet-5-5 and claude-opus-5-5 can reason before they answer; when they do, the reasoning counts against this limit, so a small value can return little or no text. Leave headroom: 1024 or more for a short answer."
11487
+ )
11478
11488
  };
11479
11489
  var documentAsk = ({ client, log }) => ({
11480
11490
  name: "document_ask",
@@ -12062,7 +12072,7 @@ var inputSchema19 = {
12062
12072
  var folderDelete = ({ client, log }) => ({
12063
12073
  name: "folder_delete",
12064
12074
  title: "Delete a folder",
12065
- description: 'Permanently delete a folder by id. The folder must be EMPTY first \u2014 it must contain no documents, no records, and no sub-folders \u2014 and a non-empty folder is refused, which is the most common way this call fails. Use record_query with this folderId, and document_query, to see what is in it. Clearing it differs by content type: a document can be moved out (document_update with a different folderId) or deleted. A RECORD can also be re-filed into another folder \u2014 the API supports it \u2014 but THIS SERVER does not expose that yet: record_update has no folderId argument, so from here your only option is record_delete (needs records:d). Do NOT read that as "the record cannot be moved" and delete partner data on that basis: if the record should be kept, move it with the Vectros API/SDK directly rather than deleting it here. A sub-folder cannot be re-parented at all, so nested folders have to be emptied and deleted innermost-first. Note the emptiness check counts everything in the folder, INCLUDING items your credential cannot read \u2014 so a refusal you cannot account for from what you can list is expected behaviour, not a bug, and retrying will not clear it. Requires the key to allow folders:d \u2014 a key without it gets a permission error. Protected folders (e.g. a context root) cannot be deleted at all, however empty.',
12075
+ description: 'Permanently delete a folder by id. The folder must be EMPTY first \u2014 it must contain no documents, no records, and no sub-folders \u2014 and a non-empty folder is refused, which is the most common way this call fails. Use record_query with this folderId, and document_query, to see what is in it. Clearing it differs by content type: a document can be moved out (document_update with a different folderId) or deleted. A RECORD can also be re-filed into another folder \u2014 the API supports it \u2014 but THIS SERVER does not expose that yet: record_update has no folderId argument, so from here your only option is record_delete (needs records:d). Do NOT read that as "the record cannot be moved" and delete the record on that basis: if the record should be kept, tell the user to move it with the Vectros API/SDK directly rather than deleting it here. A sub-folder cannot be re-parented at all, so nested folders have to be emptied and deleted innermost-first. Note the emptiness check counts everything in the folder, INCLUDING items your credential cannot read \u2014 so a refusal you cannot account for from what you can list is expected behaviour, not a bug, and retrying will not clear it. Requires the key to allow folders:d \u2014 a key without it gets a permission error. Protected folders (e.g. a context root) cannot be deleted at all, however empty.',
12066
12076
  inputSchema: inputSchema19,
12067
12077
  // Deletes. Idempotent in the standard REST sense: the end state ("this id no longer
12068
12078
  // resolves") is the same whether this is the first delete or a repeat of one.