Skip to content

Commit 8f27117

Browse files
authored
Merge pull request #407 from timescale/atovpeko/cli-mcp-build
Build: add Tiger CLI/MCP task, safety, and cookbook pages
2 parents 5747959 + 37ed32e commit 8f27117

27 files changed

Lines changed: 391 additions & 8 deletions

astro.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,16 @@ export default defineConfig({
536536
link: "/build",
537537
sidebar: [
538538
{ label: "Overview", link: "/build" },
539+
// --- Tiger CLI and MCP: manage Tiger Cloud and drive the DB with agents ---
540+
{
541+
label: "Build with Tiger CLI and MCP",
542+
collapsed: true,
543+
items: [
544+
{ label: "Common tasks", link: "/build/tiger-cli-mcp/common-tasks" },
545+
{ label: "Best practices for AI agents", link: "/build/tiger-cli-mcp/agent-best-practices" },
546+
{ label: "Cookbook", link: "/build/tiger-cli-mcp/cookbook" },
547+
],
548+
},
539549
// --- Quickstarts ---
540550
{
541551
label: "Quickstarts",

src/components/DoWithAi.astro

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
import Callout from "@components/Callout.astro";
3+
import * as C from "@constants";
4+
5+
const base = import.meta.env.BASE_URL.replace(/\/$/, "");
6+
---
7+
8+
<Callout variant="tip" title="Try this with your AI agent">
9+
<p>In {C.CLOUD_LONG}, <a href={`${base}/get-started/quickstart/mcp-cli`}>set up {C.MCP_LONG}</a> and ask your AI agent to do this for you. See <a href={`${base}/build/tiger-cli-mcp/common-tasks`}>example prompts</a> to get started, and <a href={`${base}/build/tiger-cli-mcp/agent-best-practices`}>best practices</a> to keep it safe.</p>
10+
</Callout>

src/content/docs/build/columnar-storage/setup-hypercore.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { Prerequisites } from "@components/Prerequisites";
1111
import HypercoreIntroShort from "../../../../partials/_hypercore-intro-short.mdx";
1212
import HCConversionOverview from "../../../../partials/_hypercore-conversion-overview.mdx";
1313
import HCPolicyWorkflow from "../../../../partials/_hypercore_policy_workflow.mdx";
14+
import DoWithAi from "@components/DoWithAi.astro";
1415

1516
<HypercoreIntroShort />
1617

@@ -27,6 +28,8 @@ your data.
2728
<ConnectionDetails />
2829
</Prerequisites>
2930

31+
<DoWithAi />
32+
3033
## Convert your data to the {C.COLUMNSTORE}
3134

3235
The compression ratio and query performance of data in the {C.COLUMNSTORE} is dependent on the order and structure of your

src/content/docs/build/continuous-aggregates/compression-on-continuous-aggregates.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ keywords: [continuous aggregates, compression]
88
import * as C from "@constants";
99
import { NumberedList, NumberedItem } from "@components/NumberedList";
1010
import SinceRelease from "@components/SinceRelease.astro";
11+
import DoWithAi from "@components/DoWithAi.astro";
1112

1213
<SinceRelease version="2.20.0" product="tsdb" />
1314

@@ -20,6 +21,8 @@ To save on storage costs, you use {C.HYPERCORE} to downsample historical data st
2021
in the {C.CAGG}, and [ordered by](/reference/timescaledb/continuous-aggregates/alter_materialized_view#arguments) the time column. [{C.RTAGG_CAP}](/learn/continuous-aggregates/real-time-aggregates)
2122
is disabled by default.
2223

24+
<DoWithAi />
25+
2326
## Configure {C.COLUMNSTORE} on {C.CAGG}s
2427

2528
For an [existing {C.CAGG}](/build/continuous-aggregates/create-a-continuous-aggregate):

src/content/docs/build/continuous-aggregates/create-a-continuous-aggregate.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import * as C from "@constants";
99
import { Callout } from "@stainless-api/docs/components";
1010
import { NumberedList, NumberedItem } from "@components/NumberedList";
1111
import SinceRelease from "@components/SinceRelease.astro";
12+
import DoWithAi from "@components/DoWithAi.astro";
1213

1314
A {C.CAGG} stores precomputed rollups so analytical queries avoid rescanning all raw rows. You create the materialized view first, then wire up refresh (policy or manual). You can build on a {C.HYPERTABLE} or stack another {C.CAGG}, and you can define more than one {C.CAGG} per source.
1415

@@ -26,6 +27,8 @@ example, if the original {C.HYPERTABLE}'s {C.CHUNK} time interval is 7 days, the
2627
{C.CAGG}s that are on top of it have a 70 day {C.CHUNK} time
2728
interval.
2829

30+
<DoWithAi />
31+
2932
## Create a {C.CAGG}
3033

3134
In this example, we are using a {C.HYPERTABLE} called `conditions`, and creating a

src/content/docs/build/continuous-aggregates/create-index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ products: [cloud, self_hosted]
55
keywords: [continuous aggregates, indexes]
66
---
77
import * as C from "@constants";
8+
import DoWithAi from "@components/DoWithAi.astro";
89

910
{C.CAGG_CAP}s create helpful composite indexes by default, but you can turn that off or add your own for specific filters. This page covers the automatic indexes, how to disable them, and how to manage custom ones.
1011

12+
<DoWithAi />
13+
1114
## Automatically created indexes
1215

1316
When you create a {C.CAGG}, an index is automatically created for

src/content/docs/build/continuous-aggregates/drop-data.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ keywords: [continuous aggregates, hypertables, delete]
77

88
import * as C from "@constants";
99
import { NumberedList, NumberedItem } from "@components/NumberedList";
10+
import DoWithAi from "@components/DoWithAi.astro";
1011

1112
You can remove a {C.CAGG} view, trim raw rows from the source {C.HYPERTABLE}, or rely on [refresh](/build/continuous-aggregates/refresh-policies) plus retention policies to keep coarse long-term aggregates while dropping detailed history.
1213

1314
Watch for retention rules that delete raw {C.HYPERTABLE} rows your {C.CAGG} still needs to rebuild or refresh correctly.
1415

16+
<DoWithAi />
17+
1518
## Drop a {C.CAGG} view
1619

1720
You can drop a {C.CAGG} view using the `DROP MATERIALIZED VIEW`

src/content/docs/build/continuous-aggregates/refresh-policies.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ import { Callout } from "@stainless-api/docs/components";
1010
import { NumberedList, NumberedItem } from "@components/NumberedList";
1111
import PrereqCloudSelf from "../../../../partials/_prereqs-cloud-and-self.mdx";
1212
import { Prerequisites } from "@components/Prerequisites";
13+
import DoWithAi from "@components/DoWithAi.astro";
1314

1415
Refresh policies control how and when a materialized {C.CAGG} catches up with its source {C.HYPERTABLE}. You can run refreshes on a schedule or trigger them manually when you need a one-off catch-up.
1516

1617
<Prerequisites context="procedure">
1718
<PrereqCloudSelf />
1819
</Prerequisites>
1920

21+
<DoWithAi />
22+
2023
## Change the refresh policy
2124

2225
{C.CAGG_CAP}s require a policy for automatic refreshing. You can adjust

src/content/docs/build/data-management/create-and-manage-jobs.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ import * as C from "@constants";
99
import { NumberedList, NumberedItem } from "@components/NumberedList";
1010
import PrereqCloudOrSelf from "../../../../partials/_prereqs-cloud-or-self.mdx";
1111
import { Prerequisites } from "@components/Prerequisites";
12+
import DoWithAi from "@components/DoWithAi.astro";
1213

1314
{C.JOB_CAP}s are custom functions or procedures that {C.TIMESCALE_DB} runs on your schedule. The sections below show how to register one, test it, and change or remove it safely.
1415

1516
<Prerequisites context="procedure">
1617
<PrereqCloudOrSelf />
1718
</Prerequisites>
1819

20+
<DoWithAi />
21+
1922
## Create a {C.JOB}
2023

2124
To create a {C.JOB}, create a [{C.PG} function](https://www.postgresql.org/docs/current/xfunc.html) or [procedure](https://www.postgresql.org/docs/current/xproc.html) that you want your database to execute, then set it up to run on a schedule.

src/content/docs/build/data-management/data-retention/create-a-retention-policy.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ keywords: [data retention, policies]
88
import * as C from "@constants";
99
import { Callout } from "@stainless-api/docs/components";
1010
import { NumberedList, NumberedItem } from "@components/NumberedList";
11+
import DoWithAi from "@components/DoWithAi.astro";
1112

1213
Retention policies drop entire {C.CHUNK}s once their time range falls outside your window, which is cheaper than deleting millions of rows one by one. {C.TIMESCALE_DB} schedules a background {C.JOB} to apply the policy for you.
1314

15+
<DoWithAi />
16+
1417
## Add a data retention policy
1518

1619
Add a data retention policy by using the

0 commit comments

Comments
 (0)