Skip to content
Back to skills

Agent Tool Contracts

ASecurity

Design agent tools and CLI surfaces—schemas, naming, errors, idempotency, and discoverability for LLM callers. Use when defining tools for agents, SDKs, or AI-native CLIs. Triggers: "tool schema", "agent tool", "function calling", "AI CLI".

  • 25 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
data-aigo

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add charlieviettq/awesome-agent-skill --skill agent-tool-contracts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Tool Contracts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Tool Contracts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/charlieviettq-agent-tool-contracts/badge)](https://www.skillsdirectory.com/skills/charlieviettq-agent-tool-contracts)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-tool-contracts
description: >
  Design agent tools and CLI surfaces—schemas, naming, errors, idempotency, and
  discoverability for LLM callers. Use when defining tools for agents, SDKs,
  or AI-native CLIs.
  Triggers: "tool schema", "agent tool", "function calling", "AI CLI".
---

# Agent tool contracts

## Tool design rules

1. **Verb-noun names** — `search_issues`, `create_draft_pr` (not `doStuff`).
2. **Minimal parameters** — fewer required fields; sensible defaults in description.
3. **Explicit side effects** — "Creates...", "Deletes...", "Read-only" in description.
4. **Bounded output** — paginate or truncate; return summary + pointer for large data.
5. **Stable errors** — `{ "code": "NOT_FOUND", "message": "..." }`.

## Schema quality

- Types and enums for categorical fields.
- Examples in parameter descriptions.
- Reject unknown enums at validation layer.

## Idempotency and safety

| Operation | Pattern |
|-----------|---------|
| Read | Safe to retry |
| Create | Idempotency key or dedupe by natural key |
| Update | Version or ETag when concurrent edits possible |
| Delete | Soft delete or two-step confirm in description |

## AI-native CLI (when applicable)

- `--json` for machine output; stable field names.
- Exit codes: 0 success, non-zero with stderr message.
- `--dry-run` for mutating commands.

## Review checklist

- [ ] Description tells the model when NOT to use the tool
- [ ] Errors actionable (what to fix, not internal codes only)
- [ ] No overlapping tools with ambiguous choice
- [ ] Integration test with representative agent prompts

## Related

`mcp-builder` for MCP-specific packaging; `agent-evaluation` for measuring tool accuracy.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…