{"id":15975,"plugin_id":"plugin_asdk_app_6a5f9d9c29d08191a0d20fa7681578b1","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:12:31.314Z","digest":"71bbac5946b6285521cd7dcbcf632400b24788a6e8b0f4c48657b986e20f8b34","against":null,"payload":{"description":"Use when the user has connected DataLabs' \"Revenue Analytics\" MCP connector (mcp.datalabs.store) - either as a custom connector exposing tools like execute_query/get_tables_list/get_full_database_schema/get_semantic_metadata/save_query/list_saved_queries, or as a Company Knowledge source exposing search/fetch - and asks analytical questions about their HubSpot data (deals, pipeline, contacts, companies, engagements, email campaigns, workflows). Also use for schema exploration, SQL generation/debugging against this connector, or reproducing known revenue-ops analyses (weighted pipeline, forecast calibration, stuck deals, engagement-vs-win-rate, revenue concentration, email attribution).","included_files":[{"relative_path":"reference/analytics-playbook.md","size_in_bytes":14878},{"relative_path":"reference/schema-reference.md","size_in_bytes":7718},{"relative_path":"reference/sql-dialect.md","size_in_bytes":4778}],"name":"revenue-analytics","skill_md_contents":"---\nname: revenue-analytics\ndescription: Use when the user has connected DataLabs' \"Revenue Analytics\" MCP connector (mcp.datalabs.store) - either as a custom connector exposing tools like execute_query/get_tables_list/get_full_database_schema/get_semantic_metadata/save_query/list_saved_queries, or as a Company Knowledge source exposing search/fetch - and asks analytical questions about their HubSpot data (deals, pipeline, contacts, companies, engagements, email campaigns, workflows). Also use for schema exploration, SQL generation/debugging against this connector, or reproducing known revenue-ops analyses (weighted pipeline, forecast calibration, stuck deals, engagement-vs-win-rate, revenue concentration, email attribution).\nversion: 1.0.0\ncompatible_agents: [chatgpt]\n---\n\n# Revenue Analytics\n\nThis connector (\"Revenue Analytics\") mirrors the user's HubSpot portal into a real relational SQL Server database and exposes it over MCP. The entire value proposition is running **joins, CTEs, HAVING clauses, and window functions** that HubSpot's standard reporting system has no path for - single-object reports, a 2-object cap on native cross-object dot notation, true multi-object custom reporting gated to Enterprise-tier Data Hub (see `reference/analytics-playbook.md` for the specific limit each recipe falls outside of). Lean into that - don't limit yourself to what a single-object HubSpot report could already do. Never cite a live Breeze (or other native-AI) chat response as proof of a limitation - HubSpot has tuned Breeze to approximate rather than refuse, so it will attempt an answer instead of erroring out; the reporting system's own documented, tier-gated structure is the stable claim, not a chat transcript.\n\n## Two ways this connector shows up\n\n- **As a custom connector / MCP app** - the full tool surface below is directly callable, `search`/`fetch` included. Prefer this path when available; it's the richer surface, and `search` is the recommended first move on it too (see Golden workflow below), not just a Company Knowledge fallback.\n- **As a Company Knowledge source (deep research)** - only `search(query)` and `fetch(id)` are exposed, matching that surface's contract; same semantics as on the custom-connector path, just without the rest of the tool surface behind them. This path can't run arbitrary SQL - if the user needs a specific custom analysis rather than existing documented content, tell them to add the full custom connector instead.\n\n## Tool map (custom-connector path)\n\n| Group | Tools | Use for |\n|---|---|---|\n| Semantic discovery | `search`, `fetch` | Vectorized search over everything on file for this customer - every table, business-terminology entry, and saved query - in one call; the fastest starting point when you don't already know exact names. `fetch(id)` pulls a hit's full detail. Also the only tools exposed on the Company Knowledge surface. |\n| Schema discovery | `get_tables_list`, `get_database_schema_subtree`, `get_full_database_schema`, `get_object_relationships`, `get_data_statistics` | Going deeper once `search` has pointed you at a table, or confirming exact join cardinality/full DDL |\n| Business semantics | `get_semantic_metadata`, `set_semantic_metadata` | Established terminology, categorical-value meanings; contribute back what you learn |\n| Query | `execute_query` | Read-only T-SQL, with `parameters`, `maxRows`, `timeoutSec`, `explainPlan` |\n| Reuse | `save_query`, `list_saved_queries`, `execute_saved_query` | Persisting and re-running queries the user will likely ask for again |\n\n## Golden workflow (custom-connector path)\n\n1. **Start with `search`.** `search(query)` runs a semantic match against every table, business-terminology entry, and saved query on file for this customer in a single call - it's the most effective way to locate the right starting point, especially before you know exact table/column names or whether this question has already been answered. Use `fetch(id)` on a promising hit to pull its full detail (full schema for a table hit, full definition for a saved-query hit, full text for a metadata hit).\n2. **Prefer an exact saved query when one exists.** If `search` surfaces a saved query matching the user's question (or `list_saved_queries` does), run it with `execute_saved_query` instead of regenerating SQL.\n3. **Go deeper on structure from whatever `search` surfaced.** `get_database_schema_subtree(table)` for full column detail, `get_object_relationships` to confirm join cardinality. Read `reference/schema-reference.md` for the commonly-present object map, but always verify against the live schema - portal schemas vary. Fall back to `get_tables_list`/`get_full_database_schema` only if `search` didn't return a usable lead.\n4. **Check semantics.** `get_semantic_metadata` for any categorical column or business term you're not certain about before filtering on it - `search` may already have surfaced the relevant metadata entry.\n5. **Check scale before writing an expensive query.** `get_data_statistics(table)` for row counts, especially for anything touching `EmailCampaignEvent` or other high-cardinality tables.\n6. **Draft SQL following `reference/sql-dialect.md`** - this file has the specific gotchas (string-typed booleans, decimal overflow on `AVG`, null-safe ratios) that make the difference between a query that runs and one that silently returns the wrong thing.\n7. **For an expensive-looking query, run `explainPlan: true` first**, then run for real with an explicit `maxRows`/`timeoutSec`.\n8. **Explain the finding, not just the numbers** - see `reference/analytics-playbook.md` for the \"aha\" framing and honesty caveats (association vs. causation, small-sample warnings, honest null results) that make these analyses credible rather than just a table dump.\n9. **Offer to `save_query`** anything the user is likely to want again.\n\n## Hard constraints\n\n- **Read-only, enforced by the database itself** - INSERT/UPDATE/DELETE/DDL are rejected server-side. Don't try to work around this; there's no path around it by design.\n- **Never invent a table/column name.** Confirm it via a schema tool this session before referencing it in SQL.\n- **Don't present an empty or near-empty result as a real finding** - commerce objects (`Subscription`, `Payment`, `Discount`, `LineItem`) are sparse on many portals; check row counts first.\n\n## Reference files (read before non-trivial queries)\n\n- `reference/schema-reference.md` - the commonly-present object map (Deal/pipeline/stage-history, engagements, email, workflows)\n- `reference/sql-dialect.md` - SQL Server T-SQL gotchas specific to this synced schema\n- `reference/analytics-playbook.md` - proven recipes for the questions this product is built to answer\n\n## Connecting (if not already connected)\n\nThe user adds this connector from their DataLabs.store customer portal (\"Connection Info\" panel), authenticating via OAuth 2.0 through `auth.datalabs.store`, reached at `https://mcp.datalabs.store/mcp`. This skill assumes the connection already exists - it's about using the tools well once they're available, not about setting up the connector itself.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}