opik 2.2.89 → 2.2.91

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.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import {spawnSync}from'child_process';import {chalkStderr}from'chalk';import {createHash,randomBytes}from'crypto';import L,{accessSync,constants}from'fs';import f from'os';import i from'path';import U from'ini';var b="https://stats.comet.com/notify/event/",T="opik_typescript_sdk__configuration__cli",S=3e3,l="default",p="npx",h="OPIK_CLI_LAUNCHER",E="OPIK_CLI_SESSION_ID",D=9,g="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function V(){return Array.from(randomBytes(D),n=>g[n%g.length]).join("")}var v="2.2.89";function K(n){return `${T}__${n}`}function M(n=process.env){let e=n.OPIK_ANALYTICS_ENABLE;return e===void 0?true:!["0","false","no"].includes(e.trim().toLowerCase())}var H=/^--[a-z][a-z0-9-]*$/,$=/^-[A-Za-z]$/,F=/^[a-z][a-z0-9-]*$/,j=3;function B(n){let e=[],t=[],o=false;for(let r of n){if(r==="--")break;if(r.startsWith("-")){o=true;let s=r.split("=")[0];(H.test(s)||$.test(s))&&t.push(s);continue}!o&&e.length<j&&F.test(r)&&e.push(r);}return {command:e.join(" "),flags:[...new Set(t)].join(",")}}function J(n=process.env,e=f.homedir()){var r;let t=((r=I(n.OPIK_WORKSPACE))!=null?r:z(n,e)).trim();if(t!==""&&t!==l)return t;let o=createHash("sha256").update(f.hostname()+W()).digest("hex");return `${l}_${o}`}function N(n,e=process.env){var m;let t=M(e),o=(m=e.OPIK_ANALYTICS_URL)!=null?m:b,r=t?J(e):"",{command:s,flags:c}=B(n),_=V(),u=[];return {sessionId:_,track(d,w={}){if(!t||o==="")return;let k={anonymous_id:r,event_type:K(d),event_properties:{session_id:_,launcher:p,sdk_version:v,command:s,flags:c,node_version:process.versions.node,os:process.platform,arch:process.arch,ci:!!e.CI,...w}};u.push(G(o,k));},async flush(){u.length!==0&&await Promise.race([Promise.allSettled(u),new Promise(d=>setTimeout(d,S).unref())]);}}}async function G(n,e){try{await fetch(n,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":`opik-typescript-sdk/${v}`},body:JSON.stringify(e),signal:AbortSignal.timeout(S)});}catch{}}function z(n,e){var r;let t=I(n.OPIK_CONFIG_PATH),o=t===void 0?i.join(e,".opik.config"):t.trim().replace(/^~(?=$|\/|\\)/,e);try{let s=U.parse(L.readFileSync(o,"utf8")),c=(r=s==null?void 0:s.opik)==null?void 0:r.workspace;return typeof c=="string"?c:""}catch{return ""}}function I(n){return n===void 0||n.trim()===""?void 0:n}function W(){try{return f.userInfo().username}catch{return ""}}var Q=1e4;function A(n=process.platform){return n==="win32"?"uv.exe":"uv"}function nn(n=process.env,e=process.platform,t=f.homedir()){let o=[y(n.XDG_BIN_HOME),y(n.CARGO_HOME,"bin"),i.join(t,".local","bin"),i.join(t,".cargo","bin")].filter(s=>s!==void 0),r=A(e);return [...new Set(o)].map(s=>i.join(s,r))}function y(n,...e){let t=(n!=null?n:"").trim();if(!(t===""||!i.isAbsolute(t)))return i.join(t,...e)}function P(){let n=A();if(O(n))return {path:n,source:"path"};for(let e of nn())if(en(e)&&O(e))return {path:e,source:"install-dir"}}function en(n){try{return accessSync(n,constants.X_OK),!0}catch{return false}}function O(n){let e=spawnSync(n,["--version"],{stdio:"ignore",timeout:Q});return e.error===void 0&&e.status===0}var rn="https://www.comet.com/docs/opik/mcp-server#install-uv-if-you-dont-have-it";async function on(){var r;let n=process.argv.slice(2),e=N(n);e.track("invoked");let t=P();if(e.track("uv_detected",{uv_found:t!==void 0,uv_source:t==null?void 0:t.source}),t===void 0)return process.stderr.write(`
2
+ import {spawnSync}from'child_process';import {chalkStderr}from'chalk';import {createHash,randomBytes}from'crypto';import L,{accessSync,constants}from'fs';import f from'os';import i from'path';import U from'ini';var b="https://stats.comet.com/notify/event/",T="opik_typescript_sdk__configuration__cli",S=3e3,l="default",p="npx",h="OPIK_CLI_LAUNCHER",E="OPIK_CLI_SESSION_ID",D=9,g="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function V(){return Array.from(randomBytes(D),n=>g[n%g.length]).join("")}var v="2.2.91";function K(n){return `${T}__${n}`}function M(n=process.env){let e=n.OPIK_ANALYTICS_ENABLE;return e===void 0?true:!["0","false","no"].includes(e.trim().toLowerCase())}var H=/^--[a-z][a-z0-9-]*$/,$=/^-[A-Za-z]$/,F=/^[a-z][a-z0-9-]*$/,j=3;function B(n){let e=[],t=[],o=false;for(let r of n){if(r==="--")break;if(r.startsWith("-")){o=true;let s=r.split("=")[0];(H.test(s)||$.test(s))&&t.push(s);continue}!o&&e.length<j&&F.test(r)&&e.push(r);}return {command:e.join(" "),flags:[...new Set(t)].join(",")}}function J(n=process.env,e=f.homedir()){var r;let t=((r=I(n.OPIK_WORKSPACE))!=null?r:z(n,e)).trim();if(t!==""&&t!==l)return t;let o=createHash("sha256").update(f.hostname()+W()).digest("hex");return `${l}_${o}`}function N(n,e=process.env){var m;let t=M(e),o=(m=e.OPIK_ANALYTICS_URL)!=null?m:b,r=t?J(e):"",{command:s,flags:c}=B(n),_=V(),u=[];return {sessionId:_,track(d,w={}){if(!t||o==="")return;let k={anonymous_id:r,event_type:K(d),event_properties:{session_id:_,launcher:p,sdk_version:v,command:s,flags:c,node_version:process.versions.node,os:process.platform,arch:process.arch,ci:!!e.CI,...w}};u.push(G(o,k));},async flush(){u.length!==0&&await Promise.race([Promise.allSettled(u),new Promise(d=>setTimeout(d,S).unref())]);}}}async function G(n,e){try{await fetch(n,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":`opik-typescript-sdk/${v}`},body:JSON.stringify(e),signal:AbortSignal.timeout(S)});}catch{}}function z(n,e){var r;let t=I(n.OPIK_CONFIG_PATH),o=t===void 0?i.join(e,".opik.config"):t.trim().replace(/^~(?=$|\/|\\)/,e);try{let s=U.parse(L.readFileSync(o,"utf8")),c=(r=s==null?void 0:s.opik)==null?void 0:r.workspace;return typeof c=="string"?c:""}catch{return ""}}function I(n){return n===void 0||n.trim()===""?void 0:n}function W(){try{return f.userInfo().username}catch{return ""}}var Q=1e4;function A(n=process.platform){return n==="win32"?"uv.exe":"uv"}function nn(n=process.env,e=process.platform,t=f.homedir()){let o=[y(n.XDG_BIN_HOME),y(n.CARGO_HOME,"bin"),i.join(t,".local","bin"),i.join(t,".cargo","bin")].filter(s=>s!==void 0),r=A(e);return [...new Set(o)].map(s=>i.join(s,r))}function y(n,...e){let t=(n!=null?n:"").trim();if(!(t===""||!i.isAbsolute(t)))return i.join(t,...e)}function P(){let n=A();if(O(n))return {path:n,source:"path"};for(let e of nn())if(en(e)&&O(e))return {path:e,source:"install-dir"}}function en(n){try{return accessSync(n,constants.X_OK),!0}catch{return false}}function O(n){let e=spawnSync(n,["--version"],{stdio:"ignore",timeout:Q});return e.error===void 0&&e.status===0}var rn="https://www.comet.com/docs/opik/mcp-server#install-uv-if-you-dont-have-it";async function on(){var r;let n=process.argv.slice(2),e=N(n);e.track("invoked");let t=P();if(e.track("uv_detected",{uv_found:t!==void 0,uv_source:t==null?void 0:t.source}),t===void 0)return process.stderr.write(`
3
3
  ${chalkStderr.red("\u2717")} ${chalkStderr.bold("The Opik MCP configuration requires uv, which is not installed on this machine.")}
4
4
 
5
5
  How to install uv: ${chalkStderr.cyan.underline(rn)}
package/dist/index.d.cts CHANGED
@@ -14176,8 +14176,13 @@ declare abstract class BasePrompt {
14176
14176
  * Fetches and returns complete version history, sorted by creation date (newest first).
14177
14177
  * Automatically handles pagination to fetch all versions.
14178
14178
  *
14179
+ * To look at a prompt's history without writing code, AI coding assistants connected to the
14180
+ * Opik MCP server can call `read("prompt", name)`, which returns the prompt together with its
14181
+ * versions, or page through them with `list("prompt_version", prompt_id=...)`.
14182
+ *
14179
14183
  * @param options - Optional filtering, sorting, and search parameters
14180
14184
  * @returns Promise resolving to array of all PromptVersion instances for this prompt
14185
+ * @see https://www.comet.com/docs/opik/mcp-server
14181
14186
  */
14182
14187
  getVersions(options?: {
14183
14188
  search?: string;
@@ -14695,9 +14700,13 @@ declare class Dataset<T extends DatasetItemData = DatasetItemData> {
14695
14700
  /**
14696
14701
  * Retrieve a fixed number of dataset items.
14697
14702
  *
14703
+ * To look at a dataset's items without writing code, AI coding assistants connected to the
14704
+ * Opik MCP server can call `list("dataset_item", dataset_id=...)`.
14705
+ *
14698
14706
  * @param nbSamples The number of samples to retrieve. If not set - all items are returned
14699
14707
  * @param lastRetrievedId Optional ID of the last retrieved item for pagination
14700
14708
  * @returns A list of objects representing the dataset items
14709
+ * @see https://www.comet.com/docs/opik/mcp-server
14701
14710
  */
14702
14711
  getItems(nbSamples?: number, lastRetrievedId?: string): Promise<(T & {
14703
14712
  id: string;
@@ -14705,9 +14714,13 @@ declare class Dataset<T extends DatasetItemData = DatasetItemData> {
14705
14714
  /**
14706
14715
  * Retrieve raw DatasetItem objects with full metadata (evaluators, executionPolicy) preserved.
14707
14716
  *
14717
+ * To look at a dataset's items without writing code, AI coding assistants connected to the
14718
+ * Opik MCP server can call `list("dataset_item", dataset_id=...)`.
14719
+ *
14708
14720
  * @param nbSamples The number of samples to retrieve. If not set - all items are returned
14709
14721
  * @param lastRetrievedId Optional ID of the last retrieved item for pagination
14710
14722
  * @returns A list of DatasetItem objects
14723
+ * @see https://www.comet.com/docs/opik/mcp-server
14711
14724
  */
14712
14725
  getRawItems(nbSamples?: number, lastRetrievedId?: string): Promise<DatasetItem<T>[]>;
14713
14726
  /**
@@ -15098,9 +15111,14 @@ declare class Prompt extends BasePrompt {
15098
15111
  * or a commit hash for backwards compatibility. Inputs matching `/^v\d+$/`
15099
15112
  * are treated as version numbers; anything else is treated as a commit.
15100
15113
  *
15114
+ * To look at a prompt's versions without writing code, AI coding assistants connected to the
15115
+ * Opik MCP server can call `read("prompt", name)`, which returns the prompt together with its
15116
+ * versions.
15117
+ *
15101
15118
  * @param version - Sequential version (`"v<N>"`) or commit hash
15102
15119
  * (commit input is **deprecated** — pass a `"v<N>"` identifier instead).
15103
15120
  * @returns Prompt instance representing that version, or null if not found
15121
+ * @see https://www.comet.com/docs/opik/mcp-server
15104
15122
  *
15105
15123
  * @example
15106
15124
  * ```typescript
@@ -15213,9 +15231,13 @@ declare class TestSuite {
15213
15231
  * Use this when you need to inspect or forward the stored evaluator
15214
15232
  * config or per-item execution policy as-is.
15215
15233
  *
15234
+ * To look at a test suite's items without writing code, AI coding assistants connected to the
15235
+ * Opik MCP server can call `list("dataset_item", dataset_id=...)`.
15236
+ *
15216
15237
  * @param nbSamples Max items to retrieve. Omit to return all items.
15217
15238
  * @param lastRetrievedId Opaque cursor for pagination (last `id` from a previous call).
15218
15239
  * @returns Array of {@link RawTestSuiteItem} objects.
15240
+ * @see https://www.comet.com/docs/opik/mcp-server
15219
15241
  */
15220
15242
  getRawItems(nbSamples?: number, lastRetrievedId?: string): Promise<RawTestSuiteItem[]>;
15221
15243
  getGlobalAssertions(): Promise<string[]>;
@@ -15513,8 +15535,15 @@ declare class Experiment {
15513
15535
  /**
15514
15536
  * Retrieves experiment items with options to limit results and truncate data
15515
15537
  *
15538
+ * To look at an experiment's results without writing code, AI coding assistants connected to
15539
+ * the Opik MCP server can call `list("dataset_item", experiment_ids=[...])`, which shows each
15540
+ * case's scores and compares several experiments case by case. That call is scoped by
15541
+ * experiment ID, while this method reads items by experiment name, so the two differ when
15542
+ * several experiments share a name.
15543
+ *
15516
15544
  * @param options Options for retrieving items
15517
15545
  * @returns Promise resolving to a list of experiment items
15546
+ * @see https://www.comet.com/docs/opik/mcp-server
15518
15547
  */
15519
15548
  getItems(options?: {
15520
15549
  maxResults?: number;
@@ -15657,9 +15686,14 @@ declare class ChatPrompt extends BasePrompt {
15657
15686
  * or a commit hash for backwards compatibility. Inputs matching `/^v\d+$/`
15658
15687
  * are treated as version numbers; anything else is treated as a commit.
15659
15688
  *
15689
+ * To look at a prompt's versions without writing code, AI coding assistants connected to the
15690
+ * Opik MCP server can call `read("prompt", name)`, which returns the prompt together with its
15691
+ * versions.
15692
+ *
15660
15693
  * @param version - Sequential version (`"v<N>"`) or commit hash
15661
15694
  * (commit input is **deprecated** — pass a `"v<N>"` identifier instead).
15662
15695
  * @returns ChatPrompt instance representing that version, or null if not found
15696
+ * @see https://www.comet.com/docs/opik/mcp-server
15663
15697
  *
15664
15698
  * @example
15665
15699
  * ```typescript
@@ -15787,10 +15821,15 @@ declare class OpikClient {
15787
15821
  /**
15788
15822
  * Retrieves an existing dataset by name
15789
15823
  *
15824
+ * To look at a dataset without writing code, AI coding assistants connected to the Opik MCP
15825
+ * server can call `read("dataset", name)` and page through its items with
15826
+ * `list("dataset_item", dataset_id=...)`.
15827
+ *
15790
15828
  * @param name The name of the dataset to retrieve
15791
15829
  * @param projectName Optional project name to scope the dataset lookup. If not provided, uses the client's configured project.
15792
15830
  * @returns A Dataset object associated with the specified name
15793
15831
  * @throws Error if the dataset doesn't exist
15832
+ * @see https://www.comet.com/docs/opik/mcp-server
15794
15833
  */
15795
15834
  getDataset: <T extends DatasetItemData = DatasetItemData>(name: string, projectName?: string) => Promise<Dataset<T>>;
15796
15835
  /**
@@ -15814,9 +15853,14 @@ declare class OpikClient {
15814
15853
  /**
15815
15854
  * Returns all datasets up to the specified limit
15816
15855
  *
15856
+ * To look at datasets without writing code, AI coding assistants connected to the Opik MCP
15857
+ * server can call `list("dataset", name=...)`, which lists datasets and test suites filtered
15858
+ * by a name substring.
15859
+ *
15817
15860
  * @param maxResults Maximum number of datasets to return (default: 100)
15818
15861
  * @param projectName Optional project name to filter datasets by. If not provided, uses the client's configured project.
15819
15862
  * @returns List of Dataset objects
15863
+ * @see https://www.comet.com/docs/opik/mcp-server
15820
15864
  */
15821
15865
  getDatasets: <T extends DatasetItemData = DatasetItemData>(maxResults?: number, projectName?: string) => Promise<Dataset<T>[]>;
15822
15866
  /**
@@ -15836,10 +15880,15 @@ declare class OpikClient {
15836
15880
  /**
15837
15881
  * Retrieves an existing test suite by name.
15838
15882
  *
15883
+ * To look at a test suite without writing code, AI coding assistants connected to the Opik
15884
+ * MCP server can call `read("dataset", name)` and page through its items with
15885
+ * `list("dataset_item", dataset_id=...)`.
15886
+ *
15839
15887
  * @param name The name of the test suite to retrieve
15840
15888
  * @param projectName Optional project name to scope the lookup. If not provided, uses the client's configured project.
15841
15889
  * @returns A TestSuite object
15842
15890
  * @throws DatasetNotFoundError if the test suite doesn't exist
15891
+ * @see https://www.comet.com/docs/opik/mcp-server
15843
15892
  */
15844
15893
  getTestSuite: (name: string, projectName?: string) => Promise<TestSuite>;
15845
15894
  /**
@@ -15859,9 +15908,14 @@ declare class OpikClient {
15859
15908
  /**
15860
15909
  * Returns all test suites up to the specified limit.
15861
15910
  *
15911
+ * To look at test suites without writing code, AI coding assistants connected to the Opik
15912
+ * MCP server can call `list("dataset", name=...)`, which lists datasets and test suites
15913
+ * filtered by a name substring.
15914
+ *
15862
15915
  * @param maxResults Maximum number of test suites to return (default: 100)
15863
15916
  * @param projectName Optional project name to filter by. If not provided, uses the client's configured project.
15864
15917
  * @returns List of TestSuite objects
15918
+ * @see https://www.comet.com/docs/opik/mcp-server
15865
15919
  */
15866
15920
  getTestSuites: (maxResults?: number, projectName?: string) => Promise<TestSuite[]>;
15867
15921
  private getProjectIdByName;
@@ -15995,37 +16049,58 @@ declare class OpikClient {
15995
16049
  /**
15996
16050
  * Gets an experiment by its unique ID
15997
16051
  *
16052
+ * To look at an experiment without writing code, AI coding assistants connected to the Opik
16053
+ * MCP server can call `read("experiment", id)`, and
16054
+ * `list("dataset_item", experiment_ids=[...])` compares runs case by case.
16055
+ *
15998
16056
  * @param id The unique identifier of the experiment
15999
16057
  * @returns The Experiment object
16058
+ * @see https://www.comet.com/docs/opik/mcp-server
16000
16059
  */
16001
16060
  getExperimentById: (id: string) => Promise<Experiment>;
16002
16061
  /**
16003
16062
  * Gets experiments by name (can return multiple experiments with the same name)
16004
16063
  *
16064
+ * To look at experiments without writing code, AI coding assistants connected to the Opik
16065
+ * MCP server can call `list("experiment", name=...)`, and
16066
+ * `list("dataset_item", experiment_ids=[...])` compares runs case by case.
16067
+ *
16005
16068
  * @param name The name of the experiments to retrieve
16006
16069
  * @returns A list of Experiment objects with the given name
16070
+ * @see https://www.comet.com/docs/opik/mcp-server
16007
16071
  */
16008
16072
  getExperimentsByName: (name: string, projectName?: string) => Promise<Experiment[]>;
16009
16073
  /**
16010
16074
  * Gets a single experiment by name (returns the first match if multiple exist)
16011
16075
  *
16076
+ * To look at an experiment without writing code, AI coding assistants connected to the Opik
16077
+ * MCP server can call `read("experiment", name)`.
16078
+ *
16012
16079
  * @param name The name of the experiment to retrieve
16013
16080
  * @returns The Experiment object
16081
+ * @see https://www.comet.com/docs/opik/mcp-server
16014
16082
  */
16015
16083
  getExperiment: (name: string, projectName?: string) => Promise<Experiment>;
16016
16084
  /**
16017
16085
  * Gets all experiments associated with a dataset
16018
16086
  *
16087
+ * To look at a dataset's experiments without writing code, AI coding assistants connected to
16088
+ * the Opik MCP server can call `list("experiment", filters='dataset_id = "..."')`.
16089
+ *
16019
16090
  * @param datasetName The name of the dataset
16020
16091
  * @param maxResults Maximum number of experiments to return (default: 100)
16021
16092
  * @param projectName Optional project name to scope the dataset lookup. If not provided, uses the client's configured project.
16022
16093
  * @returns A list of Experiment objects associated with the dataset
16023
16094
  * @throws {DatasetNotFoundError} If the dataset doesn't exist
16095
+ * @see https://www.comet.com/docs/opik/mcp-server
16024
16096
  */
16025
16097
  getDatasetExperiments: (datasetName: string, maxResults?: number, projectName?: string) => Promise<Experiment[]>;
16026
16098
  /**
16027
16099
  * Retrieves all experiments associated with a test suite.
16028
16100
  *
16101
+ * To look at a test suite's experiments without writing code, AI coding assistants connected
16102
+ * to the Opik MCP server can call `list("experiment", filters='dataset_id = "..."')`.
16103
+ *
16029
16104
  * @param name The name of the test suite
16030
16105
  * @param maxResults Maximum number of experiments to return (default: 100)
16031
16106
  * @param projectName Optional project name to scope the suite lookup. If not provided, uses the client's configured project.
@@ -16033,6 +16108,7 @@ declare class OpikClient {
16033
16108
  * each carrying the suite-specific assertion aggregates (`passRate`, `passedCount`,
16034
16109
  * `totalCount`, `assertionScores`) populated by the backend.
16035
16110
  * @throws {DatasetNotFoundError} If the test suite doesn't exist
16111
+ * @see https://www.comet.com/docs/opik/mcp-server
16036
16112
  */
16037
16113
  getTestSuiteExperiments: (name: string, maxResults?: number, projectName?: string) => Promise<TestSuiteExperiment[]>;
16038
16114
  /**
@@ -16105,6 +16181,10 @@ declare class OpikClient {
16105
16181
  * default 300s). When called inside a track() context the prompt reference
16106
16182
  * is injected into the active trace/span metadata.
16107
16183
  *
16184
+ * To look at a prompt without writing code, AI coding assistants connected to the Opik MCP
16185
+ * server can call `read("prompt", name)`, which returns the prompt together with its
16186
+ * version history.
16187
+ *
16108
16188
  * @param options - Prompt name and optional version pin or environment
16109
16189
  * @param options.name - Name of the prompt
16110
16190
  * @param options.version - Sequential version identifier (e.g. `"v3"`). If not
@@ -16118,6 +16198,7 @@ declare class OpikClient {
16118
16198
  * @throws Error if both `commit` and `version` are provided, or if `environment` is
16119
16199
  * combined with either `commit` or `version`
16120
16200
  * @throws PromptTemplateStructureMismatch if prompt exists but is a chat prompt
16201
+ * @see https://www.comet.com/docs/opik/mcp-server
16121
16202
  */
16122
16203
  getPrompt: (options: GetPromptOptions) => Promise<Prompt | null>;
16123
16204
  /**
@@ -16126,6 +16207,10 @@ declare class OpikClient {
16126
16207
  * default 300s). When called inside a track() context the prompt reference
16127
16208
  * is injected into the active trace/span metadata.
16128
16209
  *
16210
+ * To look at a prompt without writing code, AI coding assistants connected to the Opik MCP
16211
+ * server can call `read("prompt", name)`, which returns the prompt together with its
16212
+ * version history.
16213
+ *
16129
16214
  * @param options - Prompt name and optional version pin or environment
16130
16215
  * @param options.name - Name of the prompt
16131
16216
  * @param options.version - Sequential version identifier (e.g. `"v3"`). If not
@@ -16139,6 +16224,7 @@ declare class OpikClient {
16139
16224
  * @throws Error if both `commit` and `version` are provided, or if `environment` is
16140
16225
  * combined with either `commit` or `version`
16141
16226
  * @throws PromptTemplateStructureMismatch if prompt exists but is a text prompt
16227
+ * @see https://www.comet.com/docs/opik/mcp-server
16142
16228
  *
16143
16229
  * @example
16144
16230
  * ```typescript
@@ -16153,6 +16239,9 @@ declare class OpikClient {
16153
16239
  /**
16154
16240
  * Searches prompts with optional OQL filtering.
16155
16241
  *
16242
+ * To look for prompts without writing code, AI coding assistants connected to the Opik MCP
16243
+ * server can call `list("prompt", name=...)`, which filters by a name substring.
16244
+ *
16156
16245
  * @param filterString - Optional OQL filter string to narrow down search
16157
16246
  *
16158
16247
  * Supported OQL format: `<COLUMN> <OPERATOR> <VALUE> [AND <COLUMN> <OPERATOR> <VALUE>]*`
@@ -16173,6 +16262,7 @@ declare class OpikClient {
16173
16262
  *
16174
16263
  * @returns Promise resolving to array of matching latest prompt versions
16175
16264
  * @throws Error if OQL filter syntax is invalid
16265
+ * @see https://www.comet.com/docs/opik/mcp-server
16176
16266
  *
16177
16267
  * @example
16178
16268
  * ```typescript
@@ -16232,10 +16322,15 @@ declare class OpikClient {
16232
16322
  version?: string;
16233
16323
  projectName?: string;
16234
16324
  }) => Promise<void>;
16325
+ private executeSearch;
16235
16326
  /**
16236
16327
  * Search for traces in the given project. Optionally, you can wait for at least a certain number of traces
16237
16328
  * to be found before returning within the specified timeout.
16238
16329
  *
16330
+ * AI coding assistants connected to the Opik MCP server can run this search without writing
16331
+ * code: `list("trace", project_name=..., filters=...)` takes the same OQL as `filterString`,
16332
+ * and also sorts and limits by time (`sort="duration desc"`, `since="24h"`).
16333
+ *
16239
16334
  * @param projectName - The name of the project to search in. Defaults to the project configured on the Client.
16240
16335
  * @param filterString - Filter using Opik Query Language (OQL). Format: `<COLUMN> <OPERATOR> <VALUE> [AND ...]`
16241
16336
  * Common columns: `id`, `name`, `start_time`, `end_time`, `input`, `output`, `status`, `tags`, `metadata.*`, `feedback_scores.*`, `usage.*`
@@ -16248,6 +16343,7 @@ declare class OpikClient {
16248
16343
  *
16249
16344
  * @returns Promise resolving to array of traces matching the search criteria
16250
16345
  * @throws {SearchTimeoutError} If waitForAtLeast traces are not found within the specified timeout
16346
+ * @see https://www.comet.com/docs/opik/mcp-server
16251
16347
  *
16252
16348
  * @example
16253
16349
  * ```typescript
@@ -16268,7 +16364,6 @@ declare class OpikClient {
16268
16364
  * });
16269
16365
  * ```
16270
16366
  */
16271
- private executeSearch;
16272
16367
  searchTraces: (options?: {
16273
16368
  projectName?: string;
16274
16369
  filterString?: string;
@@ -16284,6 +16379,10 @@ declare class OpikClient {
16284
16379
  * Threads represent conversations or sessions that group related traces together.
16285
16380
  * This method allows you to search and filter threads using Opik Query Language (OQL).
16286
16381
  *
16382
+ * AI coding assistants connected to the Opik MCP server can run this search without writing
16383
+ * code: `list("thread", project_name=..., filters=...)` takes the same OQL as `filterString`,
16384
+ * and `read("thread", id, project_name=...)` returns one thread's messages.
16385
+ *
16287
16386
  * @param options - Search options
16288
16387
  * @param options.projectName - Name of the project to search in. Defaults to the client's configured project.
16289
16388
  * @param options.filterString - Filter string using Opik Query Language (OQL).
@@ -16295,6 +16394,7 @@ declare class OpikClient {
16295
16394
  * @param options.waitForTimeout - Timeout in seconds when using waitForAtLeast (default: 60)
16296
16395
  * @returns Promise resolving to an array of threads
16297
16396
  * @throws {SearchTimeoutError} If waitForAtLeast is specified and timeout is reached
16397
+ * @see https://www.comet.com/docs/opik/mcp-server
16298
16398
  *
16299
16399
  * @example
16300
16400
  * ```typescript
@@ -16335,6 +16435,10 @@ declare class OpikClient {
16335
16435
  * Spans represent individual operations or steps within traces, such as LLM calls or function executions.
16336
16436
  * This method allows you to search and filter spans using Opik Query Language (OQL).
16337
16437
  *
16438
+ * AI coding assistants connected to the Opik MCP server can run this search without writing
16439
+ * code: `list("span", project_name=..., filters=...)` takes the same OQL as `filterString`,
16440
+ * and `read("trace", trace_id)` returns a trace together with all of its spans.
16441
+ *
16338
16442
  * @param options - Search options
16339
16443
  * @param options.projectName - Name of the project to search in. Defaults to the client's configured project.
16340
16444
  * @param options.filterString - Filter string using Opik Query Language (OQL).
@@ -16346,6 +16450,7 @@ declare class OpikClient {
16346
16450
  * @param options.waitForTimeout - Timeout in seconds when using waitForAtLeast (default: 60)
16347
16451
  * @returns Promise resolving to an array of spans
16348
16452
  * @throws {SearchTimeoutError} If waitForAtLeast is specified and timeout is reached
16453
+ * @see https://www.comet.com/docs/opik/mcp-server
16349
16454
  *
16350
16455
  * @example
16351
16456
  * ```typescript
package/dist/index.d.ts CHANGED
@@ -14176,8 +14176,13 @@ declare abstract class BasePrompt {
14176
14176
  * Fetches and returns complete version history, sorted by creation date (newest first).
14177
14177
  * Automatically handles pagination to fetch all versions.
14178
14178
  *
14179
+ * To look at a prompt's history without writing code, AI coding assistants connected to the
14180
+ * Opik MCP server can call `read("prompt", name)`, which returns the prompt together with its
14181
+ * versions, or page through them with `list("prompt_version", prompt_id=...)`.
14182
+ *
14179
14183
  * @param options - Optional filtering, sorting, and search parameters
14180
14184
  * @returns Promise resolving to array of all PromptVersion instances for this prompt
14185
+ * @see https://www.comet.com/docs/opik/mcp-server
14181
14186
  */
14182
14187
  getVersions(options?: {
14183
14188
  search?: string;
@@ -14695,9 +14700,13 @@ declare class Dataset<T extends DatasetItemData = DatasetItemData> {
14695
14700
  /**
14696
14701
  * Retrieve a fixed number of dataset items.
14697
14702
  *
14703
+ * To look at a dataset's items without writing code, AI coding assistants connected to the
14704
+ * Opik MCP server can call `list("dataset_item", dataset_id=...)`.
14705
+ *
14698
14706
  * @param nbSamples The number of samples to retrieve. If not set - all items are returned
14699
14707
  * @param lastRetrievedId Optional ID of the last retrieved item for pagination
14700
14708
  * @returns A list of objects representing the dataset items
14709
+ * @see https://www.comet.com/docs/opik/mcp-server
14701
14710
  */
14702
14711
  getItems(nbSamples?: number, lastRetrievedId?: string): Promise<(T & {
14703
14712
  id: string;
@@ -14705,9 +14714,13 @@ declare class Dataset<T extends DatasetItemData = DatasetItemData> {
14705
14714
  /**
14706
14715
  * Retrieve raw DatasetItem objects with full metadata (evaluators, executionPolicy) preserved.
14707
14716
  *
14717
+ * To look at a dataset's items without writing code, AI coding assistants connected to the
14718
+ * Opik MCP server can call `list("dataset_item", dataset_id=...)`.
14719
+ *
14708
14720
  * @param nbSamples The number of samples to retrieve. If not set - all items are returned
14709
14721
  * @param lastRetrievedId Optional ID of the last retrieved item for pagination
14710
14722
  * @returns A list of DatasetItem objects
14723
+ * @see https://www.comet.com/docs/opik/mcp-server
14711
14724
  */
14712
14725
  getRawItems(nbSamples?: number, lastRetrievedId?: string): Promise<DatasetItem<T>[]>;
14713
14726
  /**
@@ -15098,9 +15111,14 @@ declare class Prompt extends BasePrompt {
15098
15111
  * or a commit hash for backwards compatibility. Inputs matching `/^v\d+$/`
15099
15112
  * are treated as version numbers; anything else is treated as a commit.
15100
15113
  *
15114
+ * To look at a prompt's versions without writing code, AI coding assistants connected to the
15115
+ * Opik MCP server can call `read("prompt", name)`, which returns the prompt together with its
15116
+ * versions.
15117
+ *
15101
15118
  * @param version - Sequential version (`"v<N>"`) or commit hash
15102
15119
  * (commit input is **deprecated** — pass a `"v<N>"` identifier instead).
15103
15120
  * @returns Prompt instance representing that version, or null if not found
15121
+ * @see https://www.comet.com/docs/opik/mcp-server
15104
15122
  *
15105
15123
  * @example
15106
15124
  * ```typescript
@@ -15213,9 +15231,13 @@ declare class TestSuite {
15213
15231
  * Use this when you need to inspect or forward the stored evaluator
15214
15232
  * config or per-item execution policy as-is.
15215
15233
  *
15234
+ * To look at a test suite's items without writing code, AI coding assistants connected to the
15235
+ * Opik MCP server can call `list("dataset_item", dataset_id=...)`.
15236
+ *
15216
15237
  * @param nbSamples Max items to retrieve. Omit to return all items.
15217
15238
  * @param lastRetrievedId Opaque cursor for pagination (last `id` from a previous call).
15218
15239
  * @returns Array of {@link RawTestSuiteItem} objects.
15240
+ * @see https://www.comet.com/docs/opik/mcp-server
15219
15241
  */
15220
15242
  getRawItems(nbSamples?: number, lastRetrievedId?: string): Promise<RawTestSuiteItem[]>;
15221
15243
  getGlobalAssertions(): Promise<string[]>;
@@ -15513,8 +15535,15 @@ declare class Experiment {
15513
15535
  /**
15514
15536
  * Retrieves experiment items with options to limit results and truncate data
15515
15537
  *
15538
+ * To look at an experiment's results without writing code, AI coding assistants connected to
15539
+ * the Opik MCP server can call `list("dataset_item", experiment_ids=[...])`, which shows each
15540
+ * case's scores and compares several experiments case by case. That call is scoped by
15541
+ * experiment ID, while this method reads items by experiment name, so the two differ when
15542
+ * several experiments share a name.
15543
+ *
15516
15544
  * @param options Options for retrieving items
15517
15545
  * @returns Promise resolving to a list of experiment items
15546
+ * @see https://www.comet.com/docs/opik/mcp-server
15518
15547
  */
15519
15548
  getItems(options?: {
15520
15549
  maxResults?: number;
@@ -15657,9 +15686,14 @@ declare class ChatPrompt extends BasePrompt {
15657
15686
  * or a commit hash for backwards compatibility. Inputs matching `/^v\d+$/`
15658
15687
  * are treated as version numbers; anything else is treated as a commit.
15659
15688
  *
15689
+ * To look at a prompt's versions without writing code, AI coding assistants connected to the
15690
+ * Opik MCP server can call `read("prompt", name)`, which returns the prompt together with its
15691
+ * versions.
15692
+ *
15660
15693
  * @param version - Sequential version (`"v<N>"`) or commit hash
15661
15694
  * (commit input is **deprecated** — pass a `"v<N>"` identifier instead).
15662
15695
  * @returns ChatPrompt instance representing that version, or null if not found
15696
+ * @see https://www.comet.com/docs/opik/mcp-server
15663
15697
  *
15664
15698
  * @example
15665
15699
  * ```typescript
@@ -15787,10 +15821,15 @@ declare class OpikClient {
15787
15821
  /**
15788
15822
  * Retrieves an existing dataset by name
15789
15823
  *
15824
+ * To look at a dataset without writing code, AI coding assistants connected to the Opik MCP
15825
+ * server can call `read("dataset", name)` and page through its items with
15826
+ * `list("dataset_item", dataset_id=...)`.
15827
+ *
15790
15828
  * @param name The name of the dataset to retrieve
15791
15829
  * @param projectName Optional project name to scope the dataset lookup. If not provided, uses the client's configured project.
15792
15830
  * @returns A Dataset object associated with the specified name
15793
15831
  * @throws Error if the dataset doesn't exist
15832
+ * @see https://www.comet.com/docs/opik/mcp-server
15794
15833
  */
15795
15834
  getDataset: <T extends DatasetItemData = DatasetItemData>(name: string, projectName?: string) => Promise<Dataset<T>>;
15796
15835
  /**
@@ -15814,9 +15853,14 @@ declare class OpikClient {
15814
15853
  /**
15815
15854
  * Returns all datasets up to the specified limit
15816
15855
  *
15856
+ * To look at datasets without writing code, AI coding assistants connected to the Opik MCP
15857
+ * server can call `list("dataset", name=...)`, which lists datasets and test suites filtered
15858
+ * by a name substring.
15859
+ *
15817
15860
  * @param maxResults Maximum number of datasets to return (default: 100)
15818
15861
  * @param projectName Optional project name to filter datasets by. If not provided, uses the client's configured project.
15819
15862
  * @returns List of Dataset objects
15863
+ * @see https://www.comet.com/docs/opik/mcp-server
15820
15864
  */
15821
15865
  getDatasets: <T extends DatasetItemData = DatasetItemData>(maxResults?: number, projectName?: string) => Promise<Dataset<T>[]>;
15822
15866
  /**
@@ -15836,10 +15880,15 @@ declare class OpikClient {
15836
15880
  /**
15837
15881
  * Retrieves an existing test suite by name.
15838
15882
  *
15883
+ * To look at a test suite without writing code, AI coding assistants connected to the Opik
15884
+ * MCP server can call `read("dataset", name)` and page through its items with
15885
+ * `list("dataset_item", dataset_id=...)`.
15886
+ *
15839
15887
  * @param name The name of the test suite to retrieve
15840
15888
  * @param projectName Optional project name to scope the lookup. If not provided, uses the client's configured project.
15841
15889
  * @returns A TestSuite object
15842
15890
  * @throws DatasetNotFoundError if the test suite doesn't exist
15891
+ * @see https://www.comet.com/docs/opik/mcp-server
15843
15892
  */
15844
15893
  getTestSuite: (name: string, projectName?: string) => Promise<TestSuite>;
15845
15894
  /**
@@ -15859,9 +15908,14 @@ declare class OpikClient {
15859
15908
  /**
15860
15909
  * Returns all test suites up to the specified limit.
15861
15910
  *
15911
+ * To look at test suites without writing code, AI coding assistants connected to the Opik
15912
+ * MCP server can call `list("dataset", name=...)`, which lists datasets and test suites
15913
+ * filtered by a name substring.
15914
+ *
15862
15915
  * @param maxResults Maximum number of test suites to return (default: 100)
15863
15916
  * @param projectName Optional project name to filter by. If not provided, uses the client's configured project.
15864
15917
  * @returns List of TestSuite objects
15918
+ * @see https://www.comet.com/docs/opik/mcp-server
15865
15919
  */
15866
15920
  getTestSuites: (maxResults?: number, projectName?: string) => Promise<TestSuite[]>;
15867
15921
  private getProjectIdByName;
@@ -15995,37 +16049,58 @@ declare class OpikClient {
15995
16049
  /**
15996
16050
  * Gets an experiment by its unique ID
15997
16051
  *
16052
+ * To look at an experiment without writing code, AI coding assistants connected to the Opik
16053
+ * MCP server can call `read("experiment", id)`, and
16054
+ * `list("dataset_item", experiment_ids=[...])` compares runs case by case.
16055
+ *
15998
16056
  * @param id The unique identifier of the experiment
15999
16057
  * @returns The Experiment object
16058
+ * @see https://www.comet.com/docs/opik/mcp-server
16000
16059
  */
16001
16060
  getExperimentById: (id: string) => Promise<Experiment>;
16002
16061
  /**
16003
16062
  * Gets experiments by name (can return multiple experiments with the same name)
16004
16063
  *
16064
+ * To look at experiments without writing code, AI coding assistants connected to the Opik
16065
+ * MCP server can call `list("experiment", name=...)`, and
16066
+ * `list("dataset_item", experiment_ids=[...])` compares runs case by case.
16067
+ *
16005
16068
  * @param name The name of the experiments to retrieve
16006
16069
  * @returns A list of Experiment objects with the given name
16070
+ * @see https://www.comet.com/docs/opik/mcp-server
16007
16071
  */
16008
16072
  getExperimentsByName: (name: string, projectName?: string) => Promise<Experiment[]>;
16009
16073
  /**
16010
16074
  * Gets a single experiment by name (returns the first match if multiple exist)
16011
16075
  *
16076
+ * To look at an experiment without writing code, AI coding assistants connected to the Opik
16077
+ * MCP server can call `read("experiment", name)`.
16078
+ *
16012
16079
  * @param name The name of the experiment to retrieve
16013
16080
  * @returns The Experiment object
16081
+ * @see https://www.comet.com/docs/opik/mcp-server
16014
16082
  */
16015
16083
  getExperiment: (name: string, projectName?: string) => Promise<Experiment>;
16016
16084
  /**
16017
16085
  * Gets all experiments associated with a dataset
16018
16086
  *
16087
+ * To look at a dataset's experiments without writing code, AI coding assistants connected to
16088
+ * the Opik MCP server can call `list("experiment", filters='dataset_id = "..."')`.
16089
+ *
16019
16090
  * @param datasetName The name of the dataset
16020
16091
  * @param maxResults Maximum number of experiments to return (default: 100)
16021
16092
  * @param projectName Optional project name to scope the dataset lookup. If not provided, uses the client's configured project.
16022
16093
  * @returns A list of Experiment objects associated with the dataset
16023
16094
  * @throws {DatasetNotFoundError} If the dataset doesn't exist
16095
+ * @see https://www.comet.com/docs/opik/mcp-server
16024
16096
  */
16025
16097
  getDatasetExperiments: (datasetName: string, maxResults?: number, projectName?: string) => Promise<Experiment[]>;
16026
16098
  /**
16027
16099
  * Retrieves all experiments associated with a test suite.
16028
16100
  *
16101
+ * To look at a test suite's experiments without writing code, AI coding assistants connected
16102
+ * to the Opik MCP server can call `list("experiment", filters='dataset_id = "..."')`.
16103
+ *
16029
16104
  * @param name The name of the test suite
16030
16105
  * @param maxResults Maximum number of experiments to return (default: 100)
16031
16106
  * @param projectName Optional project name to scope the suite lookup. If not provided, uses the client's configured project.
@@ -16033,6 +16108,7 @@ declare class OpikClient {
16033
16108
  * each carrying the suite-specific assertion aggregates (`passRate`, `passedCount`,
16034
16109
  * `totalCount`, `assertionScores`) populated by the backend.
16035
16110
  * @throws {DatasetNotFoundError} If the test suite doesn't exist
16111
+ * @see https://www.comet.com/docs/opik/mcp-server
16036
16112
  */
16037
16113
  getTestSuiteExperiments: (name: string, maxResults?: number, projectName?: string) => Promise<TestSuiteExperiment[]>;
16038
16114
  /**
@@ -16105,6 +16181,10 @@ declare class OpikClient {
16105
16181
  * default 300s). When called inside a track() context the prompt reference
16106
16182
  * is injected into the active trace/span metadata.
16107
16183
  *
16184
+ * To look at a prompt without writing code, AI coding assistants connected to the Opik MCP
16185
+ * server can call `read("prompt", name)`, which returns the prompt together with its
16186
+ * version history.
16187
+ *
16108
16188
  * @param options - Prompt name and optional version pin or environment
16109
16189
  * @param options.name - Name of the prompt
16110
16190
  * @param options.version - Sequential version identifier (e.g. `"v3"`). If not
@@ -16118,6 +16198,7 @@ declare class OpikClient {
16118
16198
  * @throws Error if both `commit` and `version` are provided, or if `environment` is
16119
16199
  * combined with either `commit` or `version`
16120
16200
  * @throws PromptTemplateStructureMismatch if prompt exists but is a chat prompt
16201
+ * @see https://www.comet.com/docs/opik/mcp-server
16121
16202
  */
16122
16203
  getPrompt: (options: GetPromptOptions) => Promise<Prompt | null>;
16123
16204
  /**
@@ -16126,6 +16207,10 @@ declare class OpikClient {
16126
16207
  * default 300s). When called inside a track() context the prompt reference
16127
16208
  * is injected into the active trace/span metadata.
16128
16209
  *
16210
+ * To look at a prompt without writing code, AI coding assistants connected to the Opik MCP
16211
+ * server can call `read("prompt", name)`, which returns the prompt together with its
16212
+ * version history.
16213
+ *
16129
16214
  * @param options - Prompt name and optional version pin or environment
16130
16215
  * @param options.name - Name of the prompt
16131
16216
  * @param options.version - Sequential version identifier (e.g. `"v3"`). If not
@@ -16139,6 +16224,7 @@ declare class OpikClient {
16139
16224
  * @throws Error if both `commit` and `version` are provided, or if `environment` is
16140
16225
  * combined with either `commit` or `version`
16141
16226
  * @throws PromptTemplateStructureMismatch if prompt exists but is a text prompt
16227
+ * @see https://www.comet.com/docs/opik/mcp-server
16142
16228
  *
16143
16229
  * @example
16144
16230
  * ```typescript
@@ -16153,6 +16239,9 @@ declare class OpikClient {
16153
16239
  /**
16154
16240
  * Searches prompts with optional OQL filtering.
16155
16241
  *
16242
+ * To look for prompts without writing code, AI coding assistants connected to the Opik MCP
16243
+ * server can call `list("prompt", name=...)`, which filters by a name substring.
16244
+ *
16156
16245
  * @param filterString - Optional OQL filter string to narrow down search
16157
16246
  *
16158
16247
  * Supported OQL format: `<COLUMN> <OPERATOR> <VALUE> [AND <COLUMN> <OPERATOR> <VALUE>]*`
@@ -16173,6 +16262,7 @@ declare class OpikClient {
16173
16262
  *
16174
16263
  * @returns Promise resolving to array of matching latest prompt versions
16175
16264
  * @throws Error if OQL filter syntax is invalid
16265
+ * @see https://www.comet.com/docs/opik/mcp-server
16176
16266
  *
16177
16267
  * @example
16178
16268
  * ```typescript
@@ -16232,10 +16322,15 @@ declare class OpikClient {
16232
16322
  version?: string;
16233
16323
  projectName?: string;
16234
16324
  }) => Promise<void>;
16325
+ private executeSearch;
16235
16326
  /**
16236
16327
  * Search for traces in the given project. Optionally, you can wait for at least a certain number of traces
16237
16328
  * to be found before returning within the specified timeout.
16238
16329
  *
16330
+ * AI coding assistants connected to the Opik MCP server can run this search without writing
16331
+ * code: `list("trace", project_name=..., filters=...)` takes the same OQL as `filterString`,
16332
+ * and also sorts and limits by time (`sort="duration desc"`, `since="24h"`).
16333
+ *
16239
16334
  * @param projectName - The name of the project to search in. Defaults to the project configured on the Client.
16240
16335
  * @param filterString - Filter using Opik Query Language (OQL). Format: `<COLUMN> <OPERATOR> <VALUE> [AND ...]`
16241
16336
  * Common columns: `id`, `name`, `start_time`, `end_time`, `input`, `output`, `status`, `tags`, `metadata.*`, `feedback_scores.*`, `usage.*`
@@ -16248,6 +16343,7 @@ declare class OpikClient {
16248
16343
  *
16249
16344
  * @returns Promise resolving to array of traces matching the search criteria
16250
16345
  * @throws {SearchTimeoutError} If waitForAtLeast traces are not found within the specified timeout
16346
+ * @see https://www.comet.com/docs/opik/mcp-server
16251
16347
  *
16252
16348
  * @example
16253
16349
  * ```typescript
@@ -16268,7 +16364,6 @@ declare class OpikClient {
16268
16364
  * });
16269
16365
  * ```
16270
16366
  */
16271
- private executeSearch;
16272
16367
  searchTraces: (options?: {
16273
16368
  projectName?: string;
16274
16369
  filterString?: string;
@@ -16284,6 +16379,10 @@ declare class OpikClient {
16284
16379
  * Threads represent conversations or sessions that group related traces together.
16285
16380
  * This method allows you to search and filter threads using Opik Query Language (OQL).
16286
16381
  *
16382
+ * AI coding assistants connected to the Opik MCP server can run this search without writing
16383
+ * code: `list("thread", project_name=..., filters=...)` takes the same OQL as `filterString`,
16384
+ * and `read("thread", id, project_name=...)` returns one thread's messages.
16385
+ *
16287
16386
  * @param options - Search options
16288
16387
  * @param options.projectName - Name of the project to search in. Defaults to the client's configured project.
16289
16388
  * @param options.filterString - Filter string using Opik Query Language (OQL).
@@ -16295,6 +16394,7 @@ declare class OpikClient {
16295
16394
  * @param options.waitForTimeout - Timeout in seconds when using waitForAtLeast (default: 60)
16296
16395
  * @returns Promise resolving to an array of threads
16297
16396
  * @throws {SearchTimeoutError} If waitForAtLeast is specified and timeout is reached
16397
+ * @see https://www.comet.com/docs/opik/mcp-server
16298
16398
  *
16299
16399
  * @example
16300
16400
  * ```typescript
@@ -16335,6 +16435,10 @@ declare class OpikClient {
16335
16435
  * Spans represent individual operations or steps within traces, such as LLM calls or function executions.
16336
16436
  * This method allows you to search and filter spans using Opik Query Language (OQL).
16337
16437
  *
16438
+ * AI coding assistants connected to the Opik MCP server can run this search without writing
16439
+ * code: `list("span", project_name=..., filters=...)` takes the same OQL as `filterString`,
16440
+ * and `read("trace", trace_id)` returns a trace together with all of its spans.
16441
+ *
16338
16442
  * @param options - Search options
16339
16443
  * @param options.projectName - Name of the project to search in. Defaults to the client's configured project.
16340
16444
  * @param options.filterString - Filter string using Opik Query Language (OQL).
@@ -16346,6 +16450,7 @@ declare class OpikClient {
16346
16450
  * @param options.waitForTimeout - Timeout in seconds when using waitForAtLeast (default: 60)
16347
16451
  * @returns Promise resolving to an array of spans
16348
16452
  * @throws {SearchTimeoutError} If waitForAtLeast is specified and timeout is reached
16453
+ * @see https://www.comet.com/docs/opik/mcp-server
16349
16454
  *
16350
16455
  * @example
16351
16456
  * ```typescript
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opik",
3
3
  "description": "Opik TypeScript and JavaScript SDK",
4
- "version": "2.2.89",
4
+ "version": "2.2.91",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/comet-ml/opik.git",