Skip to content

feat: model-accessible diagnostics search for skill and MCP loading issues #310

Open

Description

@danielkov

Goal

When a user asks "why aren't you activating skill X?" or "why aren't you using MCP server Y?", the agent can run a targeted search over startup and loading diagnostics and explain the cause.

Context

#309 makes invalid plugin components non-fatal: skipped skills, skills directories, mcp.json files, and MCP server entries, plus duplicate plugin MCP server names, are logged with tracing::warn! and the rest of the plugin still loads. In the shipped CLI no subscriber delivers these events (telemetry::init installs none by default, and exported_targets() only covers agentkit_loop and agentkit_mcp). The reason a component is missing is therefore invisible to both the user and the agent.

Proposal

A built-in tool the model can call to query diagnostics recorded during plugin, skill, and MCP loading and hot-reload.

  • Record diagnostics per runtime generation: component kind (skill, MCP server, plugin), plugin alias, component name, path, reason, and whether the component was skipped or the generation was rejected.
  • Support targeted queries by component name, plugin alias, or kind, so the agent fetches only the entries relevant to the question.
  • Cover at least: agentkit_plugins diagnostics (SkillSkipped, SkillsLocationInvalid, McpDisabled, McpServerSkipped, InvalidExtensionsField), skipped plugin MCP servers (unsupported transport, invalid cwd, escaping command path, invalid header), duplicate-name precedence, and MCP server connection or initialization failures.
  • Keep output bounded and free of secrets (no header values, tokens, or env values).

Acceptance

  • Given a plugin skill with invalid frontmatter, asking the agent why the skill is unavailable leads it to call the tool and report the plugin, the file path, and the spec violation.
  • Given two plugins that declare the same MCP server, the agent can say which plugin owns the server and which declaration was skipped.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions