Connector builder

From andreaswasita/copilot-cowork-dojo · View interactive version

Connector builder is an AI agent skill from the GitHub repository andreaswasita/copilot-cowork-dojo. Phased workflow for building a high-quality connector or MCP server that lets Copilot act on an external system (an internal API, a line-of-business app, a SaaS tool). Use when planning, designing, or reviewing custom connector tools for Copilot or M365 agents. Triggers: "build a connector", "MCP se

How to use this skill

Skill file

Connector Builder

A connector is judged by one thing: can Copilot use it to finish real work? Design the tools for the agent's success, not for API completeness on paper.


Quick Reference

| Phase | Focus | Output |

|---|---|---|

| 1. Research & plan | Understand the system and modern tool design | Endpoint list, tool plan |

| 2. Implement | Build tools with clear schemas and errors | Working connector |

| 3. Review & test | Quality pass + live exercise | Verified tools |

| 4. Evaluate | Realistic task questions the agent must solve | 10 eval questions |

When to Use

How to Use

Phase 1 - Research and plan

  1. Study the target system's API: key endpoints, auth, data models, rate limits, pagination.
  2. Decide coverage vs workflow tools. Comprehensive endpoint coverage gives the agent flexibility to compose; workflow tools bundle a common multi-step task. When unsure, favor coverage.
  3. Plan tool names with consistent, action-oriented prefixes (for example crm_create_lead, crm_list_accounts) so the agent finds the right tool fast.
  4. Review the MCP specification and your SDK (TypeScript SDK is the well-supported default; Python works too) before writing code.

Phase 2 - Implement

  1. Build shared infrastructure once: authenticated API client, error helpers, response formatting, pagination.
  2. For each tool define a typed input schema (Zod or Pydantic) with constraints, descriptions, and examples in field descriptions. Define an output schema for structured data where possible.
  3. Write concise tool descriptions and actionable error messages - every error tells the agent what to do next, not just what failed.
  4. Set tool annotations honestly: read-only, destructive, idempotent, open-world. These guide when the agent (and the human approving it) trusts the call.

Phase 3 - Review and test

  1. Review for DRY code, consistent error handling, full type coverage, and clear descriptions.
  2. Build and smoke-test with the MCP Inspector. Exercise each tool with a real call and confirm pagination and errors behave.

Phase 4 - Evaluate

  1. Write 10 evaluation questions the agent must answer using only the connector. Make each independent, read-only, complex (multiple tool calls), realistic, verifiable, and stable.
  2. Solve each yourself to confirm the answer. Run the agent against them and fix the tools wherever it struggles.

Examples

| Don't: API-shaped | Do: Agent-shaped |

|---|---|

| getData, doThing - vague names | orders_list, orders_get, orders_refund - prefixed, action-oriented |

| Error: "Request failed" | Error: "No order with that ID; list orders first to get a valid ID" |

| One mega-tool with 20 optional params | Focused tools with typed schemas and clear descriptions |

| Ship after it compiles | Ship after 10 realistic eval questions pass |

Critical Rules

Common Pitfalls

Anti-Patterns

Verify Before Shipping the Connector

Related

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.