# Tishtar — Extended Technical Reference for AI Agents (`llms-full.txt`) ## Overview Tishtar (`https://tishtar.app`, web app at `https://app.tishtar.app`) is an edge-native cloud platform for **scheduled, stateful AI routines**. Unlike stateless chat sessions that stop when a user closes a tab or laptop, Tishtar routines run autonomously on Cloudflare Workers and Durable Objects on cron/preset/webhook/chained schedules, retain rolling delta memory across executions, and deliver outputs directly to the user's preferred destinations. ## Remote MCP Server Specification - **Canonical Endpoint:** `https://mcp.tishtar.app/mcp` - **Legacy Alias:** `https://api.tishtar.app/api/v1/mcp` - **MCP Server Card (Discovery):** `https://mcp.tishtar.app/.well-known/mcp/server-card.json` (alias: `https://tishtar.app/.well-known/mcp/server-card.json`, Registry manifest: `https://tishtar.app/server.json`) - **Transport:** MCP Streamable HTTP (`protocolVersion`: `2025-06-18`, `2025-03-26`, `2024-11-05`) - **Authorization:** - **Recommended (Interactive AI Clients):** MCP OAuth 2.1 (`/.well-known/oauth-protected-resource`, `/.well-known/oauth-authorization-server`, `/oauth/register` DCR, `/oauth/authorize` PKCE S256, `/oauth/token`, `/oauth/revoke`). - **Headless / CLI Fallback:** `Authorization: Bearer ` header (query-string tokens like `?token=` are rejected with `401`). ## Quick Client Configuration ### Claude Code (CLI) ```bash claude mcp add --transport http tishtar https://mcp.tishtar.app/mcp ``` ### Claude.ai (Web / Desktop / Mobile) & ChatGPT Connectors Add a custom remote MCP connector pointing to `https://mcp.tishtar.app/mcp` with OAuth enabled and sign in with Tishtar. ### Cursor (`.cursor/mcp.json`) ```json { "mcpServers": { "tishtar": { "url": "https://mcp.tishtar.app/mcp" } } } ``` ### VS Code (`.vscode/mcp.json`) ```json { "servers": { "tishtar": { "type": "http", "url": "https://mcp.tishtar.app/mcp" } } } ``` ### Windsurf (`~/.codeium/windsurf/mcp_config.json`) ```json { "mcpServers": { "tishtar": { "serverUrl": "https://mcp.tishtar.app/mcp" } } } ``` ## Complete MCP Tool Catalog (v2.3 — 35 Tools) Every tool publishes formal `outputSchema` JSON Schemas, complete MCP behavior annotations (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`), and returns structured `remediation` hints on errors. Key status, preview, and inbox tools also bind interactive MCP Apps widgets via `_meta.ui.resourceUri`. | Tool | Required Scope | Purpose | | :--- | :---: | :--- | | `get_account_health` | `mcp:read` | Single-call 360-degree diagnostic of Drop runway, monthly cap, failing routines, unhealthy connections, pending approvals, prioritized recommendations, and zero-LLM `optimizationHints`. | | `get_inbox_briefing` | `mcp:read` | Cross-routine executive digest aggregating highlights, pending approvals, failures, and diff-skipped savings over the last 1–168 hours (0 Drops). | | `search_run_archive` | `mcp:read` | Zero-Drop full-text search across recent and archived routine outputs with matched excerpts and canonical `outcomeCode`. | | `list_routines` | `mcp:read` | List user's routines with schedule, active flag, model tier, tools, skills, and estimated Drops per run. | | `get_routine` | `mcp:read` | Fetch full config, pipeline steps, delivery channels, budget cap, version history, dry-run contract, and latest output for one routine. | | `list_routine_versions` | `mcp:read` | List saved version snapshots and optionally inspect a specific version's full prompt/config before reverting. | | `get_routine_memory` | `mcp:read` | Inspect a routine's anti-repetition `coveredTopics`, Diff Memory snapshots, diff hash state, and shared channel memory. | | `update_routine_memory` | `mcp:write` | Add, remove, or replace `coveredTopics`, reset Diff Memory snapshots/hashes, or clear shared channel memory. | | `rate_routine_run` | `mcp:write` | Record thumbs-up (`up`) or thumbs-down (`down`) feedback with structured `reason` (`hallucinated`, `repetitive`, `off_topic`, `poor_formatting`) to automatically steer future autopilot runs (0 Drops). | | `create_routine` | `mcp:write` (`mcp:run` if live) | Create and arm a scheduled/manual/webhook/chained routine (defaults to Tishtar Inbox when no external channel is specified; returns 1-click `telegramConnectUrl` when Telegram is requested while unlinked); supports `routineSubscriptions` (own or public Published Streams), opt-in `decisionGate` (`condition`, `verdictLabels`, `onUncertain`), `schedule.triggerOnVerdicts`, `budgetConfig`, `runImmediately: true`, and `dryRun: true`. | | `clone_template` | `mcp:write` | Install a curated/public marketplace template OR a 1-click multi-routine Actor-Stream Starter Pack (`pack_trend_newsroom`, `pack_market_watchdog`, `pack_research_desk`) in one call with custom title, schedule, timezone, deliveryChannels, slots, or paused overrides. | | `update_routine` | `mcp:write` (`mcp:dry_run` if `validateOnly`) | Partial-patch prompt, schedule, tools, skills, modelTier, `budgetConfig`, or deliveryChannels; returns `changesDiff` & `costDelta` and supports `validateOnly: true`. | | `toggle_routine` | `mcp:write` | Pause or resume a routine's scheduled alarm without modifying its configuration. | | `revert_routine` | `mcp:write` | Roll back a routine to its previous working snapshot. | | `delete_routine` | `mcp:write` | Permanently delete a routine and cancel its scheduled alarm. | | `run_routine` | `mcp:dry_run` (`dryRun: true`) / `mcp:run` (live) | Execute a routine live or in private `dryRun: true` preview (supports per-run `topic` override and SSE `notifications/progress` streaming). Returns `outputText`, `toolTrace`, `citationVerification`, and actionable zero-LLM `qualityHints`. | | `compare_routine_dry_runs` | `mcp:dry_run` | Run parallel isolated A/B private dry-runs comparing candidate `modelTier` or `promptTemplate` variants with Drop, monthly cost, and latency deltas (never mutates saved config or broadcasts externally). | | `replay_run_delivery` | `mcp:run` | Re-dispatch ONLY failed external delivery channels on an existing run using its saved output — zero AI re-execution and **0 Drops** charged. | | `get_routine_runs` | `mcp:read` | Fetch recent execution logs, headlines, outputs, canonical `outcomeCode`, per-step `stepTraces` (`includeTrace`), grounding `qualityMetrics`, retry queue diagnostics, and Drop costs. | | `get_workflow_graph` | `mcp:read` | Inspect the full Actor-Stream & workflow graph (nodes with `decisionGate`, `reads_stream` subscriptions including public Explore sources, `push_trigger` edges with `triggerOnVerdicts`, min/max per-trigger Drops, and `triggerLoopWarnings`; 0 Drops). | | `search_public_routines` | `mcp:read` | Search public Explore routines (and optionally `followedOnly: true`) whose Published Streams are eligible as read-only inputs for `routineSubscriptions` or `chain_routines(mode: "subscribe_stream")` (0 Drops; non-owners can never trigger someone else's routine). | | `chain_routines` | `mcp:write` | Connect or detach two routines in either `mode: "subscribe_stream"` (async WhatsApp-style Published Stream reading from own or public routines on independent schedules) or `mode: "push_trigger"` (immediate chained wake-up with optional `triggerOnVerdicts` & cycle/depth validation; 0 Drops). | | `get_routine_webhook_trigger` | `mcp:write` | Retrieve or rotate a routine's incoming webhook URL, `x-tishtar-secret` header secret, and ready-to-use `curl` snippet (0 Drops). | | `list_pending_approvals` | `mcp:read` | List generated outputs held in the Human Approval Queue awaiting review prior to external dispatch. | | `resolve_approval` | `mcp:run` (approve) / `mcp:write` (reject) | Approve (with optional `editedHeadline` / `editedOutputText` inline edits before dispatch) or reject a held `pending_approval` run atomically. | | `list_connections` | `mcp:read` | List authenticated delivery connectors (Telegram, Web Push, Notion, Google Sheets, Slack, Discord, GitHub, Webhooks, external MCP servers) plus 1-click `telegramConnectUrl` when Telegram is unlinked. | | `discover_connector_resources` | `mcp:read` | Discover schema-only Notion databases, Google Sheets row-1 headers, Telegram chats, or external MCP tools for a `connectionId`. | | `create_google_spreadsheet` | `mcp:write` | Create a new Google Spreadsheet with custom sheet tab name and row-1 column headers in the user's connected Google Drive (0 Drops). | | `create_notion_database` | `mcp:write` | Create a new Notion database with typed properties inside a shared parent page in the user's connected Notion workspace (0 Drops). | | `test_connection` | `mcp:dry_run` | Run a zero-Drop live health check on any connected channel (Telegram, Web Push, Slack, Notion, Sheets, Webhook, Email, MCP) without invoking AI models. | | `list_skills_and_templates` | `mcp:read` | Inspect available skills, system tools (`web_search`, `web_crawler`, `rss_reader`, `market_finance`, `cloud_browser`), model tiers, curated templates, and multi-routine starter packs (pass `templateId` for full template or `pack_*` starter pack details). | | `manage_custom_skills` | `mcp:read` (`list`) / `mcp:write` (mutate) | List, create, update (semver bump), or delete private reusable custom skills (`isPublic: false`) to attach across multiple routines (0 Drops). | | `get_wallet_status` | `mcp:read` | Retrieve current non-expiring Drops balance, `runway` burn projections by model tier, monthly spend/cap, and recent ledger entries. | | `set_budget_cap` | `mcp:write` | Atomically set or clear a monthly Drops spending cap for the entire account or for a specific `routineId` (0 Drops). | | `redeem_voucher` | `mcp:write` | Redeem an external Tishtar voucher code into non-expiring Drops (zero in-app payment gateways; 0 Drops). | ## MCP Playbook Resources & Interactive UI Widgets (`resources/list` & `resources/read`) Zero-Drop Markdown guidance resources any connected assistant can read on demand: - `tishtar://guide/assistant-playbook`: Complete Personal Assistant operating playbook (daily loops, live tool selection matrix, Diff Memory vs. Decision Gate vs. Approval matrix, Actor-Stream rules, and top anti-patterns). - `tishtar://guide/prompt-craft`: The 5-part autopilot prompt formula, bad-vs-gold before/after blueprints, and closed-loop quality tuning protocol. Compatible MCP hosts (ChatGPT, Claude) can also render interactive HTML widgets served with `mimeType: "text/html;profile=mcp-app"`: - `ui://tishtar/widgets/account-health.html`: Drop runway, active routine health, and connector diagnostics (bound to `get_account_health`, `get_wallet_status`). - `ui://tishtar/widgets/dry-run-preview.html`: Side-by-side dry-run and A/B output preview with Drop and latency deltas (bound to `run_routine`, `compare_routine_dry_runs`). - `ui://tishtar/widgets/inbox-approvals.html`: Executive inbox highlights, failures, and Human Approval Queue summary (bound to `get_inbox_briefing`, `list_pending_approvals`). ## Built-In Operational Prompts (`prompts/list`) - `morning_executive_briefing` (`sinceHours?`): Personal Assistant daily inbox briefing, pending approvals triage, 0-Drop delivery replay check, and `optimizationHints` summary. - `design_new_autopilot` (`goal`): Guided creation (with `tishtar://guide/prompt-craft`, `create_routine(validateOnly: true)` preflight, and private `dryRun: true`) or 1-click template/starter-pack cloning. - `upgrade_routine_quality` (`routineId`, `feedback?`): Evidence-based routine quality upgrade using step traces, citation grounding checks, `rate_routine_run` feedback anchors, `validateOnly` diffs, and A/B dry-runs. - `build_autonomous_routine_network` (`objective`): Architect a multi-routine Actor-Stream network using independent `routineSubscriptions` (own or public Explore streams) and verdict-gated `push_trigger` reactions. - `audit_my_routines`: Full 360-degree account health and Drop-efficiency audit. - `debug_failed_routine` (`routineId`): Step-by-step diagnosis across runs, memory, version history, and zero-Drop connection tests. - `optimize_drop_budget`: Identify monthly Drop savings across active routines with `validateOnly: true` cost previews. ## Progress Streaming (Streamable HTTP SSE) When calling `run_routine` over `POST https://mcp.tishtar.app/mcp` with `Accept: text/event-stream` and `params._meta.progressToken`, Tishtar streams compliant JSON-RPC `notifications/progress` events (`1/4` through `4/4`) before emitting the final JSON-RPC result. ## Resource Model (Drops) & MCP Tool Cost Transparency Tishtar operates on a **non-expiring Drops compute ledger** (no recurring subscriptions and no in-app payment gateways; Drops are redeemed via external vouchers or P2P allocations): - **0 Drops (All 33 Control-Plane, Recovery & Discovery Tools — Zero AI Calls):** `get_account_health`, `get_inbox_briefing`, `search_run_archive`, `list_routines`, `get_routine`, `get_routine_runs`, `replay_run_delivery`, `get_routine_memory`, `update_routine_memory`, `list_routine_versions`, `rate_routine_run`, `create_routine` (when `runImmediately` is false), `clone_template` (when `runDryRunPreview` is false), `update_routine` (including `validateOnly: true` diff & `runwayImpact` previews), `toggle_routine`, `revert_routine`, `delete_routine`, `list_pending_approvals`, `resolve_approval`, `list_connections`, `discover_connector_resources`, `create_google_spreadsheet`, `create_notion_database`, `test_connection`, `list_skills_and_templates`, `manage_custom_skills`, `get_wallet_status`, `set_budget_cap`, `redeem_voucher`, `get_workflow_graph`, `search_public_routines`, `chain_routines`, and `get_routine_webhook_trigger`. - **Standard Drops (AI & Tool Pipeline Execution):** - `fast` tier: 1 Drop base per run - `balanced` tier: 5 Drops base per run - `deep` tier: 25 Drops base per run - `flagship` tier: 100 Drops base per run - Additional system tools (e.g., `web_search`, `web_crawler`, `cloud_browser`) add transparent per-run Drop costs calculated automatically in `costEstimate` and `runwayImpact` before saving. - **Dry-Run Policy:** `run_routine(dryRun: true)` and `compare_routine_dry_runs` execute the full real AI and web/tool pipeline (so output quality is authentic) and therefore settle standard Drops per run — while strictly suppressing all external broadcasts and keeping rolling Diff Memory untouched. Use `update_routine(validateOnly: true)` and `test_connection` for **0-Drop** preflight checks. ## Recommended Agent Workflows 1. **Start with a single health check:** Call `get_account_health` to see Drop runway, failing routines, broken connections, and pending approvals in one round trip. 2. **Before creating or cloning a routine with external delivery:** Call `list_connections` (and `discover_connector_resources` for Google Sheets/Notion, or `test_connection` to confirm delivery health). 3. **Preview edits and outputs safely:** Use `update_routine(validateOnly: true)` to inspect `changesDiff` and `costDelta`, and `run_routine(params: { dryRun: true, topic?: "..." })` to inspect full `outputText` and `toolTrace` privately before broadcasting. 4. **Manage anti-repetition memory & approvals:** Use `get_routine_memory` / `update_routine_memory` to inspect/manage `coveredTopics`, and `list_pending_approvals` / `resolve_approval` for human-in-the-loop publishing.