@pairsystems/goodmem-mcp 0.1.9 → 0.1.10

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.
Files changed (2) hide show
  1. package/dist/index.js +67 -61
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20988,7 +20988,7 @@ var StdioServerTransport = class {
20988
20988
  // dist/index.js
20989
20989
  var goodmemBaseUrl = process.env.GOODMEM_BASE_URL || "";
20990
20990
  var goodmemApiKey = process.env.GOODMEM_API_KEY || "";
20991
- var BASED_ON_GOODMEM_COMMIT = "55768baed550c339bff8ef3893a8e9a024facc90";
20991
+ var BASED_ON_GOODMEM_COMMIT = "82cedec39260bff105828bed1c1e779d9f1e811f";
20992
20992
  function isConfigured() {
20993
20993
  return goodmemBaseUrl !== "" && goodmemApiKey !== "";
20994
20994
  }
@@ -21920,7 +21920,7 @@ function autoInferFromRegistry(registryType, args) {
21920
21920
  }
21921
21921
  var server = new McpServer({
21922
21922
  name: "goodmem",
21923
- version: "0.1.9"
21923
+ version: "0.1.10"
21924
21924
  });
21925
21925
  server.tool("goodmem_configure", "Configure GoodMem server connection. Call this before using other GoodMem tools if GOODMEM_BASE_URL and GOODMEM_API_KEY environment variables are not set. Session credentials override environment variables.", {
21926
21926
  base_url: external_exports.string().describe("GoodMem server URL (e.g., https://your-server.example.com)"),
@@ -21975,7 +21975,7 @@ ${allModels.join("\n")}` }] };
21975
21975
  });
21976
21976
  server.tool("goodmem_client_info", "Return the MCP client package version and the goodmem server commit it was built against. No server connection required.", {}, async () => {
21977
21977
  return { content: [{ type: "text", text: JSON.stringify({
21978
- mcpVersion: "0.1.9",
21978
+ mcpVersion: "0.1.10",
21979
21979
  basedOnGoodmemCommit: BASED_ON_GOODMEM_COMMIT
21980
21980
  }, null, 2) }] };
21981
21981
  });
@@ -22018,7 +22018,7 @@ function registerTools() {
22018
22018
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
22019
22019
  });
22020
22020
  server.tool("goodmem_apikeys_create", "Create a new API key", {
22021
- labels: external_exports.any().describe("Key-value pairs of metadata associated with the API key. Used for organization and filtering.").optional(),
22021
+ labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Key-value pairs of metadata associated with the API key. Used for organization and filtering.").optional(),
22022
22022
  expires_at: external_exports.number().int().describe("Expiration timestamp in milliseconds since epoch. If not provided, the key does not expire.").optional(),
22023
22023
  api_key_id: external_exports.string().describe("Optional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.").optional()
22024
22024
  }, async (args) => {
@@ -22045,8 +22045,8 @@ function registerTools() {
22045
22045
  server.tool("goodmem_apikeys_update", "Update an API key", {
22046
22046
  id: external_exports.string().describe("The UUID of the API key to update"),
22047
22047
  status: external_exports.string().describe("New status for the API key. Allowed values: ACTIVE, INACTIVE.").optional(),
22048
- replace_labels: external_exports.any().describe("Replace all existing labels with this set. Mutually exclusive with mergeLabels.").optional(),
22049
- merge_labels: external_exports.any().describe("Merge these labels with existing ones. Mutually exclusive with replaceLabels.").optional()
22048
+ replace_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Replace all existing labels with this set. Mutually exclusive with mergeLabels.").optional(),
22049
+ merge_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Merge these labels with existing ones. Mutually exclusive with replaceLabels.").optional()
22050
22050
  }, async (args) => {
22051
22051
  const body = {};
22052
22052
  if (args.status !== void 0)
@@ -22086,7 +22086,7 @@ function registerTools() {
22086
22086
  }).passthrough().describe("Configuration when kind is CREDENTIAL_KIND_GCP_ADC").optional(),
22087
22087
  labels: external_exports.any().describe('Optional annotations to aid operators (e.g., "owner=vertex")').optional()
22088
22088
  }).passthrough().describe("Structured credential payload describing how to authenticate with the provider. Required for SaaS providers such as COHERE, JINA, and VOYAGE; optional for local or proxy providers.").optional(),
22089
- labels: external_exports.any().describe("User-defined labels for categorization").optional(),
22089
+ labels: external_exports.record(external_exports.string(), external_exports.string()).describe("User-defined labels for categorization").optional(),
22090
22090
  version: external_exports.string().describe("Version information").optional(),
22091
22091
  monitoring_endpoint: external_exports.string().describe("Monitoring endpoint URL").optional(),
22092
22092
  owner_id: external_exports.string().describe("Optional owner ID. If not provided, derived from the authentication context. Requires CREATE_EMBEDDER_ANY permission if specified.").optional(),
@@ -22131,13 +22131,13 @@ function registerTools() {
22131
22131
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
22132
22132
  });
22133
22133
  server.tool("goodmem_embedders_delete", "Delete an embedder", {
22134
- id: external_exports.string().describe("The UUID of the embedder to delete")
22134
+ id: external_exports.string().describe("The unique identifier of the embedder to delete")
22135
22135
  }, async (args) => {
22136
22136
  await callApi("DELETE", `/v1/embedders/${encodeURIComponent(String(args.id))}`, void 0);
22137
22137
  return { content: [{ type: "text", text: "Deleted successfully." }] };
22138
22138
  });
22139
22139
  server.tool("goodmem_embedders_get", "Get an embedder by ID", {
22140
- id: external_exports.string().describe("The UUID of the embedder to retrieve")
22140
+ id: external_exports.string().describe("The unique identifier of the embedder to retrieve")
22141
22141
  }, async (args) => {
22142
22142
  const result = await callApi("GET", `/v1/embedders/${encodeURIComponent(String(args.id))}`, void 0);
22143
22143
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
@@ -22145,28 +22145,29 @@ function registerTools() {
22145
22145
  server.tool("goodmem_embedders_list", "List embedders", {
22146
22146
  owner_id: external_exports.string().describe("Filter embedders by owner ID. With LIST_EMBEDDER_ANY permission, omitting this shows all accessible embedders; providing it filters by that owner. With LIST_EMBEDDER_OWN permission, only your own embedders are shown regardless of this parameter.").optional(),
22147
22147
  provider_type: external_exports.enum(["OPENAI", "VLLM", "TEI", "LLAMA_CPP", "VOYAGE", "COHERE", "JINA"]).describe("Filter embedders by provider type. Allowed values match the ProviderType schema.").optional(),
22148
- labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Filter by labels. Each key-value pair is sent as a label.<key>=<value> query parameter.").optional()
22148
+ label: external_exports.record(external_exports.string(), external_exports.string()).describe("Filter by label. Each key-value pair is sent as label[key]=value query parameter.").optional()
22149
22149
  }, async (args) => {
22150
22150
  const query = {};
22151
22151
  if (args.owner_id !== void 0)
22152
22152
  query["ownerId"] = String(args.owner_id);
22153
22153
  if (args.provider_type !== void 0)
22154
22154
  query["providerType"] = String(args.provider_type);
22155
- if (args.labels) {
22156
- for (const [k, v] of Object.entries(args.labels))
22157
- query[`label.${k}`] = v;
22155
+ if (args.label) {
22156
+ for (const [k, v] of Object.entries(args.label))
22157
+ query[`label[${k}]`] = v;
22158
22158
  }
22159
22159
  const result = await callApi("GET", `/v1/embedders`, void 0, query);
22160
22160
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
22161
22161
  });
22162
22162
  server.tool("goodmem_embedders_update", "Update an embedder", {
22163
- id: external_exports.string().describe("The UUID of the embedder to update"),
22163
+ id: external_exports.string().describe("The unique identifier of the embedder to update"),
22164
22164
  display_name: external_exports.string().describe("User-facing name of the embedder").optional(),
22165
22165
  description: external_exports.string().describe("Description of the embedder").optional(),
22166
22166
  endpoint_url: external_exports.string().describe("API endpoint URL").optional(),
22167
22167
  api_path: external_exports.string().describe("API path for embeddings request").optional(),
22168
22168
  model_identifier: external_exports.string().describe("Model identifier").optional(),
22169
22169
  dimensionality: external_exports.number().int().describe("Output vector dimensions").optional(),
22170
+ distribution_type: external_exports.enum(["DENSE", "SPARSE"]).describe("Type of embedding distribution (DENSE or SPARSE)").optional(),
22170
22171
  max_sequence_length: external_exports.number().int().describe("Maximum input sequence length").optional(),
22171
22172
  supported_modalities: external_exports.array(external_exports.enum(["TEXT", "IMAGE", "AUDIO", "VIDEO"])).describe("Supported content modalities").optional(),
22172
22173
  credentials: external_exports.object({
@@ -22186,8 +22187,8 @@ function registerTools() {
22186
22187
  }).passthrough().describe("Configuration when kind is CREDENTIAL_KIND_GCP_ADC").optional(),
22187
22188
  labels: external_exports.any().describe('Optional annotations to aid operators (e.g., "owner=vertex")').optional()
22188
22189
  }).passthrough().describe("Structured credential payload describing how to authenticate with the provider").optional(),
22189
- replace_labels: external_exports.any().describe("Replace all existing labels with these (mutually exclusive with mergeLabels)").optional(),
22190
- merge_labels: external_exports.any().describe("Merge these labels with existing ones (mutually exclusive with replaceLabels)").optional(),
22190
+ replace_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Replace all existing labels with these (mutually exclusive with mergeLabels)").optional(),
22191
+ merge_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Merge these labels with existing ones (mutually exclusive with replaceLabels)").optional(),
22191
22192
  version: external_exports.string().describe("Version information").optional(),
22192
22193
  monitoring_endpoint: external_exports.string().describe("Monitoring endpoint URL").optional()
22193
22194
  }, async (args) => {
@@ -22204,6 +22205,8 @@ function registerTools() {
22204
22205
  body["modelIdentifier"] = args.model_identifier;
22205
22206
  if (args.dimensionality !== void 0)
22206
22207
  body["dimensionality"] = args.dimensionality;
22208
+ if (args.distribution_type !== void 0)
22209
+ body["distributionType"] = args.distribution_type;
22207
22210
  if (args.max_sequence_length !== void 0)
22208
22211
  body["maxSequenceLength"] = args.max_sequence_length;
22209
22212
  if (args.supported_modalities !== void 0)
@@ -22246,7 +22249,7 @@ function registerTools() {
22246
22249
  }).passthrough().describe("Configuration when kind is CREDENTIAL_KIND_GCP_ADC").optional(),
22247
22250
  labels: external_exports.any().describe('Optional annotations to aid operators (e.g., "owner=vertex")').optional()
22248
22251
  }).passthrough().describe("Structured credential payload describing how to authenticate with the provider. Omit for deployments that do not require credentials.").optional(),
22249
- labels: external_exports.any().describe("User-defined labels for categorization").optional(),
22252
+ labels: external_exports.record(external_exports.string(), external_exports.string()).describe("User-defined labels for categorization").optional(),
22250
22253
  version: external_exports.string().describe("Version information").optional(),
22251
22254
  monitoring_endpoint: external_exports.string().describe("Monitoring endpoint URL").optional(),
22252
22255
  capabilities: external_exports.object({
@@ -22312,13 +22315,13 @@ function registerTools() {
22312
22315
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
22313
22316
  });
22314
22317
  server.tool("goodmem_llms_delete", "Delete an LLM", {
22315
- id: external_exports.string().describe("The UUID of the LLM to delete")
22318
+ id: external_exports.string().describe("The unique identifier of the LLM to delete")
22316
22319
  }, async (args) => {
22317
22320
  await callApi("DELETE", `/v1/llms/${encodeURIComponent(String(args.id))}`, void 0);
22318
22321
  return { content: [{ type: "text", text: "Deleted successfully." }] };
22319
22322
  });
22320
22323
  server.tool("goodmem_llms_get", "Get an LLM by ID", {
22321
- id: external_exports.string().describe("The UUID of the LLM to retrieve")
22324
+ id: external_exports.string().describe("The unique identifier of the LLM to retrieve")
22322
22325
  }, async (args) => {
22323
22326
  const result = await callApi("GET", `/v1/llms/${encodeURIComponent(String(args.id))}`, void 0);
22324
22327
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
@@ -22326,22 +22329,22 @@ function registerTools() {
22326
22329
  server.tool("goodmem_llms_list", "List LLMs", {
22327
22330
  owner_id: external_exports.string().describe("Filter LLMs by owner ID. With LIST_LLM_ANY permission, omitting this shows all accessible LLMs; providing it filters by that owner. With LIST_LLM_OWN permission, only your own LLMs are shown regardless of this parameter.").optional(),
22328
22331
  provider_type: external_exports.enum(["OPENAI", "LITELLM_PROXY", "OPEN_ROUTER", "VLLM", "OLLAMA", "LLAMA_CPP", "CUSTOM_OPENAI_COMPATIBLE"]).describe("Filter LLMs by provider type. Allowed values match the LLMProviderType schema.").optional(),
22329
- labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Filter by labels. Each key-value pair is sent as a label.<key>=<value> query parameter.").optional()
22332
+ label: external_exports.record(external_exports.string(), external_exports.string()).describe("Filter by label. Each key-value pair is sent as label[key]=value query parameter.").optional()
22330
22333
  }, async (args) => {
22331
22334
  const query = {};
22332
22335
  if (args.owner_id !== void 0)
22333
22336
  query["ownerId"] = String(args.owner_id);
22334
22337
  if (args.provider_type !== void 0)
22335
22338
  query["providerType"] = String(args.provider_type);
22336
- if (args.labels) {
22337
- for (const [k, v] of Object.entries(args.labels))
22338
- query[`label.${k}`] = v;
22339
+ if (args.label) {
22340
+ for (const [k, v] of Object.entries(args.label))
22341
+ query[`label[${k}]`] = v;
22339
22342
  }
22340
22343
  const result = await callApi("GET", `/v1/llms`, void 0, query);
22341
22344
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
22342
22345
  });
22343
22346
  server.tool("goodmem_llms_update", "Update an LLM", {
22344
- id: external_exports.string().describe("The UUID of the LLM to update"),
22347
+ id: external_exports.string().describe("The unique identifier of the LLM to update"),
22345
22348
  display_name: external_exports.string().describe("Update display name").optional(),
22346
22349
  description: external_exports.string().describe("Update description").optional(),
22347
22350
  endpoint_url: external_exports.string().describe("Update endpoint base URL (OpenAI-compatible base, typically ends with /v1)").optional(),
@@ -22386,8 +22389,8 @@ function registerTools() {
22386
22389
  }).passthrough().describe("Update default sampling parameters").optional(),
22387
22390
  max_context_length: external_exports.number().int().describe("Update maximum context window size in tokens").optional(),
22388
22391
  client_config: external_exports.any().describe("Update provider-specific client configuration (replaces entire config; no merging)").optional(),
22389
- replace_labels: external_exports.any().describe("Replace all existing labels with this set. Empty map clears all labels. Cannot be used with mergeLabels.").optional(),
22390
- merge_labels: external_exports.any().describe("Merge with existing labels: upserts with overwrite. Labels not mentioned are preserved. Cannot be used with replaceLabels.").optional()
22392
+ replace_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Replace all existing labels with this set. Empty map clears all labels. Cannot be used with mergeLabels.").optional(),
22393
+ merge_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Merge with existing labels: upserts with overwrite. Labels not mentioned are preserved. Cannot be used with replaceLabels.").optional()
22391
22394
  }, async (args) => {
22392
22395
  const body = {};
22393
22396
  if (args.display_name !== void 0)
@@ -22496,7 +22499,7 @@ function registerTools() {
22496
22499
  original_content: external_exports.string().describe("Original content as plain text (use either this or originalContentB64)").optional(),
22497
22500
  original_content_b64: external_exports.string().describe("Original content as base64-encoded binary data (use either this or originalContent)").optional(),
22498
22501
  original_content_ref: external_exports.string().describe("Reference to external content location").optional(),
22499
- content_type: external_exports.string().describe("MIME type of the content"),
22502
+ content_type: external_exports.string().describe("MIME type of the content (defaults to text/plain when original_content is provided)").optional(),
22500
22503
  metadata: external_exports.any().describe("Additional metadata for the memory").optional(),
22501
22504
  chunking_config: external_exports.object({
22502
22505
  none: external_exports.any().describe("No chunking strategy - preserve original content as single unit").optional(),
@@ -22536,6 +22539,9 @@ function registerTools() {
22536
22539
  body["chunkingConfig"] = args.chunking_config;
22537
22540
  if (args.extract_page_images !== void 0)
22538
22541
  body["extractPageImages"] = args.extract_page_images;
22542
+ if (body["contentType"] === void 0 && body["originalContent"] !== void 0) {
22543
+ body["contentType"] = "text/plain";
22544
+ }
22539
22545
  const result = await callApi("POST", `/v1/memories`, body);
22540
22546
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
22541
22547
  });
@@ -22547,8 +22553,8 @@ function registerTools() {
22547
22553
  });
22548
22554
  server.tool("goodmem_memories_get", "Get a memory by ID", {
22549
22555
  id: external_exports.string().describe("The UUID of the memory to retrieve"),
22550
- include_content: external_exports.boolean().describe("Whether to include the original content in the response (defaults to false). The snake_case alias include_content is also accepted.").optional(),
22551
- include_processing_history: external_exports.boolean().describe("Whether to include background job processing history in the response (defaults to false). The snake_case alias include_processing_history is also accepted.").optional()
22556
+ include_content: external_exports.boolean().describe("Whether to include the original content in the response (defaults to false).").optional(),
22557
+ include_processing_history: external_exports.boolean().describe("Whether to include background job processing history in the response (defaults to false).").optional()
22552
22558
  }, async (args) => {
22553
22559
  const query = {};
22554
22560
  if (args.include_content !== void 0)
@@ -22560,14 +22566,14 @@ function registerTools() {
22560
22566
  });
22561
22567
  server.tool("goodmem_memories_list", "List memories in a space", {
22562
22568
  space_id: external_exports.string().describe("The UUID of the space containing the memories"),
22563
- include_content: external_exports.boolean().describe("Whether to include the original content in the response (defaults to false). The snake_case alias include_content is also accepted.").optional(),
22564
- include_processing_history: external_exports.boolean().describe("Whether to include background job processing history in the response (defaults to false). The snake_case alias include_processing_history is also accepted.").optional(),
22565
- status_filter: external_exports.string().describe("Filter memories by processing status (PENDING, PROCESSING, COMPLETED, FAILED). The snake_case alias status_filter is also accepted.").optional(),
22569
+ include_content: external_exports.boolean().describe("Whether to include the original content in the response (defaults to false).").optional(),
22570
+ include_processing_history: external_exports.boolean().describe("Whether to include background job processing history in the response (defaults to false).").optional(),
22571
+ status_filter: external_exports.string().describe("Filter memories by processing status (PENDING, PROCESSING, COMPLETED, FAILED).").optional(),
22566
22572
  filter: external_exports.string().describe("Optional metadata filter expression for list results").optional(),
22567
- max_results: external_exports.number().int().describe("Maximum number of results per page (defaults to 50, clamped to [1, 500]). The snake_case alias max_results is also accepted.").optional(),
22568
- next_token: external_exports.string().describe("Opaque pagination token for the next page. URL-safe Base64 without padding; do not parse or construct it. The snake_case alias next_token is also accepted.").optional(),
22569
- sort_by: external_exports.string().describe("Field to sort by (e.g., 'created_at'). The snake_case alias sort_by is also accepted.").optional(),
22570
- sort_order: external_exports.enum(["ASCENDING", "DESCENDING", "SORT_ORDER_UNSPECIFIED"]).describe("Sort direction (ASCENDING or DESCENDING). The snake_case alias sort_order is also accepted.").optional()
22573
+ max_results: external_exports.number().int().describe("Maximum number of results per page (defaults to 50, clamped to [1, 500]).").optional(),
22574
+ next_token: external_exports.string().describe("Opaque pagination token for the next page. URL-safe Base64 without padding; do not parse or construct it.").optional(),
22575
+ sort_by: external_exports.string().describe("Field to sort by (e.g., 'created_at').").optional(),
22576
+ sort_order: external_exports.enum(["ASCENDING", "DESCENDING", "SORT_ORDER_UNSPECIFIED"]).describe("Sort direction (ASCENDING or DESCENDING).").optional()
22571
22577
  }, async (args) => {
22572
22578
  const query = {};
22573
22579
  if (args.include_content !== void 0)
@@ -22591,12 +22597,12 @@ function registerTools() {
22591
22597
  });
22592
22598
  server.tool("goodmem_memories_pages", "List memory page images", {
22593
22599
  id: external_exports.string().describe("Memory UUID"),
22594
- start_page_index: external_exports.number().int().describe("Optional lower bound for returned page indices, inclusive. The snake_case alias start_page_index is also accepted.").optional(),
22595
- end_page_index: external_exports.number().int().describe("Optional upper bound for returned page indices, inclusive. The snake_case alias end_page_index is also accepted.").optional(),
22600
+ start_page_index: external_exports.number().int().describe("Optional lower bound for returned page indices, inclusive.").optional(),
22601
+ end_page_index: external_exports.number().int().describe("Optional upper bound for returned page indices, inclusive.").optional(),
22596
22602
  dpi: external_exports.number().int().describe("Optional rendition filter for page-image DPI.").optional(),
22597
- content_type: external_exports.string().describe("Optional rendition filter for page-image MIME type, such as image/png. The snake_case alias content_type is also accepted.").optional(),
22598
- max_results: external_exports.number().int().describe("Maximum number of results per page. The snake_case alias max_results is also accepted.").optional(),
22599
- next_token: external_exports.string().describe("Opaque pagination token for the next page. The snake_case alias next_token is also accepted. Do not parse or construct it.").optional()
22603
+ content_type: external_exports.string().describe("Optional rendition filter for page-image MIME type, such as image/png.").optional(),
22604
+ max_results: external_exports.number().int().describe("Maximum number of results per page.").optional(),
22605
+ next_token: external_exports.string().describe("Opaque pagination token for the next page. Do not parse or construct it.").optional()
22600
22606
  }, async (args) => {
22601
22607
  const query = {};
22602
22608
  if (args.start_page_index !== void 0)
@@ -22712,7 +22718,7 @@ function registerTools() {
22712
22718
  }).passthrough().describe("Configuration when kind is CREDENTIAL_KIND_GCP_ADC").optional(),
22713
22719
  labels: external_exports.any().describe('Optional annotations to aid operators (e.g., "owner=vertex")').optional()
22714
22720
  }).passthrough().describe("Structured credential payload describing how to authenticate with the provider. Required for SaaS providers; optional for local deployments.").optional(),
22715
- labels: external_exports.any().describe("User-defined labels for categorization").optional(),
22721
+ labels: external_exports.record(external_exports.string(), external_exports.string()).describe("User-defined labels for categorization").optional(),
22716
22722
  version: external_exports.string().describe("Version information").optional(),
22717
22723
  monitoring_endpoint: external_exports.string().describe("Monitoring endpoint URL").optional(),
22718
22724
  owner_id: external_exports.string().describe("Optional owner ID. If not provided, derived from the authentication context. Requires CREATE_RERANKER_ANY permission if specified.").optional(),
@@ -22751,13 +22757,13 @@ function registerTools() {
22751
22757
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
22752
22758
  });
22753
22759
  server.tool("goodmem_rerankers_delete", "Delete a reranker", {
22754
- id: external_exports.string().describe("The UUID of the reranker to delete")
22760
+ id: external_exports.string().describe("The unique identifier of the reranker to delete")
22755
22761
  }, async (args) => {
22756
22762
  await callApi("DELETE", `/v1/rerankers/${encodeURIComponent(String(args.id))}`, void 0);
22757
22763
  return { content: [{ type: "text", text: "Deleted successfully." }] };
22758
22764
  });
22759
22765
  server.tool("goodmem_rerankers_get", "Get a reranker by ID", {
22760
- id: external_exports.string().describe("The UUID of the reranker to retrieve")
22766
+ id: external_exports.string().describe("The unique identifier of the reranker to retrieve")
22761
22767
  }, async (args) => {
22762
22768
  const result = await callApi("GET", `/v1/rerankers/${encodeURIComponent(String(args.id))}`, void 0);
22763
22769
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
@@ -22765,22 +22771,22 @@ function registerTools() {
22765
22771
  server.tool("goodmem_rerankers_list", "List rerankers", {
22766
22772
  owner_id: external_exports.string().describe("Filter rerankers by owner ID. With LIST_RERANKER_ANY permission, omitting this shows all accessible rerankers; providing it filters by that owner. With LIST_RERANKER_OWN permission, only your own rerankers are shown regardless of this parameter (PERMISSION_DENIED if set to another user).").optional(),
22767
22773
  provider_type: external_exports.enum(["OPENAI", "VLLM", "TEI", "LLAMA_CPP", "VOYAGE", "COHERE", "JINA"]).describe("Filter rerankers by provider type. Allowed values match the ProviderType schema.").optional(),
22768
- labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Filter by labels. Each key-value pair is sent as a label.<key>=<value> query parameter.").optional()
22774
+ label: external_exports.record(external_exports.string(), external_exports.string()).describe("Filter by label. Each key-value pair is sent as label[key]=value query parameter.").optional()
22769
22775
  }, async (args) => {
22770
22776
  const query = {};
22771
22777
  if (args.owner_id !== void 0)
22772
22778
  query["ownerId"] = String(args.owner_id);
22773
22779
  if (args.provider_type !== void 0)
22774
22780
  query["providerType"] = String(args.provider_type);
22775
- if (args.labels) {
22776
- for (const [k, v] of Object.entries(args.labels))
22777
- query[`label.${k}`] = v;
22781
+ if (args.label) {
22782
+ for (const [k, v] of Object.entries(args.label))
22783
+ query[`label[${k}]`] = v;
22778
22784
  }
22779
22785
  const result = await callApi("GET", `/v1/rerankers`, void 0, query);
22780
22786
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
22781
22787
  });
22782
22788
  server.tool("goodmem_rerankers_update", "Update a reranker", {
22783
- id: external_exports.string().describe("The UUID of the reranker to update"),
22789
+ id: external_exports.string().describe("The unique identifier of the reranker to update"),
22784
22790
  display_name: external_exports.string().describe("User-facing name of the reranker").optional(),
22785
22791
  description: external_exports.string().describe("Description of the reranker").optional(),
22786
22792
  endpoint_url: external_exports.string().describe("API endpoint URL").optional(),
@@ -22804,8 +22810,8 @@ function registerTools() {
22804
22810
  }).passthrough().describe("Configuration when kind is CREDENTIAL_KIND_GCP_ADC").optional(),
22805
22811
  labels: external_exports.any().describe('Optional annotations to aid operators (e.g., "owner=vertex")').optional()
22806
22812
  }).passthrough().describe("Structured credential payload describing how to authenticate with the provider. Omit to keep existing credentials.").optional(),
22807
- replace_labels: external_exports.any().describe("Replace all existing labels with these (mutually exclusive with mergeLabels)").optional(),
22808
- merge_labels: external_exports.any().describe("Merge these labels with existing ones (mutually exclusive with replaceLabels)").optional(),
22813
+ replace_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Replace all existing labels with these (mutually exclusive with mergeLabels)").optional(),
22814
+ merge_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Merge these labels with existing ones (mutually exclusive with replaceLabels)").optional(),
22809
22815
  version: external_exports.string().describe("Version information").optional(),
22810
22816
  monitoring_endpoint: external_exports.string().describe("Monitoring endpoint URL").optional()
22811
22817
  }, async (args) => {
@@ -22837,7 +22843,7 @@ function registerTools() {
22837
22843
  });
22838
22844
  server.tool("goodmem_spaces_create", "Create a new Space", {
22839
22845
  name: external_exports.string().describe("The desired name for the space. Must be unique within the user's scope."),
22840
- labels: external_exports.any().describe("A set of key-value pairs to categorize or tag the space. Used for filtering and organizational purposes.").optional(),
22846
+ labels: external_exports.record(external_exports.string(), external_exports.string()).describe("A set of key-value pairs to categorize or tag the space. Used for filtering and organizational purposes.").optional(),
22841
22847
  space_embedders: external_exports.array(external_exports.object({
22842
22848
  embedderId: external_exports.string().describe("The UUID for the embedder to associate with the space."),
22843
22849
  defaultRetrievalWeight: external_exports.number().describe("Relative weight for this embedder used by default during retrieval. If omitted, defaults to 1.0; values need not sum to 1 and can be overridden per request.").optional()
@@ -22882,13 +22888,13 @@ function registerTools() {
22882
22888
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
22883
22889
  });
22884
22890
  server.tool("goodmem_spaces_delete", "Delete a space", {
22885
- id: external_exports.string().describe("The UUID of the space to delete")
22891
+ id: external_exports.string().describe("The unique identifier of the space to delete")
22886
22892
  }, async (args) => {
22887
22893
  await callApi("DELETE", `/v1/spaces/${encodeURIComponent(String(args.id))}`, void 0);
22888
22894
  return { content: [{ type: "text", text: "Deleted successfully." }] };
22889
22895
  });
22890
22896
  server.tool("goodmem_spaces_get", "Get a space by ID", {
22891
- id: external_exports.string().describe("The UUID of the space to retrieve")
22897
+ id: external_exports.string().describe("The unique identifier of the space to retrieve")
22892
22898
  }, async (args) => {
22893
22899
  const result = await callApi("GET", `/v1/spaces/${encodeURIComponent(String(args.id))}`, void 0);
22894
22900
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
@@ -22900,7 +22906,7 @@ function registerTools() {
22900
22906
  next_token: external_exports.string().describe("Pagination token for retrieving the next set of results").optional(),
22901
22907
  sort_by: external_exports.string().describe("Field to sort by: 'created_time', 'updated_time', or 'name' (default: 'created_time'). Unsupported values return INVALID_ARGUMENT.").optional(),
22902
22908
  sort_order: external_exports.enum(["ASCENDING", "DESCENDING", "SORT_ORDER_UNSPECIFIED"]).describe("Sort order (ASCENDING or DESCENDING, default: DESCENDING)").optional(),
22903
- labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Filter by labels. Each key-value pair is sent as a label.<key>=<value> query parameter.").optional()
22909
+ label: external_exports.record(external_exports.string(), external_exports.string()).describe("Filter by label. Each key-value pair is sent as label[key]=value query parameter.").optional()
22904
22910
  }, async (args) => {
22905
22911
  const query = {};
22906
22912
  if (args.owner_id !== void 0)
@@ -22915,19 +22921,19 @@ function registerTools() {
22915
22921
  query["sortBy"] = String(args.sort_by);
22916
22922
  if (args.sort_order !== void 0)
22917
22923
  query["sortOrder"] = String(args.sort_order);
22918
- if (args.labels) {
22919
- for (const [k, v] of Object.entries(args.labels))
22920
- query[`label.${k}`] = v;
22924
+ if (args.label) {
22925
+ for (const [k, v] of Object.entries(args.label))
22926
+ query[`label[${k}]`] = v;
22921
22927
  }
22922
22928
  const result = await callApi("GET", `/v1/spaces`, void 0, query);
22923
22929
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
22924
22930
  });
22925
22931
  server.tool("goodmem_spaces_update", "Update a space", {
22926
- id: external_exports.string().describe("The UUID of the space to update"),
22932
+ id: external_exports.string().describe("The unique identifier of the space to update"),
22927
22933
  name: external_exports.string().describe("The new name for the space.").optional(),
22928
22934
  public_read: external_exports.boolean().describe("Whether the space is publicly readable by all users.").optional(),
22929
- replace_labels: external_exports.any().describe("Labels to replace all existing labels. Mutually exclusive with mergeLabels.").optional(),
22930
- merge_labels: external_exports.any().describe("Labels to merge with existing labels. Mutually exclusive with replaceLabels.").optional()
22935
+ replace_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Labels to replace all existing labels. Mutually exclusive with mergeLabels.").optional(),
22936
+ merge_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Labels to merge with existing labels. Mutually exclusive with replaceLabels.").optional()
22931
22937
  }, async (args) => {
22932
22938
  const body = {};
22933
22939
  if (args.name !== void 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pairsystems/goodmem-mcp",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "GoodMem MCP server \u2014 exposes GoodMem API as MCP tools",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",