---
title: "POST /api/agents/{agentId}/tools/{toolId}/execute"
method: POST
path: "/api/agents/{agentId}/tools/{toolId}/execute"
tags: ["agents"]
---

# POST /api/agents/{agentId}/tools/{toolId}/execute

`POST /api/agents/{agentId}/tools/{toolId}/execute`

Execute a tool through an agent

## Path parameters

- `agentId` string, required
- `toolId` string, required

## Request body

- object
  - `args` object, required
  - `threadId` string
  - `resourceid` string

## Response `200`

Tool execution result

## Other responses

- `404` — Tool or agent not found

---

[API](https://skmtc.net/mastra-ai/apis/mastra-api.md) · [All operations](https://skmtc.net/mastra-ai/apis/mastra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mastra-ai/mastra-api/versions/c1a4e2745194/schema)
