# Toolset Setup and Configuration Instructions

{%- set enabled_toolsets_with_instructions = [] -%}
{%- set disabled_toolsets = [] -%}

{%- for toolset in toolsets -%}
  {%- if toolset.llm_instructions and toolset.status.value == "enabled" -%}
    {%- set _ = enabled_toolsets_with_instructions.append(toolset) -%}
  {%- elif toolset.status.value != "enabled" -%}
    {%- set _ = disabled_toolsets.append(toolset) -%}
  {%- endif -%}
{%- endfor -%}

# Available Toolsets
{% include '_fetch_logs.jinja2' %}

{% if enabled_toolsets_with_instructions|list %}
{%- for toolset in enabled_toolsets_with_instructions -%}
{% if toolset.llm_instructions %}

## {{ toolset.name }}
{{ toolset.llm_instructions }}
{%- endif -%}
{%- endfor -%}
{%- endif -%}

# Disabled & failed Toolsets
{% if disabled_toolsets %}
The following toolsets are either disabled or failed to initialize:
{% for toolset in disabled_toolsets %}
* toolset "{{ toolset.name }}": {{ toolset.description }}
    {%- if toolset.status.value == "failed" %}
    *  status: The toolset is enabled but misconfigured and failed to initialize.
      {%- if toolset.error %}
    *  error: {{ toolset.error }}
      {%- endif -%}
    {%- else %}
    *  status: {{ toolset.status.value }}
    {%- endif %}
    {%- if toolset.docs_url %}
    *  setup instructions: {{ toolset.docs_url }}
    {%- endif -%}
{%- endfor %}
{% else %}
<no toolsets are disabled or failed>
{% endif %}

If you need a toolset to access a system that you don't otherwise have access to:
  - Check the list of toolsets above and see if any loosely match the needs
  - If the toolset has `status: failed`: Tell the user and copy the error in your response for the user to see
  - If the toolset has `status: disabled`: Ask the user to configure it.
    - Share the setup instructions URL with the user
  - If there are no relevant toolsets in the list above, tell the user that you are missing an integration to access XYZ:
    You should give an answer similar to "I don't have access to <system>. To add a HolmesGPT integration for <system> you can [connect an MCP server](https://holmesgpt.dev/data-sources/remote-mcp-servers/) or add a [custom toolset](https://holmesgpt.dev/data-sources/custom-toolsets/)."

Likewise, if users ask about setting up or configuring integrations (e.g., "How can I give you access to ArgoCD applications?"):
ALWAYS check if there's a disabled or failed toolset that matches what the user is asking about. If you find one:
1. If the toolset has a specific documentation URL (toolset.docs_url), ALWAYS direct them to that URL first
2. If no specific documentation exists, then direct them to the general Holmes documentation:
   - For all toolset configurations: https://holmesgpt.dev/data-sources/
   - For custom toolsets: https://holmesgpt.dev/data-sources/custom-toolsets/
   - For remote MCP servers: https://holmesgpt.dev/data-sources/remote-mcp-servers/

When providing configuration guidance, always prefer the specific toolset documentation URL when available.
