Skip to content

agent-tools

Agent tools must be an array of tool names, cannot be used with disallowed-tools

From plugin
claudelint
1113 skills13 agents1 command1 hook
Install
$ npx -y skills add pdugan20/claudelint --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Agent tools must be an array of tool names, cannot be used with disallowed-tools

Agent definition

agent-tools.md
description: "Agent tools must be an array of tool names, cannot be used with disallowed-tools"

agent-tools

<RuleHeader description="Agent tools must be an array of tool names, cannot be used with disallowed-tools" severity="error" :fixable="false" :configurable="false" category="Agents" />

Rule Details

This rule enforces two constraints on the `tools` field in agent markdown frontmatter. First, `tools` must be a valid array of strings representing tool names the agent is allowed to use. Second, `tools` and `disallowedTools` are mutually exclusive -- specifying both is an error. Array validation is delegated to AgentFrontmatterSchema.shape.tools, while cross-field validation uses AgentFrontmatterWithRefinements. This prevents conflicting tool access configurations.

Incorrect

Tools as a single string instead of array

---
name: code-agent
description: Writes and edits code
tools: Bash
---

Both tools and disallowedTools specified

---
name: code-agent
description: Writes and edits code
tools:
  - Bash
  - Edit
disallowedTools:
  - Write
---

Correct

Tools as a valid array of tool names

---
name: code-agent
description: Writes and edits code
tools:
  - Bash
  - Edit
  - Read
---

Using disallowedTools alone (without tools)

---
name: safe-agent
description: Agent with restricted access
disallowedTools:
  - Bash
---

How To Fix

Ensure `tools` is a YAML array of strings. If you need to restrict certain tools, use either `tools` (allowlist) or `disallowedTools` (blocklist), but not both.

Options

This rule does not have any configuration options.

Related Rules

  • [`agent-disallowed-tools`](/rules/agents/agent-disallowed-tools)

Resources

  • [Rule Implementation](https://github.com/pdugan20/claudelint/blob/main/src/rules/agents/agent-tools.ts)
  • [Rule Tests](https://github.com/pdugan20/claudelint/blob/main/tests/rules/agents/agent-tools.test.ts)

Version

Available since: v0.2.0

Read more
Ships withclaudelint

A linter for Claude Code projects. Validates CLAUDE.md files, skills, settings, hooks, MCP servers, plugins, and more.

Get the whole plugin, auto-invoked
Stats
11
Stars
0
Views
0
Forks
Active
Maintenance
TypeScript
Language
MIT
License
2d ago
Last commit
6mo ago
Created

Repo: pdugan20/claudelint