| name | tool-discovery |
| description | Find and manage available tools. Learn how to list user-created tools, search by criteria, categorize by risk level, and understand tool status states. |
| metadata | {"category":"Tool Management","difficulty":"beginner","apply-to":"matimo_list_user_tools matimo_list_skills matimo_get_tool_status"} |
Tool Discovery: Finding and Managing Tools
This skill teaches you how to discover, search, and manage Matimo tools that are available in your system.
Overview: Tool Sources
Three sources of tools:
-
Core/Built-in Tools โ Shipped with Matimo SDK
matimo_create_tool, matimo_validate_tool, matimo_doctor, etc.
- Read-only, always available
- Used by agents to manage tool lifecycle
-
Provider Tools โ Application-specific tools from packages
- Slack tools, GitHub tools, AWS tools, etc.
- Defined in
packages/{provider}/tools/
- Available after initialization with
toolPaths
-
User-Created Tools โ Dynamically created by agents
- Stored in
target_dir (usually temp directory)
- Status:
draft, approved, rejected
- Discovered via
matimo_list_user_tools
Meta-Tool: matimo_list_user_tools
Lists all tools created by agents in a specific directory.
Input: { target_dir: "/path/to/tools" }
Output: { tools: [...] status: "success" }
Basic Usage
Call: matimo_list_user_tools(target_dir="/tmp/my-tools")
Response:
{
"tools": [
{
"name": "weather_fetch",
"version": "1.0.0",
"description": "Get current weather for a city",
"status": "approved",
"riskLevel": "LOW",
"createdAt": "2026-03-17T10:30:00Z",
"executionType": "http",
"requiresApproval": false
},
{
"name": "file_reader",
"version": "1.0.0",
"description": "Read files from filesystem",
"status": "rejected",
"riskLevel": "CRITICAL",
"reason": "Command tools are blocked by policy",
"createdAt": "2026-03-17T10:31:00Z",
"executionType": "command",
"requiresApproval": true
}
],
"summary": {
"total": 2,
"approved": 1,
"rejected": 1,
"draft": 0
}
}
Understanding Tool Status
Status: approved
Tool has been validated and approved by human operator. Ready to use.
Indicators:
- โ
Created with matimo_create_tool
- โ
Passed matimo_doctor validation
- โ
Human approved via matimo_review
- โ
Registry reloaded via matimo_reload_tools
- โ
Executable via matimo.execute()
Example in response:
{
"name": "weather_fetch",
"status": "approved",
"riskLevel": "LOW",
"message": "Ready for execution"
}
Status: draft
Tool created but not yet approved. Cannot be executed.
Indicators:
- โ
Created with matimo_create_tool
- โ
Passed validation
- โธ๏ธ Waiting for human approval via matimo_review
- โ NOT executable
Example in response:
{
"name": "todo_create",
"status": "draft",
"riskLevel": "MEDIUM",
"message": "Awaiting human approval"
}
Status: rejected
Tool failed policy validation or human rejected it. Cannot be used.
Indicators:
- โ Failed policy check (e.g., command blocked)
- OR: โ Human rejected after review
- โ NOT executable
- โ Marked as rejected
Example in response:
{
"name": "file_reader",
"status": "rejected",
"riskLevel": "CRITICAL",
"reason": "Command tools are blocked by policy. Use HTTP endpoints instead."
}
Understanding Risk Levels
Risk level indicates potential impact if the tool is misused or exploited:
Risk Level: LOW
When: Read-only HTTP GET to public APIs
execution:
type: http
method: GET
url: "https://api.github.com/users/{username}"
Why LOW:
- โ
No data modification
- โ
Public API (no secrets)
- โ
Limited impact even if exposed
- โ
Auto-approved, no human approval needed
Risk Level: MEDIUM
When: Data modification via HTTP POST/PUT
execution:
type: http
method: POST
url: "https://api.slack.com/api/chat.postMessage"
Why MEDIUM:
- โ ๏ธ Can modify data (send messages, create issues)
- โ ๏ธ Requires credentials (API key)
- โ ๏ธ Requires human review before execution
- โ
Policy allows it (HTTP only)
Risk Level: HIGH
When: Access to sensitive APIs or complex operations
execution:
type: http
method: DELETE
url: "https://api.github.com/repos/{owner}/{repo}"
Why HIGH:
- โ ๏ธ Destructive operation (deletion)
- โ ๏ธ Affects multiple users
- โ ๏ธ Hard to undo
- โ
Policy allows it (HTTP only)
- โ ๏ธ Requires careful human review
Risk Level: CRITICAL
When: Shell commands, code execution, or policy violations
execution:
type: command
command: bash
args: ["-c", "{user_command}"]
Why CRITICAL:
- โ Full system access
- โ Can read/write files, modify system
- โ Cannot be restricted
- โ Policy blocks (allowCommandTools: false)
- โ Always rejected
Query Examples
Example 1: List All Tools in a Directory
Call: matimo_list_user_tools(target_dir="/tmp/matimo-tools")
What you'll see:
- All tools created in that directory
- Their current status (approved/draft/rejected)
- Risk level and reason (if rejected)
- Execution type and requirements
Example 2: Check Which Tools Are Approved
Agent logic:
Call: matimo_list_user_tools(target_dir="/tmp/matimo-tools")
Filter: tools where status === "approved"
Result: Only ready-to-use tools
Use case: "What tools can I use right now?"
Example 3: Check Why a Tool Was Rejected
Agent logic:
Call: matimo_list_user_tools(target_dir="/tmp/matimo-tools")
Find: tool named "file_reader"
Check: status === "rejected"
Read: tool.reason
Output: "Command tools are blocked by policy"
Use case: "Why doesn't file_reader work?"
Example 4: Understand Tool Capabilities
Agent logic:
Call: matimo_list_user_tools(target_dir="/tmp/matimo-tools")
For each tool:
- executionType: "http" or "command" or "function"
- riskLevel: "LOW" to "CRITICAL"
- requiresApproval: true/false
Decision: Which tools match my goal?
Use case: "What operations can I do?"
Complete Tool Information
When matimo_list_user_tools returns a tool, it includes:
{
"name": "github_create_issue",
"version": "1.0.0",
"description": "Create an issue...",
"status": "approved",
"riskLevel": "MEDIUM",
"createdAt": "2026-03-17T10:30:00Z",
"executionType": "http",
"requiresApproval": false,
"reason": null,
"approvedBy": "human-operator",
"approvedAt": "2026-03-17T10:31:00Z",
"parameters": {
"owner": { "type": "string", "required": true },
"repo": { "type": "string", "required": true },
"title": { "type": "string", "required": true }
}
}
Common Discovery Patterns
Pattern 1: Report on All Tools
Agent goal: "What tools has the system created?"
Call: matimo_list_user_tools(target_dir=<providedDir>)
Output each tool:
- Name and description
- Status (โ
approved or โ rejected)
- Risk level
Summary: "System has 3 tools: 2 approved, 1 rejected"
Pattern 2: Find Tools Ready to Use
Agent goal: "What can I execute right now?"
Call: matimo_list_user_tools(target_dir=<dir>)
Filter: status === "approved" AND riskLevel !== "CRITICAL"
Then: User can safely call matimo.execute(toolName, params)
Pattern 3: Understand Why Tool Was Rejected
Agent goal: "Can I fix the rejected file_reader tool?"
Call: matimo_list_user_tools(target_dir=<dir>)
Find: "file_reader"
Read: reason = "Command tools are blocked by policy"
Learn: "I can't fix this; policy is immutable. I need HTTP instead."
Pattern 4: Summarize Safety Status
Agent goal: "Is the tool environment safe?"
Call: matimo_list_user_tools(target_dir=<dir>)
Count: CRITICAL-level tools
If count === 0:
Result: โ
"Safeโno critical-risk tools"
If count > 0:
Result: โ ๏ธ "Unsafeโ{count} high-risk tools present"
Meta-Tool: matimo_list_skills
Lists available skills (domain knowledge files) in the system.
Call: matimo_list_skills()
Response:
{
"skills": [
{
"name": "tool-creation",
"description": "Create tools for the Matimo SDK...",
"category": "Tool Development",
"difficulty": "intermediate"
},
{
"name": "meta-tools-lifecycle",
"description": "Master the tool lifecycle workflow...",
"category": "Tool Lifecycle",
"difficulty": "advanced"
},
{
"name": "policy-validation",
"description": "Security rules and enforcement...",
"category": "Security & Policy",
"difficulty": "intermediate"
}
],
"summary": {
"total": 3,
"byCategory": {
"Tool Development": 1,
"Tool Lifecycle": 1,
"Security & Policy": 1
}
}
}
When to Use Skills
Agent: "I need to learn how to create a tool"
Agent: matimo_list_skills()
Agent: "I found 'tool-creation' skill. Let me apply it to my task."
Result: Agent generates better YAML with complete structure
Meta-Tool: matimo_get_tool_status
Gets detailed status of a specific tool.
Call: matimo_get_tool_status(toolName="weather_fetch", target_dir="/tmp/tools")
Response:
{
"name": "weather_fetch",
"status": "approved",
"details": {
"createdAt": "2026-03-17T10:30:00Z",
"approvedAt": "2026-03-17T10:31:00Z",
"approvedBy": "human-operator",
"integrityHash": "sha256:abc123...",
"tamperDetected": false,
"lastExecutedAt": "2026-03-17T10:45:00Z",
"executionCount": 5
}
}
Workflow: From Creation to Discovery
1. Agent creates tool
matimo_create_tool(name="weather_fetch", yaml, dir)
Result: โ
Created, status="draft"
2. Agent validates with doctor
matimo_doctor(yaml)
Result: โ
Valid, no policy errors
3. Human approves via review
matimo_review(name="weather_fetch", dir)
Result: โ
Approved, status="approved"
4. Agent reloads registry
matimo_reload_tools(dir)
Result: โ
Reloaded
5. Agent lists to verify
matimo_list_user_tools(dir)
Result: โ
"weather_fetch" appears with status="approved"
6. Agent uses the tool
matimo.execute("weather_fetch", {city: "New York"})
Result: โ
Tool executes, returns weather data
Key Principles
- โ
Status is authoritative โ How matimo_list_user_tools reports it is the truth
- โ
Risk level guides decisions โ Don't assume LOW-risk tools are safe; always understand what they do
- โ
Rejection is immutable โ If rejected by policy, it cannot be used (policy is frozen)
- โ
Approval lasts through session โ Approved tool stays approved until session ends
- โ
Metadata is useful โ createdAt, approvedBy, executionCount help understand tool history
References
- Tool creation: See
tool-creation skill
- Tool lifecycle: See
meta-tools-lifecycle skill
- Policy validation: See
policy-validation skill
Last Updated: March 2026
Status: Complete
Level: Beginner