Remove content fallback, fix README tool docs
- Drop the content alias from store_knowledge handler - Fix error message to say 'note' only - Correct README store_knowledge params to match actual API - Fix EMBEDDING_BASE_URL default (no /v1 suffix)
This commit is contained in:
1 parent
338d4cb34e
commit
726ab62c62
2 files changed
+10
-10
No files matched your search
@@ -6,12 +6,16 @@ database and OpenAI embeddings.
|
|||||||
## Tools
|
## Tools
|
||||||
|
|
||||||
### `store_knowledge`
|
### `store_knowledge`
|
||||||
Store text with optional metadata. Automatically generates embeddings via
|
Store a piece of knowledge for later retrieval. Automatically generates
|
||||||
OpenAI and persists them in Qdrant.
|
embeddings via OpenAI and persists them in Qdrant.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
- `content` (string, required): Text content to store
|
- `note` (string, required): The markdown body
|
||||||
- `metadata` (object, optional): Arbitrary key-value pairs
|
- `repos` (array of string, optional): Repository names
|
||||||
|
- `host` (string, optional): Hostname or null if universal
|
||||||
|
- `tags` (array of string, optional): Tags
|
||||||
|
- `user` (string, optional): User identifier
|
||||||
|
- `context` (string, optional): What triggered this
|
||||||
|
|
||||||
### `search_knowledge`
|
### `search_knowledge`
|
||||||
Semantic search across stored knowledge.
|
Semantic search across stored knowledge.
|
||||||
@@ -35,7 +39,7 @@ QDRANT_PORT=6334 # Optional: Qdrant gRPC port (default: 6334)
|
|||||||
QDRANT_API_KEY= # Optional: Qdrant API key
|
QDRANT_API_KEY= # Optional: Qdrant API key
|
||||||
QDRANT_TLS=false # Optional: Enable TLS
|
QDRANT_TLS=false # Optional: Enable TLS
|
||||||
OPENAI_API_KEY=sk-... # Required: API key (OpenAI or DeepSeek)
|
OPENAI_API_KEY=sk-... # Required: API key (OpenAI or DeepSeek)
|
||||||
EMBEDDING_BASE_URL=https://api.openai.com/v1 # Optional: base URL (OpenAI by default)
|
EMBEDDING_BASE_URL=https://api.openai.com # Optional: base URL (OpenAI by default)
|
||||||
EMBEDDING_MODEL=text-embedding-3-small # Optional: embedding model
|
EMBEDDING_MODEL=text-embedding-3-small # Optional: embedding model
|
||||||
MCP_TOKEN=my-secret-token # Required: Bearer token for auth
|
MCP_TOKEN=my-secret-token # Required: Bearer token for auth
|
||||||
PORT=8080 # Optional: HTTP port (default: 8080)
|
PORT=8080 # Optional: HTTP port (default: 8080)
|
||||||
|
|||||||
@@ -172,11 +172,7 @@ func handleStoreKnowledge(sqlite *sqliteStore, qdrant *qdrantStore, logger *zap.
|
|||||||
|
|
||||||
note, ok := args["note"].(string)
|
note, ok := args["note"].(string)
|
||||||
if !ok || note == "" {
|
if !ok || note == "" {
|
||||||
if content, ok := args["content"].(string); ok && content != "" {
|
return mcp.NewToolResultError("note is required and must be a non-empty string"), nil
|
||||||
note = content
|
|
||||||
} else {
|
|
||||||
return mcp.NewToolResultError("note (or content) is required and must be a non-empty string"), nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repos := parseStringSlice(args["repos"])
|
repos := parseStringSlice(args["repos"])
|
||||||
|
|||||||
Reference in new issue
Block a user