feat(viking): tool filtering, error diagnostics, and URI-prefix instructions - #381
Merged
Million-mo merged 1 commit intoAug 19, 2026
Merged
Conversation
…uctions
- viking_search/find accept multiple target_uri prefixes and default to the
full allowed_uri_prefixes allowlist (previously only searched the first)
- get_instructions() renders a dynamic Allowed URI Prefixes block so the
model passes target_uri directly and skips discovery probing
- all 15 viking_* tools include the exception type in error returns so
empty-message failures like ReadTimeout('') remain diagnosable
- VikingCapabilityConfig gains enabled_tools/disabled_tools whitelist/
blacklist filtering (mutually exclusive) to disable slow semantic-search
tools
Million-mo
force-pushed
the
feat/viking-tool-improvements
branch
from
August 19, 2026 08:59
72f6c99 to
5e38fa2
Compare
Million-mo
added a commit
to Million-mo/agentpool
that referenced
this pull request
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves the Viking knowledge-graph capability in four ways:
1. Multi-prefix search (bug fix)
viking_search/viking_findnow accept a list oftarget_uriprefixes. Whentarget_uriis omitted and an allowlist is configured, both tools pass everyallowed prefix to the SDK — previously they scoped to only the first allowed
prefix, silently dropping results from the other allowed trees.
2. Dynamic URI-prefix instructions
get_instructions()renders an Allowed URI Prefixes section whenallowed_uri_prefixesis configured, so the model sees the scoping boundaryup front and can pass the most specific
target_uridirectly, skippingdiscovery probing (
viking_ls) and the slower whole-allowlist search.3. Diagnosable error returns
All 15
viking_*tools now include the exception type in error returns:viking_search error (ReadTimeout): .... Empty-message failures likehttpx.ReadTimeout('')(slow semantic search on large resource trees) previouslyrendered as a useless
viking_search error:with no clue what went wrong.4. Tool filtering
VikingCapabilityConfiggainsenabled_tools/disabled_tools(mutually exclusive, mirroring
StdioMCPServerConfig). Operators can disable slowsemantic-search tools while keeping the deterministic ones:
The filter applies in
build_tools()after mode-based assembly and propagatesto both the toolset and the OpenCode
/experimental/toollisting.Tests
tests/capabilities/viking/validation, empty-message error diagnostics
ruff checkandmypyclean on changed sourceChangelog
2026-08-18-viking-allowed-uri-prefixes.md(extended: search scoping behavior)2026-08-19-viking-tool-error-diagnostics.md(new)2026-08-19-viking-tool-filtering.md(new)