Add example servers for SEP-2053 variant patterns (#4)
Add four new example servers demonstrating different SEP-2053 variant patterns: - model-optimized (same tools, different descriptions per LLM family) - trading (API versioning with deprecation lifecycle) - research (context budget management) - Refactor the existing variants-http example into a GitHub-style server with custom ranking. Signed-off-by: Kurt Degiorgio <kdegiorgio@bloomberg.net>
This commit is contained in:
parent
c01fd188d2
commit
e1c17e047f
1 changed files with 1218 additions and 147 deletions
27
go/sdk/examples/server/research/README.md
Normal file
27
go/sdk/examples/server/research/README.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Research Assistant
|
||||
|
||||
A variant-aware MCP server that manages context budget by providing the same research tools (`search_papers`, `get_paper`, `summarize`) at different verbosity levels.
|
||||
|
||||
**Pattern demonstrated:** Context budget management with description verbosity control.
|
||||
|
||||
## Variants
|
||||
|
||||
| Variant | Verbosity | Status | Use Case |
|
||||
|---|---|---|---|
|
||||
| `deep-research` | Multi-paragraph with usage examples | Stable | Literature reviews, large context windows |
|
||||
| `quick-lookup` | Single-sentence descriptions | Stable | Fast Q&A, limited token budgets |
|
||||
| `synthesis` | Balanced, moderate detail | Experimental | Report generation workflows |
|
||||
|
||||
All three variants expose the same three tools with the same behavior — only the description detail level differs.
|
||||
|
||||
## Custom Ranking
|
||||
|
||||
Clients send a `"contextSize"` hint (`"verbose"`, `"compact"`, or `"standard"`). The ranking function matches the hint to the appropriate variant, falling back to priority order.
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
go run ./examples/server/research
|
||||
```
|
||||
|
||||
The server listens on `http://localhost:8080`.
|
||||
Loading…
Reference in a new issue