# Tools & Capabilities

Overview of built-in tools, platform MCP tools, and external integrations available to TeamDay agents.

# Tools & Capabilities

TeamDay agents have three categories of tools: built-in Claude tools, platform MCP tools, and external MCP integrations. Tools are universal — the same set is available whether the agent is chatting at org level or in a space.

---

## Built-in Claude Tools

Every agent gets these tools automatically. They operate on the Space's filesystem (sandbox directory).

### File Operations

| Tool | Description |
|------|-------------|
| **Read** | Read file contents. Supports text files, images, PDFs, and Jupyter notebooks. |
| **Write** | Create or overwrite files in the workspace. |
| **Edit** | Make targeted string replacements in existing files. |
| **Glob** | Find files by pattern (e.g., `**/*.ts`, `src/**/*.vue`). |
| **Grep** | Search file contents with regex. Supports context lines and file type filters. |

### Execution

| Tool | Description |
|------|-------------|
| **Bash** | Run shell commands in the workspace. Has a 2-minute default timeout. |

### Web

| Tool | Description |
|------|-------------|
| **WebSearch** | Search the web and return results with links. |
| **WebFetch** | Fetch a URL and process its content. Converts HTML to markdown. |

### Agent Coordination

| Tool | Description |
|------|-------------|
| **Task** | Launch specialized subagents for complex, multi-step tasks. |
| **SendMessage** | Communicate between agents in a team. |
| **Skill** | Invoke skills as slash commands during a conversation. |

### Restricting Tools

These tools are always available unless explicitly restricted. There are two ways to limit tools:

**Allowlist** — only these tools are available:
```json
{
  "allowedTools": ["Read", "Write", "Glob", "Grep"]
}
```

**Blocklist** — disable specific tools while keeping the rest:
```json
{
  "disabledTools": ["Bash", "WebSearch"]
}
```

Both `allowedTools` and `disabledTools` can be set on agents and on spaces.

---

## Platform MCP Tools

TeamDay provides three built-in MCP tools that give agents control over the platform itself.

### MediaGeneration

Generate images and videos with AI.

```
mcp__teamday-media__MediaGeneration
```

| Action | Description |
|--------|-------------|
| `generateImage` | Text-to-image (Flux 2, Grok models) |
| `generateAvatar` | Square profile image |
| `imageToVideo` | Animate images into video clips (Kling, Wan, Grok) |
| `checkBalance` | Check credit balance before generating |

**Image models:** `flux-2-flex` (4c, default), `grok-imagine-image` (3c), `grok-imagine-image-pro` (11c), `gpt-image-1` (6c)
**Video models:** `kling` (53c/5s), `wan` (30c/5s), `grok` (38c/5s)

See [Media Generation](https://docs.teamday.ai/guides/platform-tools/media-generation) for full docs.

### TeamdayAdmin

Manage platform resources programmatically — spaces, agents, MCPs, missions, skills, and secrets.

```
mcp__teamday-admin__TeamdayAdmin
```

Key actions: `createSpace`, `updateSpace`, `createAgent`, `createMission`, `storeSecrets`, `discoverSpace`, `browseSkillsRegistry`, `browseMcpRegistry`

See [TeamDay Admin](https://docs.teamday.ai/guides/platform-tools/teamday-admin) for full docs.

### UICommand

Control the chat interface from agent code.

```
mcp__teamday-ui__UICommand
```

Key actions: `listAgents`, `switchAgent`, `showNotification`, `askConfirmation`, `askQuestion`, `openModal`, `openPanel`, `navigate`

See [UI Commands](https://docs.teamday.ai/guides/platform-tools/ui-commands) for full docs.

---

## External MCP Integrations

MCP (Model Context Protocol) servers connect agents to external tools and services. MCPs can be attached to an agent (via `mcpInstanceIds`) or installed on a space to make them available to all agents in that workspace.

### Installing MCPs

**Via CLI:**
```bash
teamday spaces add-mcp <space-id> google-analytics
```

**Via API:**
```bash
curl -X PATCH "https://cc.teamday.ai/api/v1/spaces/<space-id>" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"addMcps": ["google-analytics-id"]}'
```

**Via TeamdayAdmin tool (in-chat):**
```json
{
  "action": "browseMcpRegistry"
}
```

### Creating MCP Instances

Create a custom MCP configuration for your organization:

**Via CLI:**
```bash
teamday mcps create \
  --type google-search \
  --name "My Google Search" \
  --credentials '{"API_KEY": {"value": "abc123", "isSecret": true}}'
```

**Via API:**
```bash
curl -X POST "https://cc.teamday.ai/api/v1/mcps" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "google-analytics",
    "type": "stdio",
    "command": "npx",
    "args": ["-y", "@anthropic-ai/mcp-google-analytics"],
    "env": {"GA_PROPERTY_ID": "12345678"}
  }'
```

### How MCP Tools Appear

When an MCP server is installed, its tools become available with the naming pattern:

```
mcp__{server-name}__{tool-name}
```

For example, if you install an Ahrefs MCP server named `ahrefs`, the agent can use tools like:
- `mcp__ahrefs__site-explorer-domain-rating`
- `mcp__ahrefs__keywords-explorer-overview`

### OAuth MCPs

Some MCPs require OAuth authentication (e.g., Google Analytics, Google Search Console). These use a browser-based OAuth flow:

1. Install the MCP on a Space
2. The UI prompts you to connect your account
3. Tokens are stored securely and refreshed automatically

If a token expires during a conversation, the agent can request re-authentication:

```json
{
  "action": "requestReauth",
  "target": "google-analytics"
}
```

See [MCP Servers](https://docs.teamday.ai/guides/mcp-servers/what-are-mcp-servers) for more details.

---

## File-Based Configuration

In addition to API-managed tools, agents discover tools from the Space filesystem:

### .mcp.json

Place an `.mcp.json` file in the Space root to configure MCP servers:

```json
{
  "mcpServers": {
    "my-custom-tool": {
      "command": "node",
      "args": ["tools/my-tool/index.js"],
      "env": {
        "API_KEY": "${API_KEY}"
      }
    }
  }
}
```

Environment variable references (`${VAR}`) are resolved from the Space's secrets.

### .claude/agents/

Agent markdown files in `.claude/agents/` are discovered as subagents:

```markdown
---
name: Data Analyst
role: SQL and reporting
tools: [Read, Write, Bash]
---
You are a data analyst who writes SQL queries and generates reports.
```

### .claude/skills/

Skill definitions in `.claude/skills/{name}/SKILL.md` extend agent capabilities:

```
.claude/skills/report-generator/
  SKILL.md
  scripts/
    generate.ts
```

See [Skills](https://docs.teamday.ai/guides/skills) for the full skill format.

---

## Next Steps

- [MCP Servers](https://docs.teamday.ai/guides/mcp-servers/what-are-mcp-servers) — Deep dive into MCP integrations
- [Skills](https://docs.teamday.ai/guides/skills) — Build reusable agent capabilities
- [Platform Tools: Media Generation](https://docs.teamday.ai/guides/platform-tools/media-generation) — Image and video generation
- [Platform Tools: TeamDay Admin](https://docs.teamday.ai/guides/platform-tools/teamday-admin) — Platform resource management
- [Platform Tools: UI Commands](https://docs.teamday.ai/guides/platform-tools/ui-commands) — Chat interface control
