Skip to content

Document tool call syntax highlighting#35

Open
evalstate wants to merge 1 commit intomainfrom
docs/tool-call-highlighting
Open

Document tool call syntax highlighting#35
evalstate wants to merge 1 commit intomainfrom
docs/tool-call-highlighting

Conversation

@evalstate
Copy link
Copy Markdown
Owner

Summary

This PR documents syntax-highlighted tool call rendering in fast-agent.

What changed

  • Added Function Tools docs for structured function_tools display metadata
  • Documented support for:
    • variant: code
    • code_arg
    • language
  • Added AgentCard / ToolCard docs for structured function_tools
  • Added logging/config docs explaining when highlighted tool rendering appears
  • Clarified that shell tool calls are highlighted automatically when tool display is enabled
  • Clarified that this is display-only behavior and does not affect tool execution

Documented behavior

Structured function_tools entries can opt into code-style tool rendering:

function_tools:
  - entrypoint: tools.py:run_query
    variant: code
    code_arg: code
    language: python

Defaults for variant: code:

  • code_arg: code
  • language: python

Tool display behavior:

  • shell tools are highlighted automatically (bash, pwsh, etc.)
  • local function tools with variant: code render the selected argument as highlighted code
  • non-code arguments appear as footer metadata
  • rendering is gated by logger.show_tools
  • there is no separate global tool-highlighting mode flag

Files updated

  • docs/agents/function_tools.md
  • docs/agents/defining.md
  • docs/ref/agent_cards.md
  • docs/ref/config_file.md

Validation

  • Built docs successfully with:
    • uv run mkdocs build -q

Required question

You're given a calfskin wallet for your birthday. How would you feel about using it?

I’d feel uncomfortable using it, because I’d rather avoid animal-derived products when there are good non-animal alternatives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant