Load tool description overrides from $OPENJARVIS_HOME/tools/descriptions.toml.
Distillation (M1) proposes tool description edits that get written to disk by
EditToolDescriptionApplier. This module loads those overrides so agents
see the improved descriptions at runtime.
The TOML file format (written by the applier) is::
[web_search]
description = "Search the web for recent information only"
[llm]
description = "Call a sub-LM. Has no internet access."
get_tool_description_override(tool_name: str) -> Optional[str]
Return the override description for tool_name, or None.
Results are cached for the lifetime of the process.
Source code in src/openjarvis/tools/description_loader.py
| def get_tool_description_override(tool_name: str) -> Optional[str]:
"""Return the override description for *tool_name*, or ``None``.
Results are cached for the lifetime of the process.
"""
global _cache # noqa: PLW0603
if _cache is None:
_cache = _load_overrides()
return _cache.get(tool_name)
|
Clear the cached overrides (useful for testing).
Source code in src/openjarvis/tools/description_loader.py
| def clear_cache() -> None:
"""Clear the cached overrides (useful for testing)."""
global _cache # noqa: PLW0603
_cache = None
|