create-card
Add a new card to a Trello list by specifying the card name, description, and target list ID. This tool helps organize tasks and projects within Trello boards.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| description | No | ||
| listId | Yes |
Implementation Reference
- src/tools/card-tool-handlers.ts:29-32 (handler)MCP tool handler for 'create_card' that retrieves CardService instance and calls createCard with the provided arguments.create_card: async (args: any) => { const cardService = ServiceFactory.getInstance().getCardService(); return cardService.createCard(args); },
- src/tools/card-tools.ts:32-102 (registration)Registration of the 'create_card' tool in the cardTools array, including name, description, and comprehensive input schema matching Trello API.{ name: "create_card", description: "Create a new card on a list. Use this tool when you need to add a new card to a list.", inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the card" }, idList: { type: "string", description: "ID of the list the card should belong to" }, desc: { type: "string", description: "Description of the card" }, pos: { type: ["string", "number"], description: "Position of the card (top, bottom, or a positive number)" }, due: { type: ["string", "null"], description: "Due date for the card (ISO-8601 format, e.g., 2023-12-31T12:00:00Z)" }, start: { type: ["string", "null"], description: "Start date for the card (ISO-8601 format, e.g., 2023-12-31T12:00:00Z)" }, dueComplete: { type: "boolean", description: "Whether the due date is complete" }, idMembers: { type: "array", items: { type: "string" }, description: "IDs of members to assign to the card" }, idLabels: { type: "array", items: { type: "string" }, description: "IDs of labels to add to the card" }, urlSource: { type: "string", description: "URL to attach to the card" }, idCardSource: { type: "string", description: "ID of a card to copy from" }, keepFromSource: { type: "string", description: "What to copy from the source card (all or a comma-separated list of: attachments, checklists, comments, due, labels, members, stickers)" }, address: { type: "string", description: "Address for the card" }, locationName: { type: "string", description: "Location name for the card" }, coordinates: { type: "string", description: "Coordinates for the card (latitude,longitude)" } }, required: ["name", "idList"] }
- src/services/card-service.ts:48-50 (helper)Core helper method in CardService that performs the actual Trello API POST request to create a new card.async createCard(data: CreateCardData): Promise<TrelloCard> { return this.trelloService.post<TrelloCard>('/cards', data); }
- src/types/trello-types.ts:298-329 (schema)TypeScript interface defining the shape of CreateCardData used for input validation and typing in createCard method.export interface CreateCardData { /** Display name (required) */ name: string; /** ID of the list (required) */ idList: string; /** Detailed description (optional) */ desc?: string; /** Position of the card (optional) */ pos?: number | 'top' | 'bottom'; /** Due date (optional) */ due?: string | null; /** Start date (optional) */ start?: string | null; /** Whether the due date is complete (optional) */ dueComplete?: boolean; /** IDs of the members (optional) */ idMembers?: string[]; /** IDs of the labels (optional) */ idLabels?: string[]; /** URL source for attachment (optional) */ urlSource?: string; /** ID of the card to copy from (optional) */ idCardSource?: string; /** What to keep from source card (optional) */ keepFromSource?: 'all' | 'attachments' | 'checklists' | 'comments' | 'due' | 'labels' | 'members' | 'stickers'; /** Address for card (optional) */ address?: string; /** Location name for card (optional) */ locationName?: string; /** Coordinates for card (optional) */ coordinates?: string; }