Toolkdeps asset
kdeps-tools-retrieve_context
v1.1.0Retrieve semantically relevant text chunks from the configured RAG index. Use for finding code, documentation, or notes related to a query before implementing or answering. Requires KDEPS_RAG_BASE_URL pointing to a compatible RAG service.
Install
A kdeps asset: kdeps installs it on first run and updates it without a new release.
kdeps update tools/retrieve_context
Pin a version with kdeps update tools/retrieve_context@<version>.
Contents
Retrieve semantically relevant text chunks from the configured RAG index. Use for finding code, documentation, or notes related to a query before implementing or answering. Requires KDEPS_RAG_BASE_URL pointing to a compatible RAG service.
| Parameter | Type | Description |
|---|---|---|
| query * | string | The search query to find relevant context for |
| top_k | number | Number of results to return (default: 5, max: 32)default: 5 |
HTTP call (declared in YAML, no Go code)
POST
{{trimSuffix .env.BASE_URL "/"}}/v1/queryOffered when set: KDEPS_RAG_BASE_URL
- Content-Type:
- application/json
Body
{"query": {{json .args.query}}, "top_k": {{min .args.top_k 32}}}
Result
{{range $i, $r := .response.results}}{{if $i}}---
{{end}}[{{add $i 1}}] score={{printf "%.3f" $r.score}} source={{$r.source}}
{{$r.text}}
{{end}}
version: 1.1.0
description: Retrieve semantically relevant text chunks from the configured RAG index. Use for finding code, documentation, or notes related to a query before implementing or answering. Requires KDEPS_RAG_BASE_URL pointing to a compatible RAG service.
parameters:
query:
type: string
description: The search query to find relevant context for
required: true
top_k:
type: number
description: 'Number of results to return (default: 5, max: 32)'
default: 5
http:
env:
BASE_URL: [KDEPS_RAG_BASE_URL]
method: POST
url: '{{trimSuffix .env.BASE_URL "/"}}/v1/query'
headers:
Content-Type: application/json
body: '{"query": {{json .args.query}}, "top_k": {{min .args.top_k 32}}}'
result: |-
{{range $i, $r := .response.results}}{{if $i}}---
{{end}}[{{add $i 1}}] score={{printf "%.3f" $r.score}} source={{$r.source}}
{{$r.text}}
{{end}}
Versions
| Version | Published | Status |
|---|---|---|
| 1.1.0 | 10/13/2026 | active |
| 1.0.0 | 10/11/2026 | active |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 1.1.0
- Published
- 10/11/2026
Tags
kdepstool