Send Dynamic Card with NLP
send_dynamic_cardCreate and send Google Chat cards with precise structure using DSL notation. Define sections, text, buttons, grids, or carousels for clear visual communication.
Instructions
Send cards to Google Chat using DSL notation for precise structure control. REQUIRED: Use DSL symbols in card_description to define card structure. Common patterns: §[δ] = text card, §[δ, Ƀ[ᵬ×2]] = text + 2 buttons, §[ℊ[ǵ×4]] = grid with 4 items. DSL structure using symbols. Examples: '§[δ, Ƀ[ᵬ×2]]' = Section + text + 2 buttons, 'C_5[C_6×3]' = Carousel with 3 cards. §=Section, δ=DecoratedText, Ƀ=ButtonList, ᵬ=Button, ℊ=Grid, ǵ=GridItem, C_5=Carousel, C_6=CarouselCard, ŋ=NestedWidget. Read skill://gchat-cards/ for full reference.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| space_id | No | Chat space ID (e.g., 'spaces/AAAA1234'). Optional when using webhook (most common). Required only for API delivery. | |
| thread_key | No | Thread key for replies | |
| card_params | No | Explicit overrides: title, subtitle, text, buttons, images. Supports DSL symbol keys (e.g. δ for items, ᵬ for buttons) with optional _shared/_items merging: {"δ": {"_shared": {...}, "_items": [...]}}. The 'text' field supports Jinja filters ({{ 'text' | success_text }}) and raw HTML (<font color="#hex">text</font>). Message-level fields: 'message_text' (plain text above card), 'fallback_text' (notification text), 'accessory_widgets' (buttons outside card: [{buttonList: {buttons: [{text, url}]}}]). | |
| webhook_url | No | Webhook URL. Defaults to MCP_CHAT_WEBHOOK env var if not provided. | |
| card_description | Yes | IMPORTANT: Start with DSL symbols to define card structure. Without DSL, cards render as simple text only. DSL Examples: §[δ] = Section with DecoratedText, §[δ, Ƀ[ᵬ×2]] = text + 2 buttons, §[δ×3] = 3 text items, §[ℊ[ǵ×4]] = grid with 4 items. Provide content in card_params: title, subtitle, text, buttons=[{text, url}]. Jinja styling in text: {{ 'Online' | success_text }}, {{ text | color('#hex') }}. DSL structure using symbols. Examples: '§[δ, Ƀ[ᵬ×2]]' = Section + text + 2 buttons, 'C_5[C_6×3]' = Carousel with 3 cards. §=Section, δ=DecoratedText, Ƀ=ButtonList, ᵬ=Button, ℊ=Grid, ǵ=GridItem, C_5=Carousel, C_6=CarouselCard, ŋ=NestedWidget. Read skill://gchat-cards/ for full reference. | |
| draft_variations | No | When true, generate 3 draft card variations (Conservative, Enhanced, Creative) and send them to the Chat space in a shared thread for comparison instead of sending the original card. Uses a tool-equipped sampling agent for informed design. | |
| user_google_email | No | Use 'me' or 'myself' for auto-resolution to authenticated user, or provide specific email address. If None, uses current authenticated user (auto-injected by middleware). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error message if the operation failed | |
| message | Yes | Human-readable status message describing the result | |
| spaceId | No | Target Google Chat space ID (optional for webhook delivery) | |
| success | Yes | Whether the card was successfully created and sent | |
| cardType | Yes | Type of card component used: 'class', 'function', 'simple_fallback', etc. | |
| messageId | No | Google Chat message ID (format: spaces/{space}/messages/{message}) | |
| partsSent | No | Number of card parts sent (>1 if payload was auto-split due to size) | |
| threadKey | No | Thread key if message was sent as a thread reply | |
| userEmail | Yes | Google email address used for authentication | |
| createTime | No | Timestamp when the message was created (from API response) | |
| httpStatus | No | HTTP status code from webhook delivery (200=success, 429=rate limited) | |
| webhookUrl | No | Webhook URL used for delivery (if webhook method) | |
| dslDetected | No | DSL structure detected in card_description (if any) | |
| inputMapping | No | How card_params inputs were distributed to components | |
| suggestedDsl | No | Suggested DSL when params provided but no DSL in description | |
| componentInfo | No | Details about the ModuleWrapper component search and matching | |
| dslValidation | No | DSL validation results if DSL detected in description | |
| nlpExtraction | No | Details about what was extracted from the natural language card_description | |
| alternativeDsl | No | Alternative valid DSL patterns using similar components. Use these for inspiration on different card structures. | |
| deliveryMethod | Yes | How the card was delivered: 'api' for authenticated Chat API, 'webhook' for webhook URL | |
| expectedParams | No | What card_params this DSL structure accepts | |
| splitThreadKey | No | Thread key linking multi-part card messages together | |
| cardDescription | Yes | The original card_description input that was processed | |
| validationIssues | No | List of validation issues if validation failed | |
| validationPassed | No | Whether pre-send card content validation passed (prevents blank cards) | |
| renderedDslNotation | No | DSL symbol notation representing the rendered card structure. Use this to learn the DSL syntax for future calls. Format: §[components] where § is Section, δ is DecoratedText, Ƀ is ButtonList, etc. | |
| jinjaTemplateApplied | No | Whether Jinja2 template styling was applied to card content |