Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .changeset/cli-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
"@scope3/agentic-client": minor
---

Add dynamic CLI tool for Scope3 Agentic API with automatic command generation

The CLI now dynamically discovers available API operations from the MCP server, ensuring commands are always up-to-date with the latest API capabilities:

- **Zero maintenance**: Commands auto-generate from MCP server's tool list
- **Always in sync**: CLI automatically reflects API changes without code updates
- **80+ commands**: Covers all resources (agents, campaigns, creatives, tactics, media buys, etc.)
- **Smart caching**: 24-hour tool cache with fallback for offline use
- **Type-safe parameters**: Automatic validation and parsing from server schemas
- **Multiple output formats**: JSON and formatted table views
- **Persistent configuration**: Save API keys and base URLs locally

Usage:
```bash
# Configure once
scope3 config set apiKey YOUR_KEY

# Commands are dynamically discovered
scope3 list-tools # See all available operations
scope3 brand-agent list
scope3 campaign create --prompt "..." --brandAgentId 123
scope3 media-buy execute --mediaBuyId "buy_123"
```

Benefits over static CLI:
- API adds new endpoint → CLI instantly supports it (after cache refresh)
- API changes parameter → CLI automatically updates validation
- No manual maintenance of command definitions required
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ TypeScript client for the Scope3 Agentic API with AdCP webhook support.
- 🪝 Optional webhook server for AdCP events
- ✨ Clean, intuitive API design
- 🧪 Comprehensive test coverage
- 💻 **CLI tool** for all API resources (80+ commands)

**Architecture:** This client uses the official `@modelcontextprotocol/sdk` to connect to the Scope3 MCP server at `https://api.agentic.scope3.com/mcp` via Streamable HTTP transport. This uses HTTP POST for sending messages and HTTP GET with Server-Sent Events for receiving messages, providing reliable bidirectional communication with automatic reconnection support.

Expand Down Expand Up @@ -43,7 +44,29 @@ const campaign = await client.campaigns.create({
});
```

## Configuration
## CLI Usage

The CLI dynamically discovers available commands from the API server, ensuring it's always up-to-date:

```bash
# Install globally
npm install -g @scope3/agentic-client

# Configure authentication
scope3 config set apiKey your_api_key_here

# Discover available commands (80+ auto-generated)
scope3 list-tools

# Examples
scope3 brand-agent list
scope3 campaign create --prompt "Q1 2024 Spring Campaign" --brandAgentId 123
scope3 media-buy execute --mediaBuyId "buy_123"
```

**Dynamic Updates:** Commands automatically stay in sync with API changes. No manual updates needed!

## SDK Configuration

```typescript
const client = new Scope3AgenticClient({
Expand Down
201 changes: 0 additions & 201 deletions SIMPLE_MEDIA_AGENT.md

This file was deleted.

File renamed without changes.
Loading