Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clear-search-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typesensekit/cli": patch
---

Document the `documents.search` input shape with the required top-level `params` wrapper.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ List every supported operation:
tsk operations
```

Inspect an operation's input shape before running it:

```sh
tsk documents.search --schema
tsk documents.search --examples
```

Search parameters are passed inside the top-level `params` object:

```sh
tsk documents.search --input '{"collection":"production__products","params":{"q":"*","query_by":"q"}}' --json
```

## MCP Server

Run the MCP stdio server directly:
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/operation-docs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("operation docs", () => {

it("renders command-specific examples for common operations", () => {
expect(renderOperationExamples("documents.search")).toContain(
`tsk documents.search --input '{"collection":"products","params":{"q":"chair","query_by":"title,description"}}' --json`,
`tsk documents.search --input '{"collection":"production__products","params":{"q":"*","query_by":"q"}}' --json`,
);
expect(renderOperationExamples("presets.create")).toContain(
`tsk presets.create --input '{"name":"Semantic","value":{"query_by":"title_embedding"}}' --json`,
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/operation-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ const EXAMPLES: Record<string, JsonValue[]> = {
],
"documents.search": [
{
collection: "products",
collection: "production__products",
params: {
q: "chair",
query_by: "title,description",
q: "*",
query_by: "q",
},
},
],
Expand Down
Loading