@vectros-ai/mcp-server 0.6.0 → 0.7.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/cli.mjs CHANGED
@@ -4898,7 +4898,7 @@ var DocumentsClient = class {
4898
4898
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v1/documents/{id}");
4899
4899
  }
4900
4900
  /**
4901
- * Partially updates a document using an RFC 7386 JSON Merge Patch. The `payload` object is deep-merged: keys you send overwrite existing values (recursing into nested objects), a key set to `null` is deleted, and keys you omit are preserved — unlike PUT, which replaces the whole payload. Top-level fields (`title`, `storeText`, `folderId`, `schemaId`, ownership) are set when present and left unchanged when omitted; sending a top-level field as `null` is rejected. Supplying `text` re-ingests the document body (same as PUT). `indexMode` and `externalId` are immutable and rejected if present. The merged result is validated against the bound schema. Pass `expectedVersion` for optimistic concurrency (409 on conflict). Requires the `documents:u` scope.
4901
+ * Partially updates a document using an RFC 7386 JSON Merge Patch. The `payload` object is deep-merged: keys you send overwrite existing values (recursing into nested objects), a key set to `null` is deleted, and keys you omit are preserved — unlike PUT, which replaces the whole payload. Top-level fields (`title`, `folderId`, `schemaId`, ownership) are set when present and left unchanged when omitted; sending a top-level field as `null` is rejected. Supplying `text` re-ingests the document body (same as PUT). `indexMode`, `externalId`, and `storeText` (text retention is fixed at ingest) are immutable and rejected if present. The merged result is validated against the bound schema. Pass `expectedVersion` for optimistic concurrency (409 on conflict). Requires the `documents:u` scope.
4902
4902
  *
4903
4903
  * @param {Vectros.PatchDocumentRequest} request
4904
4904
  * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -5150,7 +5150,7 @@ var DocumentsClient = class {
5150
5150
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/documents/{id}/download");
5151
5151
  }
5152
5152
  /**
5153
- * Returns the full extracted or ingested text body for documents that were stored with `storeText=true`. Returns 404 when the document does not exist or when no text is available (because `storeText` was false, or extraction has not yet completed). Requires the `documents:r` scope.
5153
+ * Returns the document's full text body when it is retained: always available for text-ingested documents, and for file-uploaded documents unless they were uploaded with `storeText=false` (which discards the extracted text once indexing completes — the original file remains available via `GET /{id}/download`). Returns 404 when the document does not exist, its text was not retained, or extraction has not yet completed. Requires the `documents:r` scope.
5154
5154
  *
5155
5155
  * @param {Vectros.GetDocumentTextRequest} request
5156
5156
  * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -8764,8 +8764,8 @@ function warnOnSuboptimalKey(key, log) {
8764
8764
 
8765
8765
  // src/build-info.ts
8766
8766
  var BUILD_INFO = {
8767
- mcpServer: true ? "0.6.0" : "dev",
8768
- sdk: true ? "0.32.0" : "dev"
8767
+ mcpServer: true ? "0.7.0" : "dev",
8768
+ sdk: true ? "0.33.0" : "dev"
8769
8769
  };
8770
8770
  function formatBuildInfo() {
8771
8771
  return `vectros-mcp-server ${BUILD_INFO.mcpServer} (sdk ${BUILD_INFO.sdk})`;
@@ -9727,7 +9727,7 @@ function isNotAvailable(err) {
9727
9727
  var documentGet = ({ client, log }) => ({
9728
9728
  name: "document_get",
9729
9729
  title: "Get document metadata (and optionally text)",
9730
- description: "Fetch metadata for a single document \u2014 select it by its Vectros `documentId` OR by your own `externalId` + `type` (resolved for you). Pass `includeText: true` to also fetch the text body (capped at ~8K tokens; `truncated: true` flag if cut). If the document was ingested without `storeText: true`, text is unavailable \u2014 `textAvailable: false` flag is set and the agent should use `document_ask` for question-driven extraction instead. Pass `includeDownloadUrl: true` to also get a short-lived presigned `downloadUrl` for the original file (file-backed documents only). Returns the full document metadata, including its lifecycle `status` (ACTIVE, or ARCHIVED when soft-retracted from search \u2014 restorable via document_update) and its processing `indexStatus`.",
9730
+ description: "Fetch metadata for a single document \u2014 select it by its Vectros `documentId` OR by your own `externalId` + `type` (resolved for you). Pass `includeText: true` to also fetch the text body (capped at ~8K tokens; `truncated: true` flag if cut). Text is available for every text-ingested document and for file-ingested documents unless they were uploaded with `storeText: false` (extracted text discarded after indexing) \u2014 then `textAvailable: false` is set; the original file is still retrievable via `includeDownloadUrl`. Pass `includeDownloadUrl: true` to also get a short-lived presigned `downloadUrl` for the original file (file-backed documents only). Returns the full document metadata, including its lifecycle `status` (ACTIVE, or ARCHIVED when soft-retracted from search \u2014 restorable via document_update) and its processing `indexStatus`.",
9731
9731
  inputSchema: inputSchema10,
9732
9732
  handler: async (args) => {
9733
9733
  const documentId = args.documentId;
@@ -9751,7 +9751,7 @@ var documentGet = ({ client, log }) => ({
9751
9751
  if (isNotAvailable(textErr)) {
9752
9752
  log.debug(
9753
9753
  { tool: "document_get", id },
9754
- "document_get text unavailable (ingested without storeText)"
9754
+ "document_get text unavailable (not retained \u2014 storeText:false upload)"
9755
9755
  );
9756
9756
  extra = { ...extra, textAvailable: false };
9757
9757
  } else {
@@ -9913,7 +9913,6 @@ var inputSchema12 = {
9913
9913
  "New raw text body. Supplying it re-ingests the document body and re-queues it for indexing, so the search index reflects the edit (text-ingested documents only \u2014 not file-backed ones). Omit to leave the stored text unchanged. This is the in-place alternative to re-ingesting with upsert:true."
9914
9914
  ),
9915
9915
  folderId: z12.string().optional().describe("Move the document into this folder (cannot be cleared once set)."),
9916
- storeText: z12.boolean().optional().describe("Whether the raw text is stored + retrievable."),
9917
9916
  status: z12.enum(["ACTIVE", "ARCHIVED"]).optional().describe(
9918
9917
  "Lifecycle status. `ARCHIVED` soft-retracts the document \u2014 it is pulled from search and recall but kept and recoverable; set it back to `ACTIVE` to re-index and restore it. The way to retire superseded content when the credential has no delete authority. Omit to leave unchanged."
9919
9918
  ),
@@ -9937,7 +9936,6 @@ var documentUpdate = ({ client, log }) => ({
9937
9936
  const fields = args.fields;
9938
9937
  const text = args.text;
9939
9938
  const folderId = args.folderId;
9940
- const storeText = args.storeText;
9941
9939
  const status = args.status;
9942
9940
  const userId = args.userId;
9943
9941
  const orgId = args.orgId;
@@ -9951,7 +9949,6 @@ var documentUpdate = ({ client, log }) => ({
9951
9949
  if (fields !== void 0) body.payload = fields;
9952
9950
  if (text !== void 0) body.text = text;
9953
9951
  if (folderId !== void 0) body.folderId = folderId;
9954
- if (storeText !== void 0) body.storeText = storeText;
9955
9952
  if (status !== void 0) body.status = status;
9956
9953
  if (userId !== void 0) body.userId = userId;
9957
9954
  if (orgId !== void 0) body.orgId = orgId;
@@ -10271,7 +10268,7 @@ var inputSchema19 = {
10271
10268
  // Inline text mode (mutually exclusive with filePath):
10272
10269
  text: z18.string().min(1).optional().describe("Text body to ingest inline. Mutually exclusive with filePath. Either text or filePath is required."),
10273
10270
  storeText: z18.boolean().optional().describe(
10274
- "If true (default), the text body is stored alongside the index so document_get(includeText:true) can retrieve it later. Set false to index only \u2014 saves storage cost on large corpora but document_get(includeText) will return textAvailable:false."
10271
+ "Whether the document's text is retained after indexing (default true). Applies to BOTH modes and is fixed at ingest time. Text mode: the ingested body is always retained (this flag is effectively always true \u2014 the body is the document). File mode: true keeps the extracted text retrievable via document_get(includeText:true) and usable by document_ask; false discards the extracted text once indexing completes \u2014 search still works and the original file remains downloadable, but includeText returns textAvailable:false and document_ask is unavailable."
10275
10272
  ),
10276
10273
  // File upload mode (mutually exclusive with text; stdio-transport-only):
10277
10274
  filePath: z18.string().min(1).optional().describe(
@@ -10287,7 +10284,7 @@ var inputSchema19 = {
10287
10284
  var documentIngest = ({ client, log, transport, ingestRoot }) => ({
10288
10285
  name: "document_ingest",
10289
10286
  title: "Ingest a new document (text body or file upload)",
10290
- description: "Create a new document in your Vectros tenant. Two modes:\n \u2022 Text mode: pass `text` (string body). Single-call. Use for crawled content, notes, generated text.\n \u2022 File mode: pass `filePath` (local path on the MCP server's host machine). STDIO-TRANSPORT ONLY \u2014 rejected on HTTP transport. MCP server reads the bytes, requests a presigned upload URL, and PUTs them. Returns when the upload is accepted (indexStatus: PENDING_INDEX); poll with `document_get` until indexStatus is INDEXED.\nEither `text` or `filePath` must be present; both is an error. Idempotent by `externalId` (re-ingest returns the existing document, not a duplicate). To UPDATE an existing document instead \u2014 re-index an edited body \u2014 pass `upsert:true` with the same `externalId` (and the same `schemaId`); this is the re-sync primitive for keeping a knowledge base current. Pass `schemaId` + `payload` for a typed, lookup-queryable document (records parity). indexMode defaults to HYBRID for untyped documents (omit to inherit a bound schema's default). storeText defaults to true (set false to skip storing the text body).",
10287
+ description: "Create a new document in your Vectros tenant. Two modes:\n \u2022 Text mode: pass `text` (string body). Single-call. Use for crawled content, notes, generated text.\n \u2022 File mode: pass `filePath` (local path on the MCP server's host machine). STDIO-TRANSPORT ONLY \u2014 rejected on HTTP transport. MCP server reads the bytes, requests a presigned upload URL, and PUTs them. Returns when the upload is accepted (indexStatus: PENDING_INDEX); poll with `document_get` until indexStatus is INDEXED.\nEither `text` or `filePath` must be present; both is an error. Idempotent by `externalId` (re-ingest returns the existing document, not a duplicate). To UPDATE an existing document instead \u2014 re-index an edited body \u2014 pass `upsert:true` with the same `externalId` (and the same `schemaId`); this is the re-sync primitive for keeping a knowledge base current. Pass `schemaId` + `payload` for a typed, lookup-queryable document (records parity). indexMode defaults to HYBRID for untyped documents (omit to inherit a bound schema's default). storeText defaults to true and is fixed at ingest: in file mode, false discards the extracted text after indexing (search + file download keep working; text retrieval and document_ask do not). Text-mode bodies are always retained.",
10291
10288
  inputSchema: inputSchema19,
10292
10289
  handler: async (args) => {
10293
10290
  const title = args.title;
@@ -10327,14 +10324,12 @@ var documentIngest = ({ client, log, transport, ingestRoot }) => ({
10327
10324
  };
10328
10325
  try {
10329
10326
  if (text) {
10330
- const storeText = args.storeText ?? true;
10331
10327
  const result = await client.documents.ingestDocument({
10332
10328
  upsert,
10333
10329
  body: {
10334
10330
  title,
10335
10331
  text,
10336
10332
  indexMode,
10337
- storeText,
10338
10333
  ...common
10339
10334
  }
10340
10335
  });
@@ -10365,11 +10360,13 @@ var documentIngest = ({ client, log, transport, ingestRoot }) => ({
10365
10360
  }
10366
10361
  const fileName = basename(safePath);
10367
10362
  const fileType = args.fileType ?? inferMimeType(safePath);
10363
+ const storeTextFile = args.storeText ?? true;
10368
10364
  const upload = await client.documents.uploadDocument({
10369
10365
  upsert,
10370
10366
  fileName,
10371
10367
  fileType,
10372
10368
  indexMode,
10369
+ storeText: storeTextFile,
10373
10370
  ...common
10374
10371
  });
10375
10372
  const uploadUrl = upload?.uploadUrl;