diff --git a/.changeset/empty-mayflies-report.md b/.changeset/empty-mayflies-report.md
new file mode 100644
index 000000000..36a68e420
--- /dev/null
+++ b/.changeset/empty-mayflies-report.md
@@ -0,0 +1,7 @@
+---
+"dashboard": patch
+"@gram/client": patch
+"server": patch
+---
+
+Adds an initial pass "POC" implementation of Gram hooks for tool capture
diff --git a/.gitignore b/.gitignore
index 27aad5047..8ec6948e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,3 +53,4 @@ package-lock.json
/examples/*/pnpm-lock.yaml
.worktrees
.granary/
+.claude/hooks/*
\ No newline at end of file
diff --git a/.mise-tasks/hooks/test.sh b/.mise-tasks/hooks/test.sh
new file mode 100755
index 000000000..9fd518e52
--- /dev/null
+++ b/.mise-tasks/hooks/test.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+#MISE description="Test the Gram hooks Claude plugin locally"
+#MISE dir="{{ config_root }}"
+
+set -euo pipefail
+
+echo "Starting Claude Code with Gram hooks plugin..."
+echo ""
+echo "Plugin directory: ./hooks/plugin-claude"
+echo ""
+
+exec claude --plugin-dir ./hooks/plugin-claude --debug
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index ee7a300a4..5657b6059 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -14405,6 +14405,14 @@ components:
- tool_urn
- created_at
- updated_at
+ HookResult:
+ type: object
+ properties:
+ ok:
+ type: boolean
+ description: Whether the hook was received successfully
+ required:
+ - ok
InfoResponseBody:
type: object
properties:
@@ -15440,6 +15448,40 @@ components:
- credits
- included_credits
- has_active_subscription
+ PostToolUseFailurePayload:
+ type: object
+ properties:
+ tool_error:
+ description: The error from the tool
+ tool_input:
+ description: The input to the tool
+ tool_name:
+ type: string
+ description: The name of the tool that failed
+ required:
+ - tool_name
+ PostToolUsePayload:
+ type: object
+ properties:
+ tool_input:
+ description: The input to the tool
+ tool_name:
+ type: string
+ description: The name of the tool that was invoked
+ tool_response:
+ description: The response from the tool
+ required:
+ - tool_name
+ PreToolUsePayload:
+ type: object
+ properties:
+ tool_input:
+ description: The input to the tool
+ tool_name:
+ type: string
+ description: The name of the tool being invoked
+ required:
+ - tool_name
Project:
type: object
properties:
@@ -16767,6 +16809,9 @@ components:
ToolCallSummary:
type: object
properties:
+ event_source:
+ type: string
+ description: Event source (from attributes.gram.event.source)
gram_urn:
type: string
description: Gram URN associated with this tool call
@@ -16782,6 +16827,12 @@ components:
type: integer
description: Earliest log timestamp in Unix nanoseconds
format: int64
+ tool_name:
+ type: string
+ description: Tool name (from attributes.gram.tool.name)
+ tool_source:
+ type: string
+ description: Tool call source (from attributes.gram.tool_call.source)
trace_id:
type: string
description: Trace ID (32 hex characters)
diff --git a/client/dashboard/src/pages/logs/TraceRow.tsx b/client/dashboard/src/pages/logs/TraceRow.tsx
index fd1b8bfde..481585290 100644
--- a/client/dashboard/src/pages/logs/TraceRow.tsx
+++ b/client/dashboard/src/pages/logs/TraceRow.tsx
@@ -1,17 +1,17 @@
import {
- ToolCallSummary,
TelemetryLogRecord,
+ ToolCallSummary,
} from "@gram/client/models/components";
import { ChevronDownIcon, ChevronRightIcon } from "lucide-react";
+import { StatusBadge } from "./StatusBadge";
+import { TraceLogsList } from "./TraceLogsList";
import {
formatNanoTimestamp,
- getStatusInfo,
getSourceFromUrn,
- getToolNameFromUrn,
+ getStatusInfo,
getToolIcon,
+ getToolNameFromUrn,
} from "./utils";
-import { TraceLogsList } from "./TraceLogsList";
-import { StatusBadge } from "./StatusBadge";
interface TraceRowProps {
trace: ToolCallSummary;
@@ -27,9 +27,9 @@ export function TraceRow({
onLogClick,
}: TraceRowProps) {
const { isSuccess } = getStatusInfo(trace);
- const sourceName = getSourceFromUrn(trace.gramUrn);
- const toolName = getToolNameFromUrn(trace.gramUrn);
- const ToolIcon = getToolIcon(trace.gramUrn);
+ const sourceName = trace.toolSource || getSourceFromUrn(trace.gramUrn);
+ const toolName = trace.toolName || getToolNameFromUrn(trace.gramUrn);
+ const ToolIcon = getToolIcon(trace);
return (
@@ -55,9 +55,11 @@ export function TraceRow({
{/* Icon + Source badge + Tool name */}
-
- {sourceName}
-
+ {sourceName && (
+
+ {sourceName}
+
+ )}
{toolName}
diff --git a/client/dashboard/src/pages/logs/utils.ts b/client/dashboard/src/pages/logs/utils.ts
index 2dc072642..b06301c2a 100644
--- a/client/dashboard/src/pages/logs/utils.ts
+++ b/client/dashboard/src/pages/logs/utils.ts
@@ -1,13 +1,15 @@
+import { dateTimeFormatters } from "@/lib/dates";
import {
- ToolCallSummary,
TelemetryLogRecord,
+ ToolCallSummary,
} from "@gram/client/models/components";
-import { dateTimeFormatters } from "@/lib/dates";
import {
FileCode,
+ SquareTerminal as HookIcon,
+ LucideIcon,
PencilRuler,
SquareFunction,
- LucideIcon,
+ Hammer as ToolIcon,
} from "lucide-react";
/**
@@ -98,16 +100,24 @@ export function getToolNameFromUrn(urn: string): string {
/**
* Get the appropriate icon for a tool based on its URN
*/
-export function getToolIcon(urn: string): LucideIcon {
- const { kind } = parseGramUrn(urn);
- if (kind === "http") {
- return FileCode;
+export function getToolIcon(trace: ToolCallSummary): LucideIcon {
+ if (trace.gramUrn) {
+ const { kind } = parseGramUrn(trace.gramUrn);
+ if (kind === "http") {
+ return FileCode;
+ }
+ if (kind === "prompt") {
+ return PencilRuler;
+ }
+ // Otherwise it's a function tool
+ return SquareFunction;
}
- if (kind === "prompt") {
- return PencilRuler;
+
+ if (trace.eventSource === "hook") {
+ return HookIcon;
}
- // Otherwise it's a function tool
- return SquareFunction;
+
+ return ToolIcon;
}
/**
diff --git a/client/sdk/.speakeasy/gen.lock b/client/sdk/.speakeasy/gen.lock
index d2e29c12d..59e8e40c9 100644
--- a/client/sdk/.speakeasy/gen.lock
+++ b/client/sdk/.speakeasy/gen.lock
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 0e7a6274-2092-40cd-9586-9415c6655c64
management:
- docChecksum: abe78fffeab91402b0a96cc2530719ee
+ docChecksum: de725a4dd8b70922900b47a8fa8c77ab
docVersion: 0.0.1
speakeasyVersion: 1.700.2
generationVersion: 2.801.2
- releaseVersion: 0.27.9
- configChecksum: 94739b67ae728967be58ccb3e1b5a30a
+ releaseVersion: 0.28.2
+ configChecksum: 3d872ce88d7ced0ae226b20a4e243e3d
persistentEdits:
generation_id: bb7e101e-7ad4-46ab-85f8-4945a377ddd8
pristine_commit_hash: 8f637eb1797d8010346278d429048da266e99c54
@@ -457,7 +457,7 @@ trackedFiles:
docs/models/components/toolannotations.md:
last_write_checksum: sha1:cfb3f615e75717616f385d78ad41ee94ed6019f1
docs/models/components/toolcallsummary.md:
- last_write_checksum: sha1:cd7f4d02eb9156c7cbccf0edff2a4b27d50a6f9e
+ last_write_checksum: sha1:86c91f677959d4de34c516fe976f0ece0dbe88f9
docs/models/components/toolentry.md:
last_write_checksum: sha1:6e30e93e231fc9a01cfbfcd1be2356d7f1d000ab
docs/models/components/toolentrytype.md:
@@ -1374,11 +1374,11 @@ trackedFiles:
pristine_git_object: 8a33dbb4b9cb9cefaa43e10ddf535cbcd13c9e72
jsr.json:
id: 7f6ab7767282
- last_write_checksum: sha1:1567b59452ee5cc6446f4c46305b6c9ae2b967c0
+ last_write_checksum: sha1:8bad0d0e2a8346bd9553fe925cce79d93749d890
pristine_git_object: 37015b45d10dbc89a9a32f9f2230620a633c7af5
package.json:
id: 7030d0b2f71b
- last_write_checksum: sha1:f6cf669178d75c9dcdce3ed87336a6d0bcaf94a8
+ last_write_checksum: sha1:1433d315270cd85deb9070dedf0b35da772b1489
pristine_git_object: efd88030fdaeb4cfabe39268b1f7e684dda63c7e
src/core.ts:
id: f431fdbcd144
@@ -1840,7 +1840,7 @@ trackedFiles:
pristine_git_object: b9f82967e336f398ea542003dc4b7b2508bc4e76
src/lib/config.ts:
id: 320761608fb3
- last_write_checksum: sha1:513e4f91d9e085fd785c6b1862a3360cce7b60e5
+ last_write_checksum: sha1:65e551eed6517894bc7322876fee5bffd2c7511a
pristine_git_object: 582b9fc70b7ac2bf3e01969f3ea9b751959bbd2b
src/lib/dlv.ts:
id: b1988214835a
@@ -2508,7 +2508,7 @@ trackedFiles:
last_write_checksum: sha1:70ee958b7d8214d507eb6c83daa4f7e673d99b41
src/models/components/toolcallsummary.ts:
id: 240c70fb9551
- last_write_checksum: sha1:74d3fb5f1178edb59b509b48b2b79adb7e897ffd
+ last_write_checksum: sha1:de28d55af8683587334025d07429d92c53a8336d
pristine_git_object: 228edbe83abf771d6a654e54a6212ddcce12c88b
src/models/components/toolentry.ts:
id: 82f49d8e8ee1
diff --git a/client/sdk/.speakeasy/gen.yaml b/client/sdk/.speakeasy/gen.yaml
index 014c8fe46..f857f6195 100644
--- a/client/sdk/.speakeasy/gen.yaml
+++ b/client/sdk/.speakeasy/gen.yaml
@@ -17,6 +17,7 @@ generation:
securityFeb2025: true
sharedErrorComponentsApr2025: false
sharedNestedComponentsJan2026: false
+ nameOverrideFeb2026: false
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: true
@@ -33,7 +34,7 @@ generation:
skipResponseBodyAssertions: false
versioningStrategy: automatic
typescript:
- version: 0.27.9
+ version: 0.28.2
acceptHeaderEnum: true
additionalDependencies:
dependencies: {}
diff --git a/client/sdk/jsr.json b/client/sdk/jsr.json
index 060617846..26ab41b31 100644
--- a/client/sdk/jsr.json
+++ b/client/sdk/jsr.json
@@ -2,7 +2,7 @@
{
"name": "@gram/client",
- "version": "0.27.9",
+ "version": "0.28.2",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
diff --git a/client/sdk/package.json b/client/sdk/package.json
index 1d5b1b76f..1f04894f6 100644
--- a/client/sdk/package.json
+++ b/client/sdk/package.json
@@ -1,6 +1,6 @@
{
"name": "@gram/client",
- "version": "0.28.0",
+ "version": "0.28.2",
"author": "Speakeasy",
"private": true,
"type": "module",
@@ -60,15 +60,9 @@
"react-dom": "^18 || ^19"
},
"peerDependenciesMeta": {
- "@tanstack/react-query": {
- "optional": true
- },
- "react": {
- "optional": true
- },
- "react-dom": {
- "optional": true
- }
+ "@tanstack/react-query": {"optional":true},
+ "react": {"optional":true},
+ "react-dom": {"optional":true}
},
"devDependencies": {
"@eslint/js": "^9.19.0",
diff --git a/client/sdk/src/lib/config.ts b/client/sdk/src/lib/config.ts
index 852f1d7ef..213b9dab1 100644
--- a/client/sdk/src/lib/config.ts
+++ b/client/sdk/src/lib/config.ts
@@ -59,7 +59,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "0.0.1",
- sdkVersion: "0.27.9",
+ sdkVersion: "0.28.2",
genVersion: "2.801.2",
- userAgent: "speakeasy-sdk/typescript 0.27.9 2.801.2 0.0.1 @gram/client",
+ userAgent: "speakeasy-sdk/typescript 0.28.2 2.801.2 0.0.1 @gram/client",
} as const;
diff --git a/client/sdk/src/models/components/toolcallsummary.ts b/client/sdk/src/models/components/toolcallsummary.ts
index a5825bdde..b169caccc 100644
--- a/client/sdk/src/models/components/toolcallsummary.ts
+++ b/client/sdk/src/models/components/toolcallsummary.ts
@@ -12,6 +12,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
* Summary information for a tool call
*/
export type ToolCallSummary = {
+ /**
+ * Event source (from attributes.gram.event.source)
+ */
+ eventSource?: string | undefined;
/**
* Gram URN associated with this tool call
*/
@@ -28,6 +32,14 @@ export type ToolCallSummary = {
* Earliest log timestamp in Unix nanoseconds
*/
startTimeUnixNano: number;
+ /**
+ * Tool name (from attributes.gram.tool.name)
+ */
+ toolName?: string | undefined;
+ /**
+ * Tool call source (from attributes.gram.tool_call.source)
+ */
+ toolSource?: string | undefined;
/**
* Trace ID (32 hex characters)
*/
@@ -40,17 +52,23 @@ export const ToolCallSummary$inboundSchema: z.ZodType<
z.ZodTypeDef,
unknown
> = z.object({
+ event_source: z.string().optional(),
gram_urn: z.string(),
http_status_code: z.number().int().optional(),
log_count: z.number().int(),
start_time_unix_nano: z.number().int(),
+ tool_name: z.string().optional(),
+ tool_source: z.string().optional(),
trace_id: z.string(),
}).transform((v) => {
return remap$(v, {
+ "event_source": "eventSource",
"gram_urn": "gramUrn",
"http_status_code": "httpStatusCode",
"log_count": "logCount",
"start_time_unix_nano": "startTimeUnixNano",
+ "tool_name": "toolName",
+ "tool_source": "toolSource",
"trace_id": "traceId",
});
});
diff --git a/compose.yml b/compose.yml
index 587c48615..88c6d2508 100644
--- a/compose.yml
+++ b/compose.yml
@@ -69,6 +69,7 @@ services:
restart: unless-stopped
ports:
- "${CLICKHOUSE_NATIVE_PORT}:9440"
+ - "${CLICKHOUSE_HTTP_PORT}:8123"
environment:
CLICKHOUSE_DB: default
CLICKHOUSE_USER: gram
diff --git a/hooks/README.md b/hooks/README.md
new file mode 100644
index 000000000..60cb365f6
--- /dev/null
+++ b/hooks/README.md
@@ -0,0 +1,116 @@
+# Gram Hooks
+
+Forward editor hooks to Gram for analytics, monitoring, and compliance tracking.
+
+## Overview
+
+This directory contains Gram's hook implementations that can be packaged for different editors and IDEs:
+
+- **Claude Code Plugin**: Native plugin for Claude Code and Claude Desktop
+- **Standalone Installation**: Traditional script-based installation for Claude Code
+- **Future**: Cursor plugin, VSCode extension, etc.
+
+## Quick Start
+
+### Option 1: Claude Code Plugin (Recommended)
+
+```bash
+claude plugin install gram-hooks
+```
+
+See [plugin-claude/README.md](./plugin-claude/README.md) for details.
+
+### Option 2: Standalone Installation
+
+```bash
+# Remote installation
+curl -fsSL https://raw.githubusercontent.com/gram-ai/gram/main/hooks/install.sh | bash
+
+# Local installation (from this repo)
+./hooks/install.sh
+```
+
+## Directory Structure
+
+```
+hooks/
+├── core/ # Shared core implementation (reusable)
+│ ├── common.sh # Common utilities and API client
+│ ├── pre_tool_use.sh # PreToolUse hook handler
+│ ├── post_tool_use.sh # PostToolUse hook handler
+│ └── post_tool_use_failure.sh
+│
+├── plugin-claude/ # Claude Code plugin packaging
+│ ├── .claude-plugin/
+│ │ └── plugin.json # Plugin manifest
+│ ├── scripts/ # Hook scripts
+│ ├── hooks/
+│ │ └── hooks.json # Hook event configuration
+│ └── README.md # Plugin-specific docs
+│
+├── install.sh # Standalone installer script
+└── README.md # This file
+```
+
+## Core Module
+
+The `core/` directory contains the shared implementation that powers all packaging methods:
+
+- **common.sh**: Environment validation, JSON formatting, Gram API client
+- **pre_tool_use.sh**: Handler for PreToolUse events
+- **post_tool_use.sh**: Handler for PostToolUse events
+- **post_tool_use_failure.sh**: Handler for PostToolUseFailure events
+
+These scripts are designed to be:
+1. Executable standalone
+2. Packaged as a Claude plugin
+3. Adapted for other editors (Cursor, VSCode, etc.)
+
+## Configuration
+
+All packaging methods require:
+
+**Required:**
+- `GRAM_API_KEY`: Your Gram API key
+
+**Optional:**
+- `GRAM_PROJECT`: Project name (defaults to "default")
+
+## Adding Support for New Editors
+
+To package these hooks for a new editor:
+
+1. Create a new directory: `hooks/
/`
+2. Copy/symlink the core scripts from `hooks/core/`
+3. Add editor-specific configuration files
+4. Update the core scripts if needed (send PRs!)
+5. Document the installation process
+
+Example for Cursor:
+
+```bash
+mkdir -p hooks/cursor-plugin
+cd hooks/cursor-plugin
+# Link to core scripts
+ln -s ../core/*.sh .
+# Add Cursor-specific manifest
+# ...
+```
+
+## Development
+
+### Testing Changes
+
+When modifying core scripts:
+
+```bash
+# Test with Claude Code plugin
+claude --plugin-dir ./hooks/plugin-claude
+
+# Test with standalone installation
+./hooks/install.sh
+```
+
+## License
+
+MIT
diff --git a/hooks/core/common.sh b/hooks/core/common.sh
new file mode 100755
index 000000000..3b9112c29
--- /dev/null
+++ b/hooks/core/common.sh
@@ -0,0 +1,108 @@
+#!/usr/bin/env bash
+# Common functions shared across Gram hook scripts
+# This is the core module that can be packaged for different distributions
+
+# Ensure standard paths are available (hooks may have minimal PATH)
+export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
+
+# Validates required environment variables and blocks if missing
+# Usage: validate_env_vars "HookEventName"
+validate_env_vars() {
+ local hook_event_name="$1"
+
+ echo "RUNNING HOOK $hook_event_name"
+
+ if [ -z "$GRAM_API_KEY" ]; then
+ output_block_json "$hook_event_name" "GRAM_API_KEY environment variable is not set. Please set it to enable Gram hooks."
+ exit 0
+ fi
+
+ # Set default project if not specified
+ if [ -z "$GRAM_PROJECT" ]; then
+ GRAM_PROJECT="default"
+ fi
+}
+
+# Outputs blocking JSON response based on hook type
+# Usage: output_block_json "HookEventName" "reason message"
+output_block_json() {
+ local hook_event_name="$1"
+ local reason="$2"
+
+ if [ "$hook_event_name" = "PreToolUse" ]; then
+ cat << EOF
+{
+ "hookSpecificOutput": {
+ "hookEventName": "$hook_event_name",
+ "permissionDecision": "deny",
+ "permissionDecisionReason": "$reason"
+ }
+}
+EOF
+ else
+ cat << EOF
+{
+ "hookSpecificOutput": {
+ "hookEventName": "$hook_event_name",
+ "decision": "block",
+ "reason": "$reason"
+ }
+}
+EOF
+ fi
+}
+
+# Outputs success JSON response based on hook type
+# Usage: output_success_json "HookEventName"
+output_success_json() {
+ local hook_event_name="$1"
+
+ if [ "$hook_event_name" = "PreToolUse" ]; then
+ cat << EOF
+{
+ "hookSpecificOutput": {
+ "hookEventName": "$hook_event_name",
+ "permissionDecision": "allow"
+ }
+}
+EOF
+ else
+ cat << EOF
+{
+ "hookSpecificOutput": {
+ "hookEventName": "$hook_event_name"
+ }
+}
+EOF
+ fi
+}
+
+# Calls the Gram API and handles the response
+# Usage: call_gram_api "endpoint_name" "HookEventName"
+call_gram_api() {
+ local endpoint="$1"
+ local hook_event_name="$2"
+
+ INPUT=$(cat)
+ HTTP_CODE=$(curl -s -w "%{http_code}" -o /tmp/gram_hook_response.json -X POST "http://localhost:8080/rpc/hooks.$endpoint" \
+ -H "Content-Type: application/json" \
+ -H "Gram-Key: $GRAM_API_KEY" \
+ -H "Gram-Project: $GRAM_PROJECT" \
+ -d "$INPUT")
+ RESPONSE=$(cat /tmp/gram_hook_response.json 2>/dev/null || echo "")
+ rm -f /tmp/gram_hook_response.json
+
+ # Check if the API call was successful
+ if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then
+ # Transform API response to Claude Code hook format
+ output_success_json "$hook_event_name"
+ exit 0
+ fi
+
+ # API error - use exit code 2 to block with error message
+ echo "Gram API error (HTTP $HTTP_CODE)" >&2
+ if [ -n "$RESPONSE" ]; then
+ echo "$RESPONSE" >&2
+ fi
+ exit 2
+}
diff --git a/hooks/core/post_tool_use.sh b/hooks/core/post_tool_use.sh
new file mode 100755
index 000000000..ab251abbc
--- /dev/null
+++ b/hooks/core/post_tool_use.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+# Forward PostToolUse hook events to the Gram server.
+# Reads the hook payload from stdin and POSTs it to the hooks service.
+
+# Load common functions
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+source "$SCRIPT_DIR/common.sh"
+
+# Validate environment variables
+validate_env_vars "PostToolUse"
+
+# Call Gram API
+call_gram_api "postToolUse" "PostToolUse"
diff --git a/hooks/core/post_tool_use_failure.sh b/hooks/core/post_tool_use_failure.sh
new file mode 100755
index 000000000..a43b8af60
--- /dev/null
+++ b/hooks/core/post_tool_use_failure.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+# Forward PostToolUseFailure hook events to the Gram server.
+# Reads the hook payload from stdin and POSTs it to the hooks service.
+
+# Load common functions
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+source "$SCRIPT_DIR/common.sh"
+
+# Validate environment variables
+validate_env_vars "PostToolUseFailure"
+
+# Call Gram API
+call_gram_api "postToolUseFailure" "PostToolUseFailure"
diff --git a/hooks/core/pre_tool_use.sh b/hooks/core/pre_tool_use.sh
new file mode 100755
index 000000000..534c2f2ff
--- /dev/null
+++ b/hooks/core/pre_tool_use.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+# Forward PreToolUse hook events to the Gram server.
+# Reads the hook payload from stdin and POSTs it to the hooks service.
+
+# Load common functions
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+source "$SCRIPT_DIR/common.sh"
+
+# Validate environment variables
+validate_env_vars "PreToolUse"
+
+# Call Gram API
+call_gram_api "preToolUse" "PreToolUse"
diff --git a/hooks/install.sh b/hooks/install.sh
new file mode 100755
index 000000000..175a65f45
--- /dev/null
+++ b/hooks/install.sh
@@ -0,0 +1,176 @@
+#!/usr/bin/env bash
+# Install Gram Claude hooks to user's global Claude config
+# Usage:
+# Remote: curl -fsSL https://raw.githubusercontent.com/gram-ai/gram/main/hooks/install.sh | bash
+# Local: ./hooks/install.sh
+set -euo pipefail
+
+GITHUB_REPO="gram-ai/gram"
+GITHUB_BRANCH="main"
+HOOKS_BASE_URL="https://raw.githubusercontent.com/${GITHUB_REPO}/${GITHUB_BRANCH}/hooks/core"
+CLAUDE_HOOKS_DIR="$HOME/.claude/hooks"
+
+# Check if running from the repo (local) or downloaded (remote)
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd || echo "")"
+LOCAL_HOOKS_DIR=""
+if [ -n "$SCRIPT_DIR" ] && [ -f "$SCRIPT_DIR/core/pre_tool_use.sh" ]; then
+ LOCAL_HOOKS_DIR="$SCRIPT_DIR/core"
+fi
+
+echo "Installing Gram Claude hooks..."
+echo ""
+
+# Create hooks directory if it doesn't exist
+mkdir -p "$CLAUDE_HOOKS_DIR"
+
+# Install common library and hook scripts
+for hook_file in common.sh pre_tool_use.sh post_tool_use.sh post_tool_use_failure.sh; do
+ echo " Installing $hook_file"
+
+ if [ -n "$LOCAL_HOOKS_DIR" ]; then
+ # Local installation - symlink from repo
+ ln -sf "$LOCAL_HOOKS_DIR/$hook_file" "$CLAUDE_HOOKS_DIR/$hook_file"
+ else
+ # Remote installation - download from GitHub
+ if command -v curl &> /dev/null; then
+ curl -fsSL "${HOOKS_BASE_URL}/${hook_file}" -o "$CLAUDE_HOOKS_DIR/$hook_file"
+ elif command -v wget &> /dev/null; then
+ wget -q "${HOOKS_BASE_URL}/${hook_file}" -O "$CLAUDE_HOOKS_DIR/$hook_file"
+ else
+ echo "Error: neither curl nor wget found. Please install one of them."
+ exit 1
+ fi
+ fi
+
+ chmod +x "$CLAUDE_HOOKS_DIR/$hook_file"
+done
+
+echo ""
+echo "✓ Hooks installed to $CLAUDE_HOOKS_DIR"
+echo ""
+
+# Check if GRAM_API_KEY is set
+if [ -z "$GRAM_API_KEY" ]; then
+ echo "⚠️ GRAM_API_KEY environment variable is not set"
+ echo ""
+ echo "To enable hook forwarding to Gram:"
+ echo " 1. Visit https://app.getgram.ai to get your API key"
+ echo " 2. Set the GRAM_API_KEY environment variable in your shell profile:"
+ echo " export GRAM_API_KEY=your-api-key-here"
+ echo ""
+else
+ echo "✓ GRAM_API_KEY is set"
+ echo ""
+fi
+
+# Configure Claude settings
+CLAUDE_SETTINGS="$HOME/.claude/settings.json"
+SETTINGS_DIR="$(dirname "$CLAUDE_SETTINGS")"
+
+# Create .claude directory if it doesn't exist
+mkdir -p "$SETTINGS_DIR"
+
+# Check if settings.json exists
+if [ ! -f "$CLAUDE_SETTINGS" ]; then
+ echo "Creating $CLAUDE_SETTINGS..."
+ echo '{}' > "$CLAUDE_SETTINGS"
+fi
+
+# Check if jq is available for JSON manipulation
+if command -v jq &> /dev/null; then
+ echo "Configuring hooks in $CLAUDE_SETTINGS..."
+
+ # Create the hooks configuration
+ HOOKS_CONFIG=$(cat << 'EOF'
+{
+ "PreToolUse": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "~/.claude/hooks/pre_tool_use.sh",
+ "timeout": 10
+ }
+ ]
+ }
+ ],
+ "PostToolUse": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "~/.claude/hooks/post_tool_use.sh",
+ "timeout": 10
+ }
+ ]
+ }
+ ],
+ "PostToolUseFailure": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "~/.claude/hooks/post_tool_use_failure.sh",
+ "timeout": 10
+ }
+ ]
+ }
+ ]
+}
+EOF
+)
+
+ # Merge hooks into existing settings
+ TMP_FILE=$(mktemp)
+ jq --argjson hooks "$HOOKS_CONFIG" '.hooks = $hooks' "$CLAUDE_SETTINGS" > "$TMP_FILE"
+ mv "$TMP_FILE" "$CLAUDE_SETTINGS"
+
+ echo "✓ Hooks configured in $CLAUDE_SETTINGS"
+ echo ""
+ echo "Next steps:"
+ echo " 1. Restart Claude Code for changes to take effect"
+else
+ echo "⚠️ jq not found - cannot automatically update settings"
+ echo ""
+ echo "Please manually add this to $CLAUDE_SETTINGS:"
+ echo ""
+ cat << 'EOF'
+ "hooks": {
+ "PreToolUse": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "~/.claude/hooks/pre_tool_use.sh",
+ "timeout": 10
+ }
+ ]
+ }
+ ],
+ "PostToolUse": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "~/.claude/hooks/post_tool_use.sh",
+ "timeout": 10
+ }
+ ]
+ }
+ ],
+ "PostToolUseFailure": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "~/.claude/hooks/post_tool_use_failure.sh",
+ "timeout": 10
+ }
+ ]
+ }
+ ]
+ }
+EOF
+ echo ""
+ echo "Then restart Claude Code for changes to take effect"
+fi
diff --git a/hooks/plugin-claude/.claude-plugin/plugin.json b/hooks/plugin-claude/.claude-plugin/plugin.json
new file mode 100644
index 000000000..2d0bbb1ca
--- /dev/null
+++ b/hooks/plugin-claude/.claude-plugin/plugin.json
@@ -0,0 +1,13 @@
+{
+ "name": "gram-hooks",
+ "description": "Forward Claude Code hooks to Gram for analytics, monitoring, and compliance",
+ "version": "1.0.0",
+ "author": {
+ "name": "Gram",
+ "url": "https://getgram.ai"
+ },
+ "homepage": "https://getgram.ai",
+ "repository": "https://github.com/gram-ai/gram",
+ "license": "MIT",
+ "keywords": ["gram", "hooks", "analytics", "monitoring", "telemetry"]
+}
diff --git a/hooks/plugin-claude/README.md b/hooks/plugin-claude/README.md
new file mode 100644
index 000000000..f261ead09
--- /dev/null
+++ b/hooks/plugin-claude/README.md
@@ -0,0 +1,113 @@
+# Gram Hooks Plugin for Claude Code
+
+Forward Claude Code hooks to Gram for analytics, monitoring, and compliance tracking.
+
+## What This Plugin Does
+
+This plugin captures tool use events from Claude Code and forwards them to your Gram instance, enabling:
+
+- **Analytics**: Track which tools are being used and when
+- **Monitoring**: Monitor AI agent behavior in production
+- **Compliance**: Maintain audit logs of AI operations
+- **Debugging**: Understand tool execution patterns and failures
+
+## Installation
+
+### Via Claude Code Plugin System
+
+```bash
+# Install the plugin
+claude plugin install gram-hooks
+
+# Enable it (if not auto-enabled)
+claude plugin enable gram-hooks
+```
+
+### Local Development
+
+```bash
+# Clone the Gram repository
+git clone https://github.com/gram-ai/gram.git
+cd gram
+
+# Run Claude Code with the plugin
+claude --plugin-dir ./hooks/plugin-claude
+```
+
+## Configuration
+
+The plugin requires the following environment variables:
+
+### Required
+
+- `GRAM_API_KEY`: Your Gram API key (get one at https://app.getgram.ai)
+
+### Optional
+
+- `GRAM_PROJECT`: Project name for organizing hooks (defaults to "default")
+
+### Setting Environment Variables
+
+Add these to your shell profile (`~/.bashrc`, `~/.zshrc`, etc.):
+
+```bash
+export GRAM_API_KEY="your-api-key-here"
+export GRAM_PROJECT="my-project" # optional
+```
+
+Then reload your shell or run:
+
+```bash
+source ~/.zshrc # or ~/.bashrc
+```
+
+## How It Works
+
+This plugin registers handlers for three Claude Code hook events:
+
+1. **PreToolUse**: Called before a tool executes (can approve/deny)
+2. **PostToolUse**: Called after successful tool execution
+3. **PostToolUseFailure**: Called when a tool execution fails
+
+Each hook forwards the event data to your Gram server at `http://localhost:8080/rpc/hooks.*`.
+
+## Troubleshooting
+
+### Missing GRAM_API_KEY
+
+If `GRAM_API_KEY` is not set, the hooks will block with an error message. Set the environment variable and restart Claude Code.
+
+### API Connection Issues
+
+The plugin connects to `http://localhost:8080` by default. Ensure your Gram server is running locally or modify the URL in the hook scripts.
+
+## Development
+
+The plugin is structured for reusability:
+
+```
+hooks/
+├── core/ # Shared core implementation
+│ ├── common.sh # Common utilities
+│ ├── pre_tool_use.sh # PreToolUse handler
+│ ├── post_tool_use.sh # PostToolUse handler
+│ └── post_tool_use_failure.sh
+│
+├── plugin-claude/ # Claude Code plugin packaging
+│ ├── .claude-plugin/
+│ │ └── plugin.json # Plugin manifest
+│ ├── scripts/ # Hook scripts
+│ └── hooks/
+│ └── hooks.json # Hook configuration
+│
+└── install.sh # Standalone installer
+```
+
+This structure allows the same core scripts to be:
+- Packaged as a Claude Code plugin
+- Installed standalone via `install.sh`
+- Adapted for other editors (Cursor, etc.)
+
+## License
+
+MIT
diff --git a/hooks/plugin-claude/hooks/hooks.json b/hooks/plugin-claude/hooks/hooks.json
new file mode 100644
index 000000000..3220c4b14
--- /dev/null
+++ b/hooks/plugin-claude/hooks/hooks.json
@@ -0,0 +1,26 @@
+{
+ "hooks": {
+ "PostToolUse": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "${CLAUDE_PLUGIN_ROOT}/scripts/post_tool_use",
+ "async": true
+ }
+ ]
+ }
+ ],
+ "PostToolUseFailure": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "${CLAUDE_PLUGIN_ROOT}/scripts/post_tool_use_failure",
+ "async": true
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/hooks/plugin-claude/scripts/common.sh b/hooks/plugin-claude/scripts/common.sh
new file mode 120000
index 000000000..7f5a35e09
--- /dev/null
+++ b/hooks/plugin-claude/scripts/common.sh
@@ -0,0 +1 @@
+../../core/common.sh
\ No newline at end of file
diff --git a/hooks/plugin-claude/scripts/post_tool_use b/hooks/plugin-claude/scripts/post_tool_use
new file mode 120000
index 000000000..3edd8eba4
--- /dev/null
+++ b/hooks/plugin-claude/scripts/post_tool_use
@@ -0,0 +1 @@
+../../core/post_tool_use.sh
\ No newline at end of file
diff --git a/hooks/plugin-claude/scripts/post_tool_use_failure b/hooks/plugin-claude/scripts/post_tool_use_failure
new file mode 120000
index 000000000..c5af892da
--- /dev/null
+++ b/hooks/plugin-claude/scripts/post_tool_use_failure
@@ -0,0 +1 @@
+../../core/post_tool_use_failure.sh
\ No newline at end of file
diff --git a/hooks/plugin-claude/scripts/pre_tool_use b/hooks/plugin-claude/scripts/pre_tool_use
new file mode 120000
index 000000000..4b3bffe73
--- /dev/null
+++ b/hooks/plugin-claude/scripts/pre_tool_use
@@ -0,0 +1 @@
+../../core/pre_tool_use.sh
\ No newline at end of file
diff --git a/mise.toml b/mise.toml
index d37b576ed..51f249998 100644
--- a/mise.toml
+++ b/mise.toml
@@ -52,6 +52,7 @@ CLICKHOUSE_USERNAME = "gram"
CLICKHOUSE_PASSWORD = "gram"
CLICKHOUSE_HOST = "127.0.0.1"
CLICKHOUSE_NATIVE_PORT = "9440"
+CLICKHOUSE_HTTP_PORT = "8123"
CLICKHOUSE_DATABASE = "default"
CLICKHOUSE_INSECURE = true
GRAM_CLICKHOUSE_URL = "clickhouse://{{env.CLICKHOUSE_USERNAME}}:{{env.CLICKHOUSE_PASSWORD}}@{{env.CLICKHOUSE_HOST}}:{{env.CLICKHOUSE_NATIVE_PORT}}/{{env.CLICKHOUSE_DATABASE}}?secure=true&skip_verify=true"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 845757b7d..4410ecdbd 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -15,6 +15,9 @@ catalogs:
'@ai-sdk/ui-utils':
specifier: ^1.2.0
version: 1.2.11
+ '@modelcontextprotocol/sdk':
+ specifier: ^1.20.1
+ version: 1.25.1
'@tanstack/react-query':
specifier: 5.90.10
version: 5.90.10
@@ -14271,7 +14274,7 @@ snapshots:
'@asamuzakjp/css-color': 4.1.2
'@csstools/css-syntax-patches-for-csstree': 1.0.27
css-tree: 3.1.0
- lru-cache: 11.2.4
+ lru-cache: 11.2.5
optional: true
csstype@3.2.3: {}
diff --git a/server/cmd/gram/start.go b/server/cmd/gram/start.go
index 82b408c99..b896ac778 100644
--- a/server/cmd/gram/start.go
+++ b/server/cmd/gram/start.go
@@ -47,6 +47,7 @@ import (
"github.com/speakeasy-api/gram/server/internal/feature"
"github.com/speakeasy-api/gram/server/internal/functions"
"github.com/speakeasy-api/gram/server/internal/guardian"
+ "github.com/speakeasy-api/gram/server/internal/hooks"
"github.com/speakeasy-api/gram/server/internal/instances"
"github.com/speakeasy-api/gram/server/internal/integrations"
"github.com/speakeasy-api/gram/server/internal/k8s"
@@ -644,6 +645,7 @@ func newStartCommand() *cli.Command {
authAuth := auth.New(logger, db, sessionManager)
about.Attach(mux, about.NewService(logger, tracerProvider))
+ hooks.Attach(mux, hooks.NewService(logger, db, tracerProvider, telemSvc, sessionManager))
agentworkflows.Attach(mux, agentworkflows.NewService(logger, tracerProvider, meterProvider, db, env, encryptionClient, cache.NewRedisCacheAdapter(redisClient), guardianPolicy, functionsOrchestrator, openRouter, chatClient, authAuth, temporalEnv))
auth.Attach(mux, auth.NewService(logger, db, sessionManager, auth.AuthConfigurations{
SpeakeasyServerAddress: c.String("speakeasy-server-address"),
diff --git a/server/design/gram.go b/server/design/gram.go
index 3aa81abb3..613ca27c5 100644
--- a/server/design/gram.go
+++ b/server/design/gram.go
@@ -15,6 +15,7 @@ import (
_ "github.com/speakeasy-api/gram/server/design/environments"
_ "github.com/speakeasy-api/gram/server/design/externalmcp"
_ "github.com/speakeasy-api/gram/server/design/functions"
+ _ "github.com/speakeasy-api/gram/server/design/hooks"
_ "github.com/speakeasy-api/gram/server/design/instances"
_ "github.com/speakeasy-api/gram/server/design/integrations"
_ "github.com/speakeasy-api/gram/server/design/keys"
diff --git a/server/design/hooks/design.go b/server/design/hooks/design.go
new file mode 100644
index 000000000..92aa57317
--- /dev/null
+++ b/server/design/hooks/design.go
@@ -0,0 +1,103 @@
+package hooks
+
+import (
+ "github.com/speakeasy-api/gram/server/design/security"
+ "github.com/speakeasy-api/gram/server/design/shared"
+ . "goa.design/goa/v3/dsl"
+)
+
+var HookResult = Type("HookResult", func() {
+ Required("ok")
+ Attribute("ok", Boolean, "Whether the hook was received successfully")
+})
+
+var PreToolUsePayload = Type("PreToolUsePayload", func() {
+ Required("tool_name")
+ Attribute("tool_name", String, "The name of the tool being invoked")
+ Attribute("tool_input", Any, "The input to the tool")
+})
+
+var PostToolUsePayload = Type("PostToolUsePayload", func() {
+ Required("tool_name")
+ Attribute("tool_name", String, "The name of the tool that was invoked")
+ Attribute("tool_input", Any, "The input to the tool")
+ Attribute("tool_response", Any, "The response from the tool")
+})
+
+var PostToolUseFailurePayload = Type("PostToolUseFailurePayload", func() {
+ Required("tool_name")
+ Attribute("tool_name", String, "The name of the tool that failed")
+ Attribute("tool_input", Any, "The input to the tool")
+ Attribute("tool_error", Any, "The error from the tool")
+})
+
+var _ = Service("hooks", func() {
+ Meta("openapi:generate", "false")
+ Description("Receives Claude Code hook events for tool usage observability.")
+
+ Security(security.ByKey, security.ProjectSlug, func() {
+ Scope("consumer")
+ })
+
+ shared.DeclareErrorResponses()
+
+ Method("preToolUse", func() {
+ Description("Called before a tool is executed.")
+
+ Security(security.ByKey, security.ProjectSlug, func() {
+ Scope("consumer")
+ })
+
+ Payload(func() {
+ Extend(PreToolUsePayload)
+ security.ByKeyPayload()
+ security.ProjectPayload()
+ })
+ Result(HookResult)
+ HTTP(func() {
+ POST("/rpc/hooks.preToolUse")
+ security.ByKeyHeader()
+ security.ProjectHeader()
+ })
+ })
+
+ Method("postToolUse", func() {
+ Description("Called after a tool executes successfully.")
+
+ Security(security.ByKey, security.ProjectSlug, func() {
+ Scope("consumer")
+ })
+
+ Payload(func() {
+ Extend(PostToolUsePayload)
+ security.ByKeyPayload()
+ security.ProjectPayload()
+ })
+ Result(HookResult)
+ HTTP(func() {
+ POST("/rpc/hooks.postToolUse")
+ security.ByKeyHeader()
+ security.ProjectHeader()
+ })
+ })
+
+ Method("postToolUseFailure", func() {
+ Description("Called after a tool execution fails.")
+
+ Security(security.ByKey, security.ProjectSlug, func() {
+ Scope("consumer")
+ })
+
+ Payload(func() {
+ Extend(PostToolUseFailurePayload)
+ security.ByKeyPayload()
+ security.ProjectPayload()
+ })
+ Result(HookResult)
+ HTTP(func() {
+ POST("/rpc/hooks.postToolUseFailure")
+ security.ByKeyHeader()
+ security.ProjectHeader()
+ })
+ })
+})
diff --git a/server/design/telemetry/design.go b/server/design/telemetry/design.go
index 22bdea36a..88bf9f5dd 100644
--- a/server/design/telemetry/design.go
+++ b/server/design/telemetry/design.go
@@ -479,6 +479,9 @@ var ToolCallSummary = Type("ToolCallSummary", func() {
Attribute("log_count", UInt64, "Total number of logs in this tool call")
Attribute("http_status_code", Int32, "HTTP status code (if applicable)")
Attribute("gram_urn", String, "Gram URN associated with this tool call")
+ Attribute("tool_name", String, "Tool name (from attributes.gram.tool.name)")
+ Attribute("tool_source", String, "Tool call source (from attributes.gram.tool_call.source)")
+ Attribute("event_source", String, "Event source (from attributes.gram.event.source)")
Required(
"trace_id",
diff --git a/server/gen/hooks/client.go b/server/gen/hooks/client.go
new file mode 100644
index 000000000..44fcaffc1
--- /dev/null
+++ b/server/gen/hooks/client.go
@@ -0,0 +1,97 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// hooks client
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package hooks
+
+import (
+ "context"
+
+ goa "goa.design/goa/v3/pkg"
+)
+
+// Client is the "hooks" service client.
+type Client struct {
+ PreToolUseEndpoint goa.Endpoint
+ PostToolUseEndpoint goa.Endpoint
+ PostToolUseFailureEndpoint goa.Endpoint
+}
+
+// NewClient initializes a "hooks" service client given the endpoints.
+func NewClient(preToolUse, postToolUse, postToolUseFailure goa.Endpoint) *Client {
+ return &Client{
+ PreToolUseEndpoint: preToolUse,
+ PostToolUseEndpoint: postToolUse,
+ PostToolUseFailureEndpoint: postToolUseFailure,
+ }
+}
+
+// PreToolUse calls the "preToolUse" endpoint of the "hooks" service.
+// PreToolUse may return the following errors:
+// - "unauthorized" (type *goa.ServiceError): unauthorized access
+// - "forbidden" (type *goa.ServiceError): permission denied
+// - "bad_request" (type *goa.ServiceError): request is invalid
+// - "not_found" (type *goa.ServiceError): resource not found
+// - "conflict" (type *goa.ServiceError): resource already exists
+// - "unsupported_media" (type *goa.ServiceError): unsupported media type
+// - "invalid" (type *goa.ServiceError): request contains one or more invalidation fields
+// - "invariant_violation" (type *goa.ServiceError): an unexpected error occurred
+// - "unexpected" (type *goa.ServiceError): an unexpected error occurred
+// - "gateway_error" (type *goa.ServiceError): an unexpected error occurred
+// - error: internal error
+func (c *Client) PreToolUse(ctx context.Context, p *PreToolUsePayload) (res *HookResult, err error) {
+ var ires any
+ ires, err = c.PreToolUseEndpoint(ctx, p)
+ if err != nil {
+ return
+ }
+ return ires.(*HookResult), nil
+}
+
+// PostToolUse calls the "postToolUse" endpoint of the "hooks" service.
+// PostToolUse may return the following errors:
+// - "unauthorized" (type *goa.ServiceError): unauthorized access
+// - "forbidden" (type *goa.ServiceError): permission denied
+// - "bad_request" (type *goa.ServiceError): request is invalid
+// - "not_found" (type *goa.ServiceError): resource not found
+// - "conflict" (type *goa.ServiceError): resource already exists
+// - "unsupported_media" (type *goa.ServiceError): unsupported media type
+// - "invalid" (type *goa.ServiceError): request contains one or more invalidation fields
+// - "invariant_violation" (type *goa.ServiceError): an unexpected error occurred
+// - "unexpected" (type *goa.ServiceError): an unexpected error occurred
+// - "gateway_error" (type *goa.ServiceError): an unexpected error occurred
+// - error: internal error
+func (c *Client) PostToolUse(ctx context.Context, p *PostToolUsePayload) (res *HookResult, err error) {
+ var ires any
+ ires, err = c.PostToolUseEndpoint(ctx, p)
+ if err != nil {
+ return
+ }
+ return ires.(*HookResult), nil
+}
+
+// PostToolUseFailure calls the "postToolUseFailure" endpoint of the "hooks"
+// service.
+// PostToolUseFailure may return the following errors:
+// - "unauthorized" (type *goa.ServiceError): unauthorized access
+// - "forbidden" (type *goa.ServiceError): permission denied
+// - "bad_request" (type *goa.ServiceError): request is invalid
+// - "not_found" (type *goa.ServiceError): resource not found
+// - "conflict" (type *goa.ServiceError): resource already exists
+// - "unsupported_media" (type *goa.ServiceError): unsupported media type
+// - "invalid" (type *goa.ServiceError): request contains one or more invalidation fields
+// - "invariant_violation" (type *goa.ServiceError): an unexpected error occurred
+// - "unexpected" (type *goa.ServiceError): an unexpected error occurred
+// - "gateway_error" (type *goa.ServiceError): an unexpected error occurred
+// - error: internal error
+func (c *Client) PostToolUseFailure(ctx context.Context, p *PostToolUseFailurePayload) (res *HookResult, err error) {
+ var ires any
+ ires, err = c.PostToolUseFailureEndpoint(ctx, p)
+ if err != nil {
+ return
+ }
+ return ires.(*HookResult), nil
+}
diff --git a/server/gen/hooks/endpoints.go b/server/gen/hooks/endpoints.go
new file mode 100644
index 000000000..3f861c57e
--- /dev/null
+++ b/server/gen/hooks/endpoints.go
@@ -0,0 +1,145 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// hooks endpoints
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package hooks
+
+import (
+ "context"
+
+ goa "goa.design/goa/v3/pkg"
+ "goa.design/goa/v3/security"
+)
+
+// Endpoints wraps the "hooks" service endpoints.
+type Endpoints struct {
+ PreToolUse goa.Endpoint
+ PostToolUse goa.Endpoint
+ PostToolUseFailure goa.Endpoint
+}
+
+// NewEndpoints wraps the methods of the "hooks" service with endpoints.
+func NewEndpoints(s Service) *Endpoints {
+ // Casting service to Auther interface
+ a := s.(Auther)
+ return &Endpoints{
+ PreToolUse: NewPreToolUseEndpoint(s, a.APIKeyAuth),
+ PostToolUse: NewPostToolUseEndpoint(s, a.APIKeyAuth),
+ PostToolUseFailure: NewPostToolUseFailureEndpoint(s, a.APIKeyAuth),
+ }
+}
+
+// Use applies the given middleware to all the "hooks" service endpoints.
+func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint) {
+ e.PreToolUse = m(e.PreToolUse)
+ e.PostToolUse = m(e.PostToolUse)
+ e.PostToolUseFailure = m(e.PostToolUseFailure)
+}
+
+// NewPreToolUseEndpoint returns an endpoint function that calls the method
+// "preToolUse" of service "hooks".
+func NewPreToolUseEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint {
+ return func(ctx context.Context, req any) (any, error) {
+ p := req.(*PreToolUsePayload)
+ var err error
+ sc := security.APIKeyScheme{
+ Name: "apikey",
+ Scopes: []string{"consumer", "producer", "chat"},
+ RequiredScopes: []string{"consumer"},
+ }
+ var key string
+ if p.ApikeyToken != nil {
+ key = *p.ApikeyToken
+ }
+ ctx, err = authAPIKeyFn(ctx, key, &sc)
+ if err == nil {
+ sc := security.APIKeyScheme{
+ Name: "project_slug",
+ Scopes: []string{},
+ RequiredScopes: []string{"consumer"},
+ }
+ var key string
+ if p.ProjectSlugInput != nil {
+ key = *p.ProjectSlugInput
+ }
+ ctx, err = authAPIKeyFn(ctx, key, &sc)
+ }
+ if err != nil {
+ return nil, err
+ }
+ return s.PreToolUse(ctx, p)
+ }
+}
+
+// NewPostToolUseEndpoint returns an endpoint function that calls the method
+// "postToolUse" of service "hooks".
+func NewPostToolUseEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint {
+ return func(ctx context.Context, req any) (any, error) {
+ p := req.(*PostToolUsePayload)
+ var err error
+ sc := security.APIKeyScheme{
+ Name: "apikey",
+ Scopes: []string{"consumer", "producer", "chat"},
+ RequiredScopes: []string{"consumer"},
+ }
+ var key string
+ if p.ApikeyToken != nil {
+ key = *p.ApikeyToken
+ }
+ ctx, err = authAPIKeyFn(ctx, key, &sc)
+ if err == nil {
+ sc := security.APIKeyScheme{
+ Name: "project_slug",
+ Scopes: []string{},
+ RequiredScopes: []string{"consumer"},
+ }
+ var key string
+ if p.ProjectSlugInput != nil {
+ key = *p.ProjectSlugInput
+ }
+ ctx, err = authAPIKeyFn(ctx, key, &sc)
+ }
+ if err != nil {
+ return nil, err
+ }
+ return s.PostToolUse(ctx, p)
+ }
+}
+
+// NewPostToolUseFailureEndpoint returns an endpoint function that calls the
+// method "postToolUseFailure" of service "hooks".
+func NewPostToolUseFailureEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint {
+ return func(ctx context.Context, req any) (any, error) {
+ p := req.(*PostToolUseFailurePayload)
+ var err error
+ sc := security.APIKeyScheme{
+ Name: "apikey",
+ Scopes: []string{"consumer", "producer", "chat"},
+ RequiredScopes: []string{"consumer"},
+ }
+ var key string
+ if p.ApikeyToken != nil {
+ key = *p.ApikeyToken
+ }
+ ctx, err = authAPIKeyFn(ctx, key, &sc)
+ if err == nil {
+ sc := security.APIKeyScheme{
+ Name: "project_slug",
+ Scopes: []string{},
+ RequiredScopes: []string{"consumer"},
+ }
+ var key string
+ if p.ProjectSlugInput != nil {
+ key = *p.ProjectSlugInput
+ }
+ ctx, err = authAPIKeyFn(ctx, key, &sc)
+ }
+ if err != nil {
+ return nil, err
+ }
+ return s.PostToolUseFailure(ctx, p)
+ }
+}
diff --git a/server/gen/hooks/service.go b/server/gen/hooks/service.go
new file mode 100644
index 000000000..c30b920bb
--- /dev/null
+++ b/server/gen/hooks/service.go
@@ -0,0 +1,139 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// hooks service
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package hooks
+
+import (
+ "context"
+
+ goa "goa.design/goa/v3/pkg"
+ "goa.design/goa/v3/security"
+)
+
+// Receives Claude Code hook events for tool usage observability.
+type Service interface {
+ // Called before a tool is executed.
+ PreToolUse(context.Context, *PreToolUsePayload) (res *HookResult, err error)
+ // Called after a tool executes successfully.
+ PostToolUse(context.Context, *PostToolUsePayload) (res *HookResult, err error)
+ // Called after a tool execution fails.
+ PostToolUseFailure(context.Context, *PostToolUseFailurePayload) (res *HookResult, err error)
+}
+
+// Auther defines the authorization functions to be implemented by the service.
+type Auther interface {
+ // APIKeyAuth implements the authorization logic for the APIKey security scheme.
+ APIKeyAuth(ctx context.Context, key string, schema *security.APIKeyScheme) (context.Context, error)
+}
+
+// APIName is the name of the API as defined in the design.
+const APIName = "gram"
+
+// APIVersion is the version of the API as defined in the design.
+const APIVersion = "0.0.1"
+
+// ServiceName is the name of the service as defined in the design. This is the
+// same value that is set in the endpoint request contexts under the ServiceKey
+// key.
+const ServiceName = "hooks"
+
+// MethodNames lists the service method names as defined in the design. These
+// are the same values that are set in the endpoint request contexts under the
+// MethodKey key.
+var MethodNames = [3]string{"preToolUse", "postToolUse", "postToolUseFailure"}
+
+// HookResult is the result type of the hooks service preToolUse method.
+type HookResult struct {
+ // Whether the hook was received successfully
+ OK bool
+}
+
+// PostToolUseFailurePayload is the payload type of the hooks service
+// postToolUseFailure method.
+type PostToolUseFailurePayload struct {
+ ApikeyToken *string
+ ProjectSlugInput *string
+ // The name of the tool that failed
+ ToolName string
+ // The input to the tool
+ ToolInput any
+ // The error from the tool
+ ToolError any
+}
+
+// PostToolUsePayload is the payload type of the hooks service postToolUse
+// method.
+type PostToolUsePayload struct {
+ ApikeyToken *string
+ ProjectSlugInput *string
+ // The name of the tool that was invoked
+ ToolName string
+ // The input to the tool
+ ToolInput any
+ // The response from the tool
+ ToolResponse any
+}
+
+// PreToolUsePayload is the payload type of the hooks service preToolUse method.
+type PreToolUsePayload struct {
+ ApikeyToken *string
+ ProjectSlugInput *string
+ // The name of the tool being invoked
+ ToolName string
+ // The input to the tool
+ ToolInput any
+}
+
+// MakeUnauthorized builds a goa.ServiceError from an error.
+func MakeUnauthorized(err error) *goa.ServiceError {
+ return goa.NewServiceError(err, "unauthorized", false, false, false)
+}
+
+// MakeForbidden builds a goa.ServiceError from an error.
+func MakeForbidden(err error) *goa.ServiceError {
+ return goa.NewServiceError(err, "forbidden", false, false, false)
+}
+
+// MakeBadRequest builds a goa.ServiceError from an error.
+func MakeBadRequest(err error) *goa.ServiceError {
+ return goa.NewServiceError(err, "bad_request", false, false, false)
+}
+
+// MakeNotFound builds a goa.ServiceError from an error.
+func MakeNotFound(err error) *goa.ServiceError {
+ return goa.NewServiceError(err, "not_found", false, false, false)
+}
+
+// MakeConflict builds a goa.ServiceError from an error.
+func MakeConflict(err error) *goa.ServiceError {
+ return goa.NewServiceError(err, "conflict", false, false, false)
+}
+
+// MakeUnsupportedMedia builds a goa.ServiceError from an error.
+func MakeUnsupportedMedia(err error) *goa.ServiceError {
+ return goa.NewServiceError(err, "unsupported_media", false, false, false)
+}
+
+// MakeInvalid builds a goa.ServiceError from an error.
+func MakeInvalid(err error) *goa.ServiceError {
+ return goa.NewServiceError(err, "invalid", false, false, false)
+}
+
+// MakeInvariantViolation builds a goa.ServiceError from an error.
+func MakeInvariantViolation(err error) *goa.ServiceError {
+ return goa.NewServiceError(err, "invariant_violation", false, false, true)
+}
+
+// MakeUnexpected builds a goa.ServiceError from an error.
+func MakeUnexpected(err error) *goa.ServiceError {
+ return goa.NewServiceError(err, "unexpected", false, false, true)
+}
+
+// MakeGatewayError builds a goa.ServiceError from an error.
+func MakeGatewayError(err error) *goa.ServiceError {
+ return goa.NewServiceError(err, "gateway_error", false, false, true)
+}
diff --git a/server/gen/http/cli/gram/cli.go b/server/gen/http/cli/gram/cli.go
index f16c4a431..30f197d3f 100644
--- a/server/gen/http/cli/gram/cli.go
+++ b/server/gen/http/cli/gram/cli.go
@@ -24,6 +24,7 @@ import (
environmentsc "github.com/speakeasy-api/gram/server/gen/http/environments/client"
featuresc "github.com/speakeasy-api/gram/server/gen/http/features/client"
functionsc "github.com/speakeasy-api/gram/server/gen/http/functions/client"
+ hooksc "github.com/speakeasy-api/gram/server/gen/http/hooks/client"
instancesc "github.com/speakeasy-api/gram/server/gen/http/instances/client"
integrationsc "github.com/speakeasy-api/gram/server/gen/http/integrations/client"
keysc "github.com/speakeasy-api/gram/server/gen/http/keys/client"
@@ -59,6 +60,7 @@ func UsageCommands() []string {
"environments (create-environment|list-environments|update-environment|delete-environment|set-source-environment-link|delete-source-environment-link|get-source-environment|set-toolset-environment-link|delete-toolset-environment-link|get-toolset-environment)",
"mcp-registries list-catalog",
"functions get-signed-asset-url",
+ "hooks (pre-tool-use|post-tool-use|post-tool-use-failure)",
"instances get-instance",
"integrations (get|list)",
"keys (create-key|list-keys|revoke-key|verify-key)",
@@ -413,6 +415,23 @@ func ParseEndpoint(
functionsGetSignedAssetURLBodyFlag = functionsGetSignedAssetURLFlags.String("body", "REQUIRED", "")
functionsGetSignedAssetURLFunctionTokenFlag = functionsGetSignedAssetURLFlags.String("function-token", "", "")
+ hooksFlags = flag.NewFlagSet("hooks", flag.ContinueOnError)
+
+ hooksPreToolUseFlags = flag.NewFlagSet("pre-tool-use", flag.ExitOnError)
+ hooksPreToolUseBodyFlag = hooksPreToolUseFlags.String("body", "REQUIRED", "")
+ hooksPreToolUseApikeyTokenFlag = hooksPreToolUseFlags.String("apikey-token", "", "")
+ hooksPreToolUseProjectSlugInputFlag = hooksPreToolUseFlags.String("project-slug-input", "", "")
+
+ hooksPostToolUseFlags = flag.NewFlagSet("post-tool-use", flag.ExitOnError)
+ hooksPostToolUseBodyFlag = hooksPostToolUseFlags.String("body", "REQUIRED", "")
+ hooksPostToolUseApikeyTokenFlag = hooksPostToolUseFlags.String("apikey-token", "", "")
+ hooksPostToolUseProjectSlugInputFlag = hooksPostToolUseFlags.String("project-slug-input", "", "")
+
+ hooksPostToolUseFailureFlags = flag.NewFlagSet("post-tool-use-failure", flag.ExitOnError)
+ hooksPostToolUseFailureBodyFlag = hooksPostToolUseFailureFlags.String("body", "REQUIRED", "")
+ hooksPostToolUseFailureApikeyTokenFlag = hooksPostToolUseFailureFlags.String("apikey-token", "", "")
+ hooksPostToolUseFailureProjectSlugInputFlag = hooksPostToolUseFailureFlags.String("project-slug-input", "", "")
+
instancesFlags = flag.NewFlagSet("instances", flag.ContinueOnError)
instancesGetInstanceFlags = flag.NewFlagSet("get-instance", flag.ExitOnError)
@@ -874,6 +893,11 @@ func ParseEndpoint(
functionsFlags.Usage = functionsUsage
functionsGetSignedAssetURLFlags.Usage = functionsGetSignedAssetURLUsage
+ hooksFlags.Usage = hooksUsage
+ hooksPreToolUseFlags.Usage = hooksPreToolUseUsage
+ hooksPostToolUseFlags.Usage = hooksPostToolUseUsage
+ hooksPostToolUseFailureFlags.Usage = hooksPostToolUseFailureUsage
+
instancesFlags.Usage = instancesUsage
instancesGetInstanceFlags.Usage = instancesGetInstanceUsage
@@ -1005,6 +1029,8 @@ func ParseEndpoint(
svcf = mcpRegistriesFlags
case "functions":
svcf = functionsFlags
+ case "hooks":
+ svcf = hooksFlags
case "instances":
svcf = instancesFlags
case "integrations":
@@ -1253,6 +1279,19 @@ func ParseEndpoint(
}
+ case "hooks":
+ switch epn {
+ case "pre-tool-use":
+ epf = hooksPreToolUseFlags
+
+ case "post-tool-use":
+ epf = hooksPostToolUseFlags
+
+ case "post-tool-use-failure":
+ epf = hooksPostToolUseFailureFlags
+
+ }
+
case "instances":
switch epn {
case "get-instance":
@@ -1739,6 +1778,19 @@ func ParseEndpoint(
endpoint = c.GetSignedAssetURL()
data, err = functionsc.BuildGetSignedAssetURLPayload(*functionsGetSignedAssetURLBodyFlag, *functionsGetSignedAssetURLFunctionTokenFlag)
}
+ case "hooks":
+ c := hooksc.NewClient(scheme, host, doer, enc, dec, restore)
+ switch epn {
+ case "pre-tool-use":
+ endpoint = c.PreToolUse()
+ data, err = hooksc.BuildPreToolUsePayload(*hooksPreToolUseBodyFlag, *hooksPreToolUseApikeyTokenFlag, *hooksPreToolUseProjectSlugInputFlag)
+ case "post-tool-use":
+ endpoint = c.PostToolUse()
+ data, err = hooksc.BuildPostToolUsePayload(*hooksPostToolUseBodyFlag, *hooksPostToolUseApikeyTokenFlag, *hooksPostToolUseProjectSlugInputFlag)
+ case "post-tool-use-failure":
+ endpoint = c.PostToolUseFailure()
+ data, err = hooksc.BuildPostToolUseFailurePayload(*hooksPostToolUseFailureBodyFlag, *hooksPostToolUseFailureApikeyTokenFlag, *hooksPostToolUseFailureProjectSlugInputFlag)
+ }
case "instances":
c := instancesc.NewClient(scheme, host, doer, enc, dec, restore)
switch epn {
@@ -3381,6 +3433,84 @@ func functionsGetSignedAssetURLUsage() {
fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "functions get-signed-asset-url --body '{\n \"asset_id\": \"abc123\"\n }' --function-token \"abc123\"")
}
+// hooksUsage displays the usage of the hooks command and its subcommands.
+func hooksUsage() {
+ fmt.Fprintln(os.Stderr, `Receives Claude Code hook events for tool usage observability.`)
+ fmt.Fprintf(os.Stderr, "Usage:\n %s [globalflags] hooks COMMAND [flags]\n\n", os.Args[0])
+ fmt.Fprintln(os.Stderr, "COMMAND:")
+ fmt.Fprintln(os.Stderr, ` pre-tool-use: Called before a tool is executed.`)
+ fmt.Fprintln(os.Stderr, ` post-tool-use: Called after a tool executes successfully.`)
+ fmt.Fprintln(os.Stderr, ` post-tool-use-failure: Called after a tool execution fails.`)
+ fmt.Fprintln(os.Stderr)
+ fmt.Fprintln(os.Stderr, "Additional help:")
+ fmt.Fprintf(os.Stderr, " %s hooks COMMAND --help\n", os.Args[0])
+}
+func hooksPreToolUseUsage() {
+ // Header with flags
+ fmt.Fprintf(os.Stderr, "%s [flags] hooks pre-tool-use", os.Args[0])
+ fmt.Fprint(os.Stderr, " -body JSON")
+ fmt.Fprint(os.Stderr, " -apikey-token STRING")
+ fmt.Fprint(os.Stderr, " -project-slug-input STRING")
+ fmt.Fprintln(os.Stderr)
+
+ // Description
+ fmt.Fprintln(os.Stderr)
+ fmt.Fprintln(os.Stderr, `Called before a tool is executed.`)
+
+ // Flags list
+ fmt.Fprintln(os.Stderr, ` -body JSON: `)
+ fmt.Fprintln(os.Stderr, ` -apikey-token STRING: `)
+ fmt.Fprintln(os.Stderr, ` -project-slug-input STRING: `)
+
+ fmt.Fprintln(os.Stderr)
+ fmt.Fprintln(os.Stderr, "Example:")
+ fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "hooks pre-tool-use --body '{\n \"tool_input\": \"abc123\",\n \"tool_name\": \"abc123\"\n }' --apikey-token \"abc123\" --project-slug-input \"abc123\"")
+}
+
+func hooksPostToolUseUsage() {
+ // Header with flags
+ fmt.Fprintf(os.Stderr, "%s [flags] hooks post-tool-use", os.Args[0])
+ fmt.Fprint(os.Stderr, " -body JSON")
+ fmt.Fprint(os.Stderr, " -apikey-token STRING")
+ fmt.Fprint(os.Stderr, " -project-slug-input STRING")
+ fmt.Fprintln(os.Stderr)
+
+ // Description
+ fmt.Fprintln(os.Stderr)
+ fmt.Fprintln(os.Stderr, `Called after a tool executes successfully.`)
+
+ // Flags list
+ fmt.Fprintln(os.Stderr, ` -body JSON: `)
+ fmt.Fprintln(os.Stderr, ` -apikey-token STRING: `)
+ fmt.Fprintln(os.Stderr, ` -project-slug-input STRING: `)
+
+ fmt.Fprintln(os.Stderr)
+ fmt.Fprintln(os.Stderr, "Example:")
+ fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "hooks post-tool-use --body '{\n \"tool_input\": \"abc123\",\n \"tool_name\": \"abc123\",\n \"tool_response\": \"abc123\"\n }' --apikey-token \"abc123\" --project-slug-input \"abc123\"")
+}
+
+func hooksPostToolUseFailureUsage() {
+ // Header with flags
+ fmt.Fprintf(os.Stderr, "%s [flags] hooks post-tool-use-failure", os.Args[0])
+ fmt.Fprint(os.Stderr, " -body JSON")
+ fmt.Fprint(os.Stderr, " -apikey-token STRING")
+ fmt.Fprint(os.Stderr, " -project-slug-input STRING")
+ fmt.Fprintln(os.Stderr)
+
+ // Description
+ fmt.Fprintln(os.Stderr)
+ fmt.Fprintln(os.Stderr, `Called after a tool execution fails.`)
+
+ // Flags list
+ fmt.Fprintln(os.Stderr, ` -body JSON: `)
+ fmt.Fprintln(os.Stderr, ` -apikey-token STRING: `)
+ fmt.Fprintln(os.Stderr, ` -project-slug-input STRING: `)
+
+ fmt.Fprintln(os.Stderr)
+ fmt.Fprintln(os.Stderr, "Example:")
+ fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "hooks post-tool-use-failure --body '{\n \"tool_error\": \"abc123\",\n \"tool_input\": \"abc123\",\n \"tool_name\": \"abc123\"\n }' --apikey-token \"abc123\" --project-slug-input \"abc123\"")
+}
+
// instancesUsage displays the usage of the instances command and its
// subcommands.
func instancesUsage() {
diff --git a/server/gen/http/hooks/client/cli.go b/server/gen/http/hooks/client/cli.go
new file mode 100644
index 000000000..ee4defdfa
--- /dev/null
+++ b/server/gen/http/hooks/client/cli.go
@@ -0,0 +1,116 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// hooks HTTP client CLI support package
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package client
+
+import (
+ "encoding/json"
+ "fmt"
+
+ hooks "github.com/speakeasy-api/gram/server/gen/hooks"
+)
+
+// BuildPreToolUsePayload builds the payload for the hooks preToolUse endpoint
+// from CLI flags.
+func BuildPreToolUsePayload(hooksPreToolUseBody string, hooksPreToolUseApikeyToken string, hooksPreToolUseProjectSlugInput string) (*hooks.PreToolUsePayload, error) {
+ var err error
+ var body PreToolUseRequestBody
+ {
+ err = json.Unmarshal([]byte(hooksPreToolUseBody), &body)
+ if err != nil {
+ return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"tool_input\": \"abc123\",\n \"tool_name\": \"abc123\"\n }'")
+ }
+ }
+ var apikeyToken *string
+ {
+ if hooksPreToolUseApikeyToken != "" {
+ apikeyToken = &hooksPreToolUseApikeyToken
+ }
+ }
+ var projectSlugInput *string
+ {
+ if hooksPreToolUseProjectSlugInput != "" {
+ projectSlugInput = &hooksPreToolUseProjectSlugInput
+ }
+ }
+ v := &hooks.PreToolUsePayload{
+ ToolName: body.ToolName,
+ ToolInput: body.ToolInput,
+ }
+ v.ApikeyToken = apikeyToken
+ v.ProjectSlugInput = projectSlugInput
+
+ return v, nil
+}
+
+// BuildPostToolUsePayload builds the payload for the hooks postToolUse
+// endpoint from CLI flags.
+func BuildPostToolUsePayload(hooksPostToolUseBody string, hooksPostToolUseApikeyToken string, hooksPostToolUseProjectSlugInput string) (*hooks.PostToolUsePayload, error) {
+ var err error
+ var body PostToolUseRequestBody
+ {
+ err = json.Unmarshal([]byte(hooksPostToolUseBody), &body)
+ if err != nil {
+ return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"tool_input\": \"abc123\",\n \"tool_name\": \"abc123\",\n \"tool_response\": \"abc123\"\n }'")
+ }
+ }
+ var apikeyToken *string
+ {
+ if hooksPostToolUseApikeyToken != "" {
+ apikeyToken = &hooksPostToolUseApikeyToken
+ }
+ }
+ var projectSlugInput *string
+ {
+ if hooksPostToolUseProjectSlugInput != "" {
+ projectSlugInput = &hooksPostToolUseProjectSlugInput
+ }
+ }
+ v := &hooks.PostToolUsePayload{
+ ToolName: body.ToolName,
+ ToolInput: body.ToolInput,
+ ToolResponse: body.ToolResponse,
+ }
+ v.ApikeyToken = apikeyToken
+ v.ProjectSlugInput = projectSlugInput
+
+ return v, nil
+}
+
+// BuildPostToolUseFailurePayload builds the payload for the hooks
+// postToolUseFailure endpoint from CLI flags.
+func BuildPostToolUseFailurePayload(hooksPostToolUseFailureBody string, hooksPostToolUseFailureApikeyToken string, hooksPostToolUseFailureProjectSlugInput string) (*hooks.PostToolUseFailurePayload, error) {
+ var err error
+ var body PostToolUseFailureRequestBody
+ {
+ err = json.Unmarshal([]byte(hooksPostToolUseFailureBody), &body)
+ if err != nil {
+ return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"tool_error\": \"abc123\",\n \"tool_input\": \"abc123\",\n \"tool_name\": \"abc123\"\n }'")
+ }
+ }
+ var apikeyToken *string
+ {
+ if hooksPostToolUseFailureApikeyToken != "" {
+ apikeyToken = &hooksPostToolUseFailureApikeyToken
+ }
+ }
+ var projectSlugInput *string
+ {
+ if hooksPostToolUseFailureProjectSlugInput != "" {
+ projectSlugInput = &hooksPostToolUseFailureProjectSlugInput
+ }
+ }
+ v := &hooks.PostToolUseFailurePayload{
+ ToolName: body.ToolName,
+ ToolInput: body.ToolInput,
+ ToolError: body.ToolError,
+ }
+ v.ApikeyToken = apikeyToken
+ v.ProjectSlugInput = projectSlugInput
+
+ return v, nil
+}
diff --git a/server/gen/http/hooks/client/client.go b/server/gen/http/hooks/client/client.go
new file mode 100644
index 000000000..c0893248f
--- /dev/null
+++ b/server/gen/http/hooks/client/client.go
@@ -0,0 +1,133 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// hooks client HTTP transport
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package client
+
+import (
+ "context"
+ "net/http"
+
+ goahttp "goa.design/goa/v3/http"
+ goa "goa.design/goa/v3/pkg"
+)
+
+// Client lists the hooks service endpoint HTTP clients.
+type Client struct {
+ // PreToolUse Doer is the HTTP client used to make requests to the preToolUse
+ // endpoint.
+ PreToolUseDoer goahttp.Doer
+
+ // PostToolUse Doer is the HTTP client used to make requests to the postToolUse
+ // endpoint.
+ PostToolUseDoer goahttp.Doer
+
+ // PostToolUseFailure Doer is the HTTP client used to make requests to the
+ // postToolUseFailure endpoint.
+ PostToolUseFailureDoer goahttp.Doer
+
+ // RestoreResponseBody controls whether the response bodies are reset after
+ // decoding so they can be read again.
+ RestoreResponseBody bool
+
+ scheme string
+ host string
+ encoder func(*http.Request) goahttp.Encoder
+ decoder func(*http.Response) goahttp.Decoder
+}
+
+// NewClient instantiates HTTP clients for all the hooks service servers.
+func NewClient(
+ scheme string,
+ host string,
+ doer goahttp.Doer,
+ enc func(*http.Request) goahttp.Encoder,
+ dec func(*http.Response) goahttp.Decoder,
+ restoreBody bool,
+) *Client {
+ return &Client{
+ PreToolUseDoer: doer,
+ PostToolUseDoer: doer,
+ PostToolUseFailureDoer: doer,
+ RestoreResponseBody: restoreBody,
+ scheme: scheme,
+ host: host,
+ decoder: dec,
+ encoder: enc,
+ }
+}
+
+// PreToolUse returns an endpoint that makes HTTP requests to the hooks service
+// preToolUse server.
+func (c *Client) PreToolUse() goa.Endpoint {
+ var (
+ encodeRequest = EncodePreToolUseRequest(c.encoder)
+ decodeResponse = DecodePreToolUseResponse(c.decoder, c.RestoreResponseBody)
+ )
+ return func(ctx context.Context, v any) (any, error) {
+ req, err := c.BuildPreToolUseRequest(ctx, v)
+ if err != nil {
+ return nil, err
+ }
+ err = encodeRequest(req, v)
+ if err != nil {
+ return nil, err
+ }
+ resp, err := c.PreToolUseDoer.Do(req)
+ if err != nil {
+ return nil, goahttp.ErrRequestError("hooks", "preToolUse", err)
+ }
+ return decodeResponse(resp)
+ }
+}
+
+// PostToolUse returns an endpoint that makes HTTP requests to the hooks
+// service postToolUse server.
+func (c *Client) PostToolUse() goa.Endpoint {
+ var (
+ encodeRequest = EncodePostToolUseRequest(c.encoder)
+ decodeResponse = DecodePostToolUseResponse(c.decoder, c.RestoreResponseBody)
+ )
+ return func(ctx context.Context, v any) (any, error) {
+ req, err := c.BuildPostToolUseRequest(ctx, v)
+ if err != nil {
+ return nil, err
+ }
+ err = encodeRequest(req, v)
+ if err != nil {
+ return nil, err
+ }
+ resp, err := c.PostToolUseDoer.Do(req)
+ if err != nil {
+ return nil, goahttp.ErrRequestError("hooks", "postToolUse", err)
+ }
+ return decodeResponse(resp)
+ }
+}
+
+// PostToolUseFailure returns an endpoint that makes HTTP requests to the hooks
+// service postToolUseFailure server.
+func (c *Client) PostToolUseFailure() goa.Endpoint {
+ var (
+ encodeRequest = EncodePostToolUseFailureRequest(c.encoder)
+ decodeResponse = DecodePostToolUseFailureResponse(c.decoder, c.RestoreResponseBody)
+ )
+ return func(ctx context.Context, v any) (any, error) {
+ req, err := c.BuildPostToolUseFailureRequest(ctx, v)
+ if err != nil {
+ return nil, err
+ }
+ err = encodeRequest(req, v)
+ if err != nil {
+ return nil, err
+ }
+ resp, err := c.PostToolUseFailureDoer.Do(req)
+ if err != nil {
+ return nil, goahttp.ErrRequestError("hooks", "postToolUseFailure", err)
+ }
+ return decodeResponse(resp)
+ }
+}
diff --git a/server/gen/http/hooks/client/encode_decode.go b/server/gen/http/hooks/client/encode_decode.go
new file mode 100644
index 000000000..dbbf3f1d0
--- /dev/null
+++ b/server/gen/http/hooks/client/encode_decode.go
@@ -0,0 +1,733 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// hooks HTTP client encoders and decoders
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package client
+
+import (
+ "bytes"
+ "context"
+ "io"
+ "net/http"
+ "net/url"
+
+ hooks "github.com/speakeasy-api/gram/server/gen/hooks"
+ goahttp "goa.design/goa/v3/http"
+)
+
+// BuildPreToolUseRequest instantiates a HTTP request object with method and
+// path set to call the "hooks" service "preToolUse" endpoint
+func (c *Client) BuildPreToolUseRequest(ctx context.Context, v any) (*http.Request, error) {
+ u := &url.URL{Scheme: c.scheme, Host: c.host, Path: PreToolUseHooksPath()}
+ req, err := http.NewRequest("POST", u.String(), nil)
+ if err != nil {
+ return nil, goahttp.ErrInvalidURL("hooks", "preToolUse", u.String(), err)
+ }
+ if ctx != nil {
+ req = req.WithContext(ctx)
+ }
+
+ return req, nil
+}
+
+// EncodePreToolUseRequest returns an encoder for requests sent to the hooks
+// preToolUse server.
+func EncodePreToolUseRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error {
+ return func(req *http.Request, v any) error {
+ p, ok := v.(*hooks.PreToolUsePayload)
+ if !ok {
+ return goahttp.ErrInvalidType("hooks", "preToolUse", "*hooks.PreToolUsePayload", v)
+ }
+ if p.ApikeyToken != nil {
+ head := *p.ApikeyToken
+ req.Header.Set("Gram-Key", head)
+ }
+ if p.ProjectSlugInput != nil {
+ head := *p.ProjectSlugInput
+ req.Header.Set("Gram-Project", head)
+ }
+ body := NewPreToolUseRequestBody(p)
+ if err := encoder(req).Encode(&body); err != nil {
+ return goahttp.ErrEncodingError("hooks", "preToolUse", err)
+ }
+ return nil
+ }
+}
+
+// DecodePreToolUseResponse returns a decoder for responses returned by the
+// hooks preToolUse endpoint. restoreBody controls whether the response body
+// should be restored after having been read.
+// DecodePreToolUseResponse may return the following errors:
+// - "unauthorized" (type *goa.ServiceError): http.StatusUnauthorized
+// - "forbidden" (type *goa.ServiceError): http.StatusForbidden
+// - "bad_request" (type *goa.ServiceError): http.StatusBadRequest
+// - "not_found" (type *goa.ServiceError): http.StatusNotFound
+// - "conflict" (type *goa.ServiceError): http.StatusConflict
+// - "unsupported_media" (type *goa.ServiceError): http.StatusUnsupportedMediaType
+// - "invalid" (type *goa.ServiceError): http.StatusUnprocessableEntity
+// - "invariant_violation" (type *goa.ServiceError): http.StatusInternalServerError
+// - "unexpected" (type *goa.ServiceError): http.StatusInternalServerError
+// - "gateway_error" (type *goa.ServiceError): http.StatusBadGateway
+// - error: internal error
+func DecodePreToolUseResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) {
+ return func(resp *http.Response) (any, error) {
+ if restoreBody {
+ b, err := io.ReadAll(resp.Body)
+ if err != nil {
+ return nil, err
+ }
+ resp.Body = io.NopCloser(bytes.NewBuffer(b))
+ defer func() {
+ resp.Body = io.NopCloser(bytes.NewBuffer(b))
+ }()
+ } else {
+ defer resp.Body.Close()
+ }
+ switch resp.StatusCode {
+ case http.StatusOK:
+ var (
+ body PreToolUseResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "preToolUse", err)
+ }
+ err = ValidatePreToolUseResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "preToolUse", err)
+ }
+ res := NewPreToolUseHookResultOK(&body)
+ return res, nil
+ case http.StatusUnauthorized:
+ var (
+ body PreToolUseUnauthorizedResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "preToolUse", err)
+ }
+ err = ValidatePreToolUseUnauthorizedResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "preToolUse", err)
+ }
+ return nil, NewPreToolUseUnauthorized(&body)
+ case http.StatusForbidden:
+ var (
+ body PreToolUseForbiddenResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "preToolUse", err)
+ }
+ err = ValidatePreToolUseForbiddenResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "preToolUse", err)
+ }
+ return nil, NewPreToolUseForbidden(&body)
+ case http.StatusBadRequest:
+ var (
+ body PreToolUseBadRequestResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "preToolUse", err)
+ }
+ err = ValidatePreToolUseBadRequestResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "preToolUse", err)
+ }
+ return nil, NewPreToolUseBadRequest(&body)
+ case http.StatusNotFound:
+ var (
+ body PreToolUseNotFoundResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "preToolUse", err)
+ }
+ err = ValidatePreToolUseNotFoundResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "preToolUse", err)
+ }
+ return nil, NewPreToolUseNotFound(&body)
+ case http.StatusConflict:
+ var (
+ body PreToolUseConflictResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "preToolUse", err)
+ }
+ err = ValidatePreToolUseConflictResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "preToolUse", err)
+ }
+ return nil, NewPreToolUseConflict(&body)
+ case http.StatusUnsupportedMediaType:
+ var (
+ body PreToolUseUnsupportedMediaResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "preToolUse", err)
+ }
+ err = ValidatePreToolUseUnsupportedMediaResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "preToolUse", err)
+ }
+ return nil, NewPreToolUseUnsupportedMedia(&body)
+ case http.StatusUnprocessableEntity:
+ var (
+ body PreToolUseInvalidResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "preToolUse", err)
+ }
+ err = ValidatePreToolUseInvalidResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "preToolUse", err)
+ }
+ return nil, NewPreToolUseInvalid(&body)
+ case http.StatusInternalServerError:
+ en := resp.Header.Get("goa-error")
+ switch en {
+ case "invariant_violation":
+ var (
+ body PreToolUseInvariantViolationResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "preToolUse", err)
+ }
+ err = ValidatePreToolUseInvariantViolationResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "preToolUse", err)
+ }
+ return nil, NewPreToolUseInvariantViolation(&body)
+ case "unexpected":
+ var (
+ body PreToolUseUnexpectedResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "preToolUse", err)
+ }
+ err = ValidatePreToolUseUnexpectedResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "preToolUse", err)
+ }
+ return nil, NewPreToolUseUnexpected(&body)
+ default:
+ body, _ := io.ReadAll(resp.Body)
+ return nil, goahttp.ErrInvalidResponse("hooks", "preToolUse", resp.StatusCode, string(body))
+ }
+ case http.StatusBadGateway:
+ var (
+ body PreToolUseGatewayErrorResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "preToolUse", err)
+ }
+ err = ValidatePreToolUseGatewayErrorResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "preToolUse", err)
+ }
+ return nil, NewPreToolUseGatewayError(&body)
+ default:
+ body, _ := io.ReadAll(resp.Body)
+ return nil, goahttp.ErrInvalidResponse("hooks", "preToolUse", resp.StatusCode, string(body))
+ }
+ }
+}
+
+// BuildPostToolUseRequest instantiates a HTTP request object with method and
+// path set to call the "hooks" service "postToolUse" endpoint
+func (c *Client) BuildPostToolUseRequest(ctx context.Context, v any) (*http.Request, error) {
+ u := &url.URL{Scheme: c.scheme, Host: c.host, Path: PostToolUseHooksPath()}
+ req, err := http.NewRequest("POST", u.String(), nil)
+ if err != nil {
+ return nil, goahttp.ErrInvalidURL("hooks", "postToolUse", u.String(), err)
+ }
+ if ctx != nil {
+ req = req.WithContext(ctx)
+ }
+
+ return req, nil
+}
+
+// EncodePostToolUseRequest returns an encoder for requests sent to the hooks
+// postToolUse server.
+func EncodePostToolUseRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error {
+ return func(req *http.Request, v any) error {
+ p, ok := v.(*hooks.PostToolUsePayload)
+ if !ok {
+ return goahttp.ErrInvalidType("hooks", "postToolUse", "*hooks.PostToolUsePayload", v)
+ }
+ if p.ApikeyToken != nil {
+ head := *p.ApikeyToken
+ req.Header.Set("Gram-Key", head)
+ }
+ if p.ProjectSlugInput != nil {
+ head := *p.ProjectSlugInput
+ req.Header.Set("Gram-Project", head)
+ }
+ body := NewPostToolUseRequestBody(p)
+ if err := encoder(req).Encode(&body); err != nil {
+ return goahttp.ErrEncodingError("hooks", "postToolUse", err)
+ }
+ return nil
+ }
+}
+
+// DecodePostToolUseResponse returns a decoder for responses returned by the
+// hooks postToolUse endpoint. restoreBody controls whether the response body
+// should be restored after having been read.
+// DecodePostToolUseResponse may return the following errors:
+// - "unauthorized" (type *goa.ServiceError): http.StatusUnauthorized
+// - "forbidden" (type *goa.ServiceError): http.StatusForbidden
+// - "bad_request" (type *goa.ServiceError): http.StatusBadRequest
+// - "not_found" (type *goa.ServiceError): http.StatusNotFound
+// - "conflict" (type *goa.ServiceError): http.StatusConflict
+// - "unsupported_media" (type *goa.ServiceError): http.StatusUnsupportedMediaType
+// - "invalid" (type *goa.ServiceError): http.StatusUnprocessableEntity
+// - "invariant_violation" (type *goa.ServiceError): http.StatusInternalServerError
+// - "unexpected" (type *goa.ServiceError): http.StatusInternalServerError
+// - "gateway_error" (type *goa.ServiceError): http.StatusBadGateway
+// - error: internal error
+func DecodePostToolUseResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) {
+ return func(resp *http.Response) (any, error) {
+ if restoreBody {
+ b, err := io.ReadAll(resp.Body)
+ if err != nil {
+ return nil, err
+ }
+ resp.Body = io.NopCloser(bytes.NewBuffer(b))
+ defer func() {
+ resp.Body = io.NopCloser(bytes.NewBuffer(b))
+ }()
+ } else {
+ defer resp.Body.Close()
+ }
+ switch resp.StatusCode {
+ case http.StatusOK:
+ var (
+ body PostToolUseResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUse", err)
+ }
+ err = ValidatePostToolUseResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUse", err)
+ }
+ res := NewPostToolUseHookResultOK(&body)
+ return res, nil
+ case http.StatusUnauthorized:
+ var (
+ body PostToolUseUnauthorizedResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUse", err)
+ }
+ err = ValidatePostToolUseUnauthorizedResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUse", err)
+ }
+ return nil, NewPostToolUseUnauthorized(&body)
+ case http.StatusForbidden:
+ var (
+ body PostToolUseForbiddenResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUse", err)
+ }
+ err = ValidatePostToolUseForbiddenResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUse", err)
+ }
+ return nil, NewPostToolUseForbidden(&body)
+ case http.StatusBadRequest:
+ var (
+ body PostToolUseBadRequestResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUse", err)
+ }
+ err = ValidatePostToolUseBadRequestResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUse", err)
+ }
+ return nil, NewPostToolUseBadRequest(&body)
+ case http.StatusNotFound:
+ var (
+ body PostToolUseNotFoundResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUse", err)
+ }
+ err = ValidatePostToolUseNotFoundResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUse", err)
+ }
+ return nil, NewPostToolUseNotFound(&body)
+ case http.StatusConflict:
+ var (
+ body PostToolUseConflictResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUse", err)
+ }
+ err = ValidatePostToolUseConflictResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUse", err)
+ }
+ return nil, NewPostToolUseConflict(&body)
+ case http.StatusUnsupportedMediaType:
+ var (
+ body PostToolUseUnsupportedMediaResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUse", err)
+ }
+ err = ValidatePostToolUseUnsupportedMediaResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUse", err)
+ }
+ return nil, NewPostToolUseUnsupportedMedia(&body)
+ case http.StatusUnprocessableEntity:
+ var (
+ body PostToolUseInvalidResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUse", err)
+ }
+ err = ValidatePostToolUseInvalidResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUse", err)
+ }
+ return nil, NewPostToolUseInvalid(&body)
+ case http.StatusInternalServerError:
+ en := resp.Header.Get("goa-error")
+ switch en {
+ case "invariant_violation":
+ var (
+ body PostToolUseInvariantViolationResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUse", err)
+ }
+ err = ValidatePostToolUseInvariantViolationResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUse", err)
+ }
+ return nil, NewPostToolUseInvariantViolation(&body)
+ case "unexpected":
+ var (
+ body PostToolUseUnexpectedResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUse", err)
+ }
+ err = ValidatePostToolUseUnexpectedResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUse", err)
+ }
+ return nil, NewPostToolUseUnexpected(&body)
+ default:
+ body, _ := io.ReadAll(resp.Body)
+ return nil, goahttp.ErrInvalidResponse("hooks", "postToolUse", resp.StatusCode, string(body))
+ }
+ case http.StatusBadGateway:
+ var (
+ body PostToolUseGatewayErrorResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUse", err)
+ }
+ err = ValidatePostToolUseGatewayErrorResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUse", err)
+ }
+ return nil, NewPostToolUseGatewayError(&body)
+ default:
+ body, _ := io.ReadAll(resp.Body)
+ return nil, goahttp.ErrInvalidResponse("hooks", "postToolUse", resp.StatusCode, string(body))
+ }
+ }
+}
+
+// BuildPostToolUseFailureRequest instantiates a HTTP request object with
+// method and path set to call the "hooks" service "postToolUseFailure" endpoint
+func (c *Client) BuildPostToolUseFailureRequest(ctx context.Context, v any) (*http.Request, error) {
+ u := &url.URL{Scheme: c.scheme, Host: c.host, Path: PostToolUseFailureHooksPath()}
+ req, err := http.NewRequest("POST", u.String(), nil)
+ if err != nil {
+ return nil, goahttp.ErrInvalidURL("hooks", "postToolUseFailure", u.String(), err)
+ }
+ if ctx != nil {
+ req = req.WithContext(ctx)
+ }
+
+ return req, nil
+}
+
+// EncodePostToolUseFailureRequest returns an encoder for requests sent to the
+// hooks postToolUseFailure server.
+func EncodePostToolUseFailureRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error {
+ return func(req *http.Request, v any) error {
+ p, ok := v.(*hooks.PostToolUseFailurePayload)
+ if !ok {
+ return goahttp.ErrInvalidType("hooks", "postToolUseFailure", "*hooks.PostToolUseFailurePayload", v)
+ }
+ if p.ApikeyToken != nil {
+ head := *p.ApikeyToken
+ req.Header.Set("Gram-Key", head)
+ }
+ if p.ProjectSlugInput != nil {
+ head := *p.ProjectSlugInput
+ req.Header.Set("Gram-Project", head)
+ }
+ body := NewPostToolUseFailureRequestBody(p)
+ if err := encoder(req).Encode(&body); err != nil {
+ return goahttp.ErrEncodingError("hooks", "postToolUseFailure", err)
+ }
+ return nil
+ }
+}
+
+// DecodePostToolUseFailureResponse returns a decoder for responses returned by
+// the hooks postToolUseFailure endpoint. restoreBody controls whether the
+// response body should be restored after having been read.
+// DecodePostToolUseFailureResponse may return the following errors:
+// - "unauthorized" (type *goa.ServiceError): http.StatusUnauthorized
+// - "forbidden" (type *goa.ServiceError): http.StatusForbidden
+// - "bad_request" (type *goa.ServiceError): http.StatusBadRequest
+// - "not_found" (type *goa.ServiceError): http.StatusNotFound
+// - "conflict" (type *goa.ServiceError): http.StatusConflict
+// - "unsupported_media" (type *goa.ServiceError): http.StatusUnsupportedMediaType
+// - "invalid" (type *goa.ServiceError): http.StatusUnprocessableEntity
+// - "invariant_violation" (type *goa.ServiceError): http.StatusInternalServerError
+// - "unexpected" (type *goa.ServiceError): http.StatusInternalServerError
+// - "gateway_error" (type *goa.ServiceError): http.StatusBadGateway
+// - error: internal error
+func DecodePostToolUseFailureResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) {
+ return func(resp *http.Response) (any, error) {
+ if restoreBody {
+ b, err := io.ReadAll(resp.Body)
+ if err != nil {
+ return nil, err
+ }
+ resp.Body = io.NopCloser(bytes.NewBuffer(b))
+ defer func() {
+ resp.Body = io.NopCloser(bytes.NewBuffer(b))
+ }()
+ } else {
+ defer resp.Body.Close()
+ }
+ switch resp.StatusCode {
+ case http.StatusOK:
+ var (
+ body PostToolUseFailureResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUseFailure", err)
+ }
+ err = ValidatePostToolUseFailureResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUseFailure", err)
+ }
+ res := NewPostToolUseFailureHookResultOK(&body)
+ return res, nil
+ case http.StatusUnauthorized:
+ var (
+ body PostToolUseFailureUnauthorizedResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUseFailure", err)
+ }
+ err = ValidatePostToolUseFailureUnauthorizedResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUseFailure", err)
+ }
+ return nil, NewPostToolUseFailureUnauthorized(&body)
+ case http.StatusForbidden:
+ var (
+ body PostToolUseFailureForbiddenResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUseFailure", err)
+ }
+ err = ValidatePostToolUseFailureForbiddenResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUseFailure", err)
+ }
+ return nil, NewPostToolUseFailureForbidden(&body)
+ case http.StatusBadRequest:
+ var (
+ body PostToolUseFailureBadRequestResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUseFailure", err)
+ }
+ err = ValidatePostToolUseFailureBadRequestResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUseFailure", err)
+ }
+ return nil, NewPostToolUseFailureBadRequest(&body)
+ case http.StatusNotFound:
+ var (
+ body PostToolUseFailureNotFoundResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUseFailure", err)
+ }
+ err = ValidatePostToolUseFailureNotFoundResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUseFailure", err)
+ }
+ return nil, NewPostToolUseFailureNotFound(&body)
+ case http.StatusConflict:
+ var (
+ body PostToolUseFailureConflictResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUseFailure", err)
+ }
+ err = ValidatePostToolUseFailureConflictResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUseFailure", err)
+ }
+ return nil, NewPostToolUseFailureConflict(&body)
+ case http.StatusUnsupportedMediaType:
+ var (
+ body PostToolUseFailureUnsupportedMediaResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUseFailure", err)
+ }
+ err = ValidatePostToolUseFailureUnsupportedMediaResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUseFailure", err)
+ }
+ return nil, NewPostToolUseFailureUnsupportedMedia(&body)
+ case http.StatusUnprocessableEntity:
+ var (
+ body PostToolUseFailureInvalidResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUseFailure", err)
+ }
+ err = ValidatePostToolUseFailureInvalidResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUseFailure", err)
+ }
+ return nil, NewPostToolUseFailureInvalid(&body)
+ case http.StatusInternalServerError:
+ en := resp.Header.Get("goa-error")
+ switch en {
+ case "invariant_violation":
+ var (
+ body PostToolUseFailureInvariantViolationResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUseFailure", err)
+ }
+ err = ValidatePostToolUseFailureInvariantViolationResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUseFailure", err)
+ }
+ return nil, NewPostToolUseFailureInvariantViolation(&body)
+ case "unexpected":
+ var (
+ body PostToolUseFailureUnexpectedResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUseFailure", err)
+ }
+ err = ValidatePostToolUseFailureUnexpectedResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUseFailure", err)
+ }
+ return nil, NewPostToolUseFailureUnexpected(&body)
+ default:
+ body, _ := io.ReadAll(resp.Body)
+ return nil, goahttp.ErrInvalidResponse("hooks", "postToolUseFailure", resp.StatusCode, string(body))
+ }
+ case http.StatusBadGateway:
+ var (
+ body PostToolUseFailureGatewayErrorResponseBody
+ err error
+ )
+ err = decoder(resp).Decode(&body)
+ if err != nil {
+ return nil, goahttp.ErrDecodingError("hooks", "postToolUseFailure", err)
+ }
+ err = ValidatePostToolUseFailureGatewayErrorResponseBody(&body)
+ if err != nil {
+ return nil, goahttp.ErrValidationError("hooks", "postToolUseFailure", err)
+ }
+ return nil, NewPostToolUseFailureGatewayError(&body)
+ default:
+ body, _ := io.ReadAll(resp.Body)
+ return nil, goahttp.ErrInvalidResponse("hooks", "postToolUseFailure", resp.StatusCode, string(body))
+ }
+ }
+}
diff --git a/server/gen/http/hooks/client/paths.go b/server/gen/http/hooks/client/paths.go
new file mode 100644
index 000000000..b009bf09e
--- /dev/null
+++ b/server/gen/http/hooks/client/paths.go
@@ -0,0 +1,23 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// HTTP request path constructors for the hooks service.
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package client
+
+// PreToolUseHooksPath returns the URL path to the hooks service preToolUse HTTP endpoint.
+func PreToolUseHooksPath() string {
+ return "/rpc/hooks.preToolUse"
+}
+
+// PostToolUseHooksPath returns the URL path to the hooks service postToolUse HTTP endpoint.
+func PostToolUseHooksPath() string {
+ return "/rpc/hooks.postToolUse"
+}
+
+// PostToolUseFailureHooksPath returns the URL path to the hooks service postToolUseFailure HTTP endpoint.
+func PostToolUseFailureHooksPath() string {
+ return "/rpc/hooks.postToolUseFailure"
+}
diff --git a/server/gen/http/hooks/client/types.go b/server/gen/http/hooks/client/types.go
new file mode 100644
index 000000000..62f05a62e
--- /dev/null
+++ b/server/gen/http/hooks/client/types.go
@@ -0,0 +1,1869 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// hooks HTTP client types
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package client
+
+import (
+ hooks "github.com/speakeasy-api/gram/server/gen/hooks"
+ goa "goa.design/goa/v3/pkg"
+)
+
+// PreToolUseRequestBody is the type of the "hooks" service "preToolUse"
+// endpoint HTTP request body.
+type PreToolUseRequestBody struct {
+ // The name of the tool being invoked
+ ToolName string `form:"tool_name" json:"tool_name" xml:"tool_name"`
+ // The input to the tool
+ ToolInput any `form:"tool_input,omitempty" json:"tool_input,omitempty" xml:"tool_input,omitempty"`
+}
+
+// PostToolUseRequestBody is the type of the "hooks" service "postToolUse"
+// endpoint HTTP request body.
+type PostToolUseRequestBody struct {
+ // The name of the tool that was invoked
+ ToolName string `form:"tool_name" json:"tool_name" xml:"tool_name"`
+ // The input to the tool
+ ToolInput any `form:"tool_input,omitempty" json:"tool_input,omitempty" xml:"tool_input,omitempty"`
+ // The response from the tool
+ ToolResponse any `form:"tool_response,omitempty" json:"tool_response,omitempty" xml:"tool_response,omitempty"`
+}
+
+// PostToolUseFailureRequestBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP request body.
+type PostToolUseFailureRequestBody struct {
+ // The name of the tool that failed
+ ToolName string `form:"tool_name" json:"tool_name" xml:"tool_name"`
+ // The input to the tool
+ ToolInput any `form:"tool_input,omitempty" json:"tool_input,omitempty" xml:"tool_input,omitempty"`
+ // The error from the tool
+ ToolError any `form:"tool_error,omitempty" json:"tool_error,omitempty" xml:"tool_error,omitempty"`
+}
+
+// PreToolUseResponseBody is the type of the "hooks" service "preToolUse"
+// endpoint HTTP response body.
+type PreToolUseResponseBody struct {
+ // Whether the hook was received successfully
+ OK *bool `form:"ok,omitempty" json:"ok,omitempty" xml:"ok,omitempty"`
+}
+
+// PostToolUseResponseBody is the type of the "hooks" service "postToolUse"
+// endpoint HTTP response body.
+type PostToolUseResponseBody struct {
+ // Whether the hook was received successfully
+ OK *bool `form:"ok,omitempty" json:"ok,omitempty" xml:"ok,omitempty"`
+}
+
+// PostToolUseFailureResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body.
+type PostToolUseFailureResponseBody struct {
+ // Whether the hook was received successfully
+ OK *bool `form:"ok,omitempty" json:"ok,omitempty" xml:"ok,omitempty"`
+}
+
+// PreToolUseUnauthorizedResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "unauthorized" error.
+type PreToolUseUnauthorizedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PreToolUseForbiddenResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "forbidden" error.
+type PreToolUseForbiddenResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PreToolUseBadRequestResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "bad_request" error.
+type PreToolUseBadRequestResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PreToolUseNotFoundResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "not_found" error.
+type PreToolUseNotFoundResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PreToolUseConflictResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "conflict" error.
+type PreToolUseConflictResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PreToolUseUnsupportedMediaResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "unsupported_media" error.
+type PreToolUseUnsupportedMediaResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PreToolUseInvalidResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "invalid" error.
+type PreToolUseInvalidResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PreToolUseInvariantViolationResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "invariant_violation" error.
+type PreToolUseInvariantViolationResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PreToolUseUnexpectedResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "unexpected" error.
+type PreToolUseUnexpectedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PreToolUseGatewayErrorResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "gateway_error" error.
+type PreToolUseGatewayErrorResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseUnauthorizedResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "unauthorized" error.
+type PostToolUseUnauthorizedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseForbiddenResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "forbidden" error.
+type PostToolUseForbiddenResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseBadRequestResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "bad_request" error.
+type PostToolUseBadRequestResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseNotFoundResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "not_found" error.
+type PostToolUseNotFoundResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseConflictResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "conflict" error.
+type PostToolUseConflictResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseUnsupportedMediaResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "unsupported_media" error.
+type PostToolUseUnsupportedMediaResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseInvalidResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "invalid" error.
+type PostToolUseInvalidResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseInvariantViolationResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "invariant_violation"
+// error.
+type PostToolUseInvariantViolationResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseUnexpectedResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "unexpected" error.
+type PostToolUseUnexpectedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseGatewayErrorResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "gateway_error" error.
+type PostToolUseGatewayErrorResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseFailureUnauthorizedResponseBody is the type of the "hooks"
+// service "postToolUseFailure" endpoint HTTP response body for the
+// "unauthorized" error.
+type PostToolUseFailureUnauthorizedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseFailureForbiddenResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "forbidden" error.
+type PostToolUseFailureForbiddenResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseFailureBadRequestResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "bad_request" error.
+type PostToolUseFailureBadRequestResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseFailureNotFoundResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "not_found" error.
+type PostToolUseFailureNotFoundResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseFailureConflictResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "conflict" error.
+type PostToolUseFailureConflictResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseFailureUnsupportedMediaResponseBody is the type of the "hooks"
+// service "postToolUseFailure" endpoint HTTP response body for the
+// "unsupported_media" error.
+type PostToolUseFailureUnsupportedMediaResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseFailureInvalidResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "invalid" error.
+type PostToolUseFailureInvalidResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseFailureInvariantViolationResponseBody is the type of the "hooks"
+// service "postToolUseFailure" endpoint HTTP response body for the
+// "invariant_violation" error.
+type PostToolUseFailureInvariantViolationResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseFailureUnexpectedResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "unexpected" error.
+type PostToolUseFailureUnexpectedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// PostToolUseFailureGatewayErrorResponseBody is the type of the "hooks"
+// service "postToolUseFailure" endpoint HTTP response body for the
+// "gateway_error" error.
+type PostToolUseFailureGatewayErrorResponseBody struct {
+ // Name is the name of this class of errors.
+ Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
+ // Is the error temporary?
+ Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
+ // Is the error a timeout?
+ Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
+ // Is the error a server-side fault?
+ Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
+}
+
+// NewPreToolUseRequestBody builds the HTTP request body from the payload of
+// the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseRequestBody(p *hooks.PreToolUsePayload) *PreToolUseRequestBody {
+ body := &PreToolUseRequestBody{
+ ToolName: p.ToolName,
+ ToolInput: p.ToolInput,
+ }
+ return body
+}
+
+// NewPostToolUseRequestBody builds the HTTP request body from the payload of
+// the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseRequestBody(p *hooks.PostToolUsePayload) *PostToolUseRequestBody {
+ body := &PostToolUseRequestBody{
+ ToolName: p.ToolName,
+ ToolInput: p.ToolInput,
+ ToolResponse: p.ToolResponse,
+ }
+ return body
+}
+
+// NewPostToolUseFailureRequestBody builds the HTTP request body from the
+// payload of the "postToolUseFailure" endpoint of the "hooks" service.
+func NewPostToolUseFailureRequestBody(p *hooks.PostToolUseFailurePayload) *PostToolUseFailureRequestBody {
+ body := &PostToolUseFailureRequestBody{
+ ToolName: p.ToolName,
+ ToolInput: p.ToolInput,
+ ToolError: p.ToolError,
+ }
+ return body
+}
+
+// NewPreToolUseHookResultOK builds a "hooks" service "preToolUse" endpoint
+// result from a HTTP "OK" response.
+func NewPreToolUseHookResultOK(body *PreToolUseResponseBody) *hooks.HookResult {
+ v := &hooks.HookResult{
+ OK: *body.OK,
+ }
+
+ return v
+}
+
+// NewPreToolUseUnauthorized builds a hooks service preToolUse endpoint
+// unauthorized error.
+func NewPreToolUseUnauthorized(body *PreToolUseUnauthorizedResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPreToolUseForbidden builds a hooks service preToolUse endpoint forbidden
+// error.
+func NewPreToolUseForbidden(body *PreToolUseForbiddenResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPreToolUseBadRequest builds a hooks service preToolUse endpoint
+// bad_request error.
+func NewPreToolUseBadRequest(body *PreToolUseBadRequestResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPreToolUseNotFound builds a hooks service preToolUse endpoint not_found
+// error.
+func NewPreToolUseNotFound(body *PreToolUseNotFoundResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPreToolUseConflict builds a hooks service preToolUse endpoint conflict
+// error.
+func NewPreToolUseConflict(body *PreToolUseConflictResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPreToolUseUnsupportedMedia builds a hooks service preToolUse endpoint
+// unsupported_media error.
+func NewPreToolUseUnsupportedMedia(body *PreToolUseUnsupportedMediaResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPreToolUseInvalid builds a hooks service preToolUse endpoint invalid
+// error.
+func NewPreToolUseInvalid(body *PreToolUseInvalidResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPreToolUseInvariantViolation builds a hooks service preToolUse endpoint
+// invariant_violation error.
+func NewPreToolUseInvariantViolation(body *PreToolUseInvariantViolationResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPreToolUseUnexpected builds a hooks service preToolUse endpoint
+// unexpected error.
+func NewPreToolUseUnexpected(body *PreToolUseUnexpectedResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPreToolUseGatewayError builds a hooks service preToolUse endpoint
+// gateway_error error.
+func NewPreToolUseGatewayError(body *PreToolUseGatewayErrorResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseHookResultOK builds a "hooks" service "postToolUse" endpoint
+// result from a HTTP "OK" response.
+func NewPostToolUseHookResultOK(body *PostToolUseResponseBody) *hooks.HookResult {
+ v := &hooks.HookResult{
+ OK: *body.OK,
+ }
+
+ return v
+}
+
+// NewPostToolUseUnauthorized builds a hooks service postToolUse endpoint
+// unauthorized error.
+func NewPostToolUseUnauthorized(body *PostToolUseUnauthorizedResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseForbidden builds a hooks service postToolUse endpoint
+// forbidden error.
+func NewPostToolUseForbidden(body *PostToolUseForbiddenResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseBadRequest builds a hooks service postToolUse endpoint
+// bad_request error.
+func NewPostToolUseBadRequest(body *PostToolUseBadRequestResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseNotFound builds a hooks service postToolUse endpoint not_found
+// error.
+func NewPostToolUseNotFound(body *PostToolUseNotFoundResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseConflict builds a hooks service postToolUse endpoint conflict
+// error.
+func NewPostToolUseConflict(body *PostToolUseConflictResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseUnsupportedMedia builds a hooks service postToolUse endpoint
+// unsupported_media error.
+func NewPostToolUseUnsupportedMedia(body *PostToolUseUnsupportedMediaResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseInvalid builds a hooks service postToolUse endpoint invalid
+// error.
+func NewPostToolUseInvalid(body *PostToolUseInvalidResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseInvariantViolation builds a hooks service postToolUse endpoint
+// invariant_violation error.
+func NewPostToolUseInvariantViolation(body *PostToolUseInvariantViolationResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseUnexpected builds a hooks service postToolUse endpoint
+// unexpected error.
+func NewPostToolUseUnexpected(body *PostToolUseUnexpectedResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseGatewayError builds a hooks service postToolUse endpoint
+// gateway_error error.
+func NewPostToolUseGatewayError(body *PostToolUseGatewayErrorResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseFailureHookResultOK builds a "hooks" service
+// "postToolUseFailure" endpoint result from a HTTP "OK" response.
+func NewPostToolUseFailureHookResultOK(body *PostToolUseFailureResponseBody) *hooks.HookResult {
+ v := &hooks.HookResult{
+ OK: *body.OK,
+ }
+
+ return v
+}
+
+// NewPostToolUseFailureUnauthorized builds a hooks service postToolUseFailure
+// endpoint unauthorized error.
+func NewPostToolUseFailureUnauthorized(body *PostToolUseFailureUnauthorizedResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseFailureForbidden builds a hooks service postToolUseFailure
+// endpoint forbidden error.
+func NewPostToolUseFailureForbidden(body *PostToolUseFailureForbiddenResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseFailureBadRequest builds a hooks service postToolUseFailure
+// endpoint bad_request error.
+func NewPostToolUseFailureBadRequest(body *PostToolUseFailureBadRequestResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseFailureNotFound builds a hooks service postToolUseFailure
+// endpoint not_found error.
+func NewPostToolUseFailureNotFound(body *PostToolUseFailureNotFoundResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseFailureConflict builds a hooks service postToolUseFailure
+// endpoint conflict error.
+func NewPostToolUseFailureConflict(body *PostToolUseFailureConflictResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseFailureUnsupportedMedia builds a hooks service
+// postToolUseFailure endpoint unsupported_media error.
+func NewPostToolUseFailureUnsupportedMedia(body *PostToolUseFailureUnsupportedMediaResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseFailureInvalid builds a hooks service postToolUseFailure
+// endpoint invalid error.
+func NewPostToolUseFailureInvalid(body *PostToolUseFailureInvalidResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseFailureInvariantViolation builds a hooks service
+// postToolUseFailure endpoint invariant_violation error.
+func NewPostToolUseFailureInvariantViolation(body *PostToolUseFailureInvariantViolationResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseFailureUnexpected builds a hooks service postToolUseFailure
+// endpoint unexpected error.
+func NewPostToolUseFailureUnexpected(body *PostToolUseFailureUnexpectedResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// NewPostToolUseFailureGatewayError builds a hooks service postToolUseFailure
+// endpoint gateway_error error.
+func NewPostToolUseFailureGatewayError(body *PostToolUseFailureGatewayErrorResponseBody) *goa.ServiceError {
+ v := &goa.ServiceError{
+ Name: *body.Name,
+ ID: *body.ID,
+ Message: *body.Message,
+ Temporary: *body.Temporary,
+ Timeout: *body.Timeout,
+ Fault: *body.Fault,
+ }
+
+ return v
+}
+
+// ValidatePreToolUseResponseBody runs the validations defined on
+// PreToolUseResponseBody
+func ValidatePreToolUseResponseBody(body *PreToolUseResponseBody) (err error) {
+ if body.OK == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("ok", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseResponseBody runs the validations defined on
+// PostToolUseResponseBody
+func ValidatePostToolUseResponseBody(body *PostToolUseResponseBody) (err error) {
+ if body.OK == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("ok", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureResponseBody runs the validations defined on
+// PostToolUseFailureResponseBody
+func ValidatePostToolUseFailureResponseBody(body *PostToolUseFailureResponseBody) (err error) {
+ if body.OK == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("ok", "body"))
+ }
+ return
+}
+
+// ValidatePreToolUseUnauthorizedResponseBody runs the validations defined on
+// preToolUse_unauthorized_response_body
+func ValidatePreToolUseUnauthorizedResponseBody(body *PreToolUseUnauthorizedResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePreToolUseForbiddenResponseBody runs the validations defined on
+// preToolUse_forbidden_response_body
+func ValidatePreToolUseForbiddenResponseBody(body *PreToolUseForbiddenResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePreToolUseBadRequestResponseBody runs the validations defined on
+// preToolUse_bad_request_response_body
+func ValidatePreToolUseBadRequestResponseBody(body *PreToolUseBadRequestResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePreToolUseNotFoundResponseBody runs the validations defined on
+// preToolUse_not_found_response_body
+func ValidatePreToolUseNotFoundResponseBody(body *PreToolUseNotFoundResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePreToolUseConflictResponseBody runs the validations defined on
+// preToolUse_conflict_response_body
+func ValidatePreToolUseConflictResponseBody(body *PreToolUseConflictResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePreToolUseUnsupportedMediaResponseBody runs the validations defined
+// on preToolUse_unsupported_media_response_body
+func ValidatePreToolUseUnsupportedMediaResponseBody(body *PreToolUseUnsupportedMediaResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePreToolUseInvalidResponseBody runs the validations defined on
+// preToolUse_invalid_response_body
+func ValidatePreToolUseInvalidResponseBody(body *PreToolUseInvalidResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePreToolUseInvariantViolationResponseBody runs the validations
+// defined on preToolUse_invariant_violation_response_body
+func ValidatePreToolUseInvariantViolationResponseBody(body *PreToolUseInvariantViolationResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePreToolUseUnexpectedResponseBody runs the validations defined on
+// preToolUse_unexpected_response_body
+func ValidatePreToolUseUnexpectedResponseBody(body *PreToolUseUnexpectedResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePreToolUseGatewayErrorResponseBody runs the validations defined on
+// preToolUse_gateway_error_response_body
+func ValidatePreToolUseGatewayErrorResponseBody(body *PreToolUseGatewayErrorResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseUnauthorizedResponseBody runs the validations defined on
+// postToolUse_unauthorized_response_body
+func ValidatePostToolUseUnauthorizedResponseBody(body *PostToolUseUnauthorizedResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseForbiddenResponseBody runs the validations defined on
+// postToolUse_forbidden_response_body
+func ValidatePostToolUseForbiddenResponseBody(body *PostToolUseForbiddenResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseBadRequestResponseBody runs the validations defined on
+// postToolUse_bad_request_response_body
+func ValidatePostToolUseBadRequestResponseBody(body *PostToolUseBadRequestResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseNotFoundResponseBody runs the validations defined on
+// postToolUse_not_found_response_body
+func ValidatePostToolUseNotFoundResponseBody(body *PostToolUseNotFoundResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseConflictResponseBody runs the validations defined on
+// postToolUse_conflict_response_body
+func ValidatePostToolUseConflictResponseBody(body *PostToolUseConflictResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseUnsupportedMediaResponseBody runs the validations defined
+// on postToolUse_unsupported_media_response_body
+func ValidatePostToolUseUnsupportedMediaResponseBody(body *PostToolUseUnsupportedMediaResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseInvalidResponseBody runs the validations defined on
+// postToolUse_invalid_response_body
+func ValidatePostToolUseInvalidResponseBody(body *PostToolUseInvalidResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseInvariantViolationResponseBody runs the validations
+// defined on postToolUse_invariant_violation_response_body
+func ValidatePostToolUseInvariantViolationResponseBody(body *PostToolUseInvariantViolationResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseUnexpectedResponseBody runs the validations defined on
+// postToolUse_unexpected_response_body
+func ValidatePostToolUseUnexpectedResponseBody(body *PostToolUseUnexpectedResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseGatewayErrorResponseBody runs the validations defined on
+// postToolUse_gateway_error_response_body
+func ValidatePostToolUseGatewayErrorResponseBody(body *PostToolUseGatewayErrorResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureUnauthorizedResponseBody runs the validations
+// defined on postToolUseFailure_unauthorized_response_body
+func ValidatePostToolUseFailureUnauthorizedResponseBody(body *PostToolUseFailureUnauthorizedResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureForbiddenResponseBody runs the validations defined
+// on postToolUseFailure_forbidden_response_body
+func ValidatePostToolUseFailureForbiddenResponseBody(body *PostToolUseFailureForbiddenResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureBadRequestResponseBody runs the validations
+// defined on postToolUseFailure_bad_request_response_body
+func ValidatePostToolUseFailureBadRequestResponseBody(body *PostToolUseFailureBadRequestResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureNotFoundResponseBody runs the validations defined
+// on postToolUseFailure_not_found_response_body
+func ValidatePostToolUseFailureNotFoundResponseBody(body *PostToolUseFailureNotFoundResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureConflictResponseBody runs the validations defined
+// on postToolUseFailure_conflict_response_body
+func ValidatePostToolUseFailureConflictResponseBody(body *PostToolUseFailureConflictResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureUnsupportedMediaResponseBody runs the validations
+// defined on postToolUseFailure_unsupported_media_response_body
+func ValidatePostToolUseFailureUnsupportedMediaResponseBody(body *PostToolUseFailureUnsupportedMediaResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureInvalidResponseBody runs the validations defined
+// on postToolUseFailure_invalid_response_body
+func ValidatePostToolUseFailureInvalidResponseBody(body *PostToolUseFailureInvalidResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureInvariantViolationResponseBody runs the
+// validations defined on postToolUseFailure_invariant_violation_response_body
+func ValidatePostToolUseFailureInvariantViolationResponseBody(body *PostToolUseFailureInvariantViolationResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureUnexpectedResponseBody runs the validations
+// defined on postToolUseFailure_unexpected_response_body
+func ValidatePostToolUseFailureUnexpectedResponseBody(body *PostToolUseFailureUnexpectedResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureGatewayErrorResponseBody runs the validations
+// defined on postToolUseFailure_gateway_error_response_body
+func ValidatePostToolUseFailureGatewayErrorResponseBody(body *PostToolUseFailureGatewayErrorResponseBody) (err error) {
+ if body.Name == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("name", "body"))
+ }
+ if body.ID == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("id", "body"))
+ }
+ if body.Message == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("message", "body"))
+ }
+ if body.Temporary == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("temporary", "body"))
+ }
+ if body.Timeout == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("timeout", "body"))
+ }
+ if body.Fault == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("fault", "body"))
+ }
+ return
+}
diff --git a/server/gen/http/hooks/server/encode_decode.go b/server/gen/http/hooks/server/encode_decode.go
new file mode 100644
index 000000000..ed6961bdc
--- /dev/null
+++ b/server/gen/http/hooks/server/encode_decode.go
@@ -0,0 +1,695 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// hooks HTTP server encoders and decoders
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package server
+
+import (
+ "context"
+ "errors"
+ "io"
+ "net/http"
+ "strings"
+
+ hooks "github.com/speakeasy-api/gram/server/gen/hooks"
+ goahttp "goa.design/goa/v3/http"
+ goa "goa.design/goa/v3/pkg"
+)
+
+// EncodePreToolUseResponse returns an encoder for responses returned by the
+// hooks preToolUse endpoint.
+func EncodePreToolUseResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error {
+ return func(ctx context.Context, w http.ResponseWriter, v any) error {
+ res, _ := v.(*hooks.HookResult)
+ enc := encoder(ctx, w)
+ body := NewPreToolUseResponseBody(res)
+ w.WriteHeader(http.StatusOK)
+ return enc.Encode(body)
+ }
+}
+
+// DecodePreToolUseRequest returns a decoder for requests sent to the hooks
+// preToolUse endpoint.
+func DecodePreToolUseRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*hooks.PreToolUsePayload, error) {
+ return func(r *http.Request) (*hooks.PreToolUsePayload, error) {
+ var payload *hooks.PreToolUsePayload
+ var (
+ body PreToolUseRequestBody
+ err error
+ )
+ err = decoder(r).Decode(&body)
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ return payload, goa.MissingPayloadError()
+ }
+ var gerr *goa.ServiceError
+ if errors.As(err, &gerr) {
+ return payload, gerr
+ }
+ return payload, goa.DecodePayloadError(err.Error())
+ }
+ err = ValidatePreToolUseRequestBody(&body)
+ if err != nil {
+ return payload, err
+ }
+
+ var (
+ apikeyToken *string
+ projectSlugInput *string
+ )
+ apikeyTokenRaw := r.Header.Get("Gram-Key")
+ if apikeyTokenRaw != "" {
+ apikeyToken = &apikeyTokenRaw
+ }
+ projectSlugInputRaw := r.Header.Get("Gram-Project")
+ if projectSlugInputRaw != "" {
+ projectSlugInput = &projectSlugInputRaw
+ }
+ payload = NewPreToolUsePayload(&body, apikeyToken, projectSlugInput)
+ if payload.ApikeyToken != nil {
+ if strings.Contains(*payload.ApikeyToken, " ") {
+ // Remove authorization scheme prefix (e.g. "Bearer")
+ cred := strings.SplitN(*payload.ApikeyToken, " ", 2)[1]
+ payload.ApikeyToken = &cred
+ }
+ }
+ if payload.ProjectSlugInput != nil {
+ if strings.Contains(*payload.ProjectSlugInput, " ") {
+ // Remove authorization scheme prefix (e.g. "Bearer")
+ cred := strings.SplitN(*payload.ProjectSlugInput, " ", 2)[1]
+ payload.ProjectSlugInput = &cred
+ }
+ }
+
+ return payload, nil
+ }
+}
+
+// EncodePreToolUseError returns an encoder for errors returned by the
+// preToolUse hooks endpoint.
+func EncodePreToolUseError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error {
+ encodeError := goahttp.ErrorEncoder(encoder, formatter)
+ return func(ctx context.Context, w http.ResponseWriter, v error) error {
+ var en goa.GoaErrorNamer
+ if !errors.As(v, &en) {
+ return encodeError(ctx, w, v)
+ }
+ switch en.GoaErrorName() {
+ case "unauthorized":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPreToolUseUnauthorizedResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusUnauthorized)
+ return enc.Encode(body)
+ case "forbidden":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPreToolUseForbiddenResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusForbidden)
+ return enc.Encode(body)
+ case "bad_request":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPreToolUseBadRequestResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusBadRequest)
+ return enc.Encode(body)
+ case "not_found":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPreToolUseNotFoundResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusNotFound)
+ return enc.Encode(body)
+ case "conflict":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPreToolUseConflictResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusConflict)
+ return enc.Encode(body)
+ case "unsupported_media":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPreToolUseUnsupportedMediaResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusUnsupportedMediaType)
+ return enc.Encode(body)
+ case "invalid":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPreToolUseInvalidResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ return enc.Encode(body)
+ case "invariant_violation":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPreToolUseInvariantViolationResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusInternalServerError)
+ return enc.Encode(body)
+ case "unexpected":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPreToolUseUnexpectedResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusInternalServerError)
+ return enc.Encode(body)
+ case "gateway_error":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPreToolUseGatewayErrorResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusBadGateway)
+ return enc.Encode(body)
+ default:
+ return encodeError(ctx, w, v)
+ }
+ }
+}
+
+// EncodePostToolUseResponse returns an encoder for responses returned by the
+// hooks postToolUse endpoint.
+func EncodePostToolUseResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error {
+ return func(ctx context.Context, w http.ResponseWriter, v any) error {
+ res, _ := v.(*hooks.HookResult)
+ enc := encoder(ctx, w)
+ body := NewPostToolUseResponseBody(res)
+ w.WriteHeader(http.StatusOK)
+ return enc.Encode(body)
+ }
+}
+
+// DecodePostToolUseRequest returns a decoder for requests sent to the hooks
+// postToolUse endpoint.
+func DecodePostToolUseRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*hooks.PostToolUsePayload, error) {
+ return func(r *http.Request) (*hooks.PostToolUsePayload, error) {
+ var payload *hooks.PostToolUsePayload
+ var (
+ body PostToolUseRequestBody
+ err error
+ )
+ err = decoder(r).Decode(&body)
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ return payload, goa.MissingPayloadError()
+ }
+ var gerr *goa.ServiceError
+ if errors.As(err, &gerr) {
+ return payload, gerr
+ }
+ return payload, goa.DecodePayloadError(err.Error())
+ }
+ err = ValidatePostToolUseRequestBody(&body)
+ if err != nil {
+ return payload, err
+ }
+
+ var (
+ apikeyToken *string
+ projectSlugInput *string
+ )
+ apikeyTokenRaw := r.Header.Get("Gram-Key")
+ if apikeyTokenRaw != "" {
+ apikeyToken = &apikeyTokenRaw
+ }
+ projectSlugInputRaw := r.Header.Get("Gram-Project")
+ if projectSlugInputRaw != "" {
+ projectSlugInput = &projectSlugInputRaw
+ }
+ payload = NewPostToolUsePayload(&body, apikeyToken, projectSlugInput)
+ if payload.ApikeyToken != nil {
+ if strings.Contains(*payload.ApikeyToken, " ") {
+ // Remove authorization scheme prefix (e.g. "Bearer")
+ cred := strings.SplitN(*payload.ApikeyToken, " ", 2)[1]
+ payload.ApikeyToken = &cred
+ }
+ }
+ if payload.ProjectSlugInput != nil {
+ if strings.Contains(*payload.ProjectSlugInput, " ") {
+ // Remove authorization scheme prefix (e.g. "Bearer")
+ cred := strings.SplitN(*payload.ProjectSlugInput, " ", 2)[1]
+ payload.ProjectSlugInput = &cred
+ }
+ }
+
+ return payload, nil
+ }
+}
+
+// EncodePostToolUseError returns an encoder for errors returned by the
+// postToolUse hooks endpoint.
+func EncodePostToolUseError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error {
+ encodeError := goahttp.ErrorEncoder(encoder, formatter)
+ return func(ctx context.Context, w http.ResponseWriter, v error) error {
+ var en goa.GoaErrorNamer
+ if !errors.As(v, &en) {
+ return encodeError(ctx, w, v)
+ }
+ switch en.GoaErrorName() {
+ case "unauthorized":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseUnauthorizedResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusUnauthorized)
+ return enc.Encode(body)
+ case "forbidden":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseForbiddenResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusForbidden)
+ return enc.Encode(body)
+ case "bad_request":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseBadRequestResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusBadRequest)
+ return enc.Encode(body)
+ case "not_found":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseNotFoundResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusNotFound)
+ return enc.Encode(body)
+ case "conflict":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseConflictResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusConflict)
+ return enc.Encode(body)
+ case "unsupported_media":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseUnsupportedMediaResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusUnsupportedMediaType)
+ return enc.Encode(body)
+ case "invalid":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseInvalidResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ return enc.Encode(body)
+ case "invariant_violation":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseInvariantViolationResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusInternalServerError)
+ return enc.Encode(body)
+ case "unexpected":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseUnexpectedResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusInternalServerError)
+ return enc.Encode(body)
+ case "gateway_error":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseGatewayErrorResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusBadGateway)
+ return enc.Encode(body)
+ default:
+ return encodeError(ctx, w, v)
+ }
+ }
+}
+
+// EncodePostToolUseFailureResponse returns an encoder for responses returned
+// by the hooks postToolUseFailure endpoint.
+func EncodePostToolUseFailureResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error {
+ return func(ctx context.Context, w http.ResponseWriter, v any) error {
+ res, _ := v.(*hooks.HookResult)
+ enc := encoder(ctx, w)
+ body := NewPostToolUseFailureResponseBody(res)
+ w.WriteHeader(http.StatusOK)
+ return enc.Encode(body)
+ }
+}
+
+// DecodePostToolUseFailureRequest returns a decoder for requests sent to the
+// hooks postToolUseFailure endpoint.
+func DecodePostToolUseFailureRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*hooks.PostToolUseFailurePayload, error) {
+ return func(r *http.Request) (*hooks.PostToolUseFailurePayload, error) {
+ var payload *hooks.PostToolUseFailurePayload
+ var (
+ body PostToolUseFailureRequestBody
+ err error
+ )
+ err = decoder(r).Decode(&body)
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ return payload, goa.MissingPayloadError()
+ }
+ var gerr *goa.ServiceError
+ if errors.As(err, &gerr) {
+ return payload, gerr
+ }
+ return payload, goa.DecodePayloadError(err.Error())
+ }
+ err = ValidatePostToolUseFailureRequestBody(&body)
+ if err != nil {
+ return payload, err
+ }
+
+ var (
+ apikeyToken *string
+ projectSlugInput *string
+ )
+ apikeyTokenRaw := r.Header.Get("Gram-Key")
+ if apikeyTokenRaw != "" {
+ apikeyToken = &apikeyTokenRaw
+ }
+ projectSlugInputRaw := r.Header.Get("Gram-Project")
+ if projectSlugInputRaw != "" {
+ projectSlugInput = &projectSlugInputRaw
+ }
+ payload = NewPostToolUseFailurePayload(&body, apikeyToken, projectSlugInput)
+ if payload.ApikeyToken != nil {
+ if strings.Contains(*payload.ApikeyToken, " ") {
+ // Remove authorization scheme prefix (e.g. "Bearer")
+ cred := strings.SplitN(*payload.ApikeyToken, " ", 2)[1]
+ payload.ApikeyToken = &cred
+ }
+ }
+ if payload.ProjectSlugInput != nil {
+ if strings.Contains(*payload.ProjectSlugInput, " ") {
+ // Remove authorization scheme prefix (e.g. "Bearer")
+ cred := strings.SplitN(*payload.ProjectSlugInput, " ", 2)[1]
+ payload.ProjectSlugInput = &cred
+ }
+ }
+
+ return payload, nil
+ }
+}
+
+// EncodePostToolUseFailureError returns an encoder for errors returned by the
+// postToolUseFailure hooks endpoint.
+func EncodePostToolUseFailureError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error {
+ encodeError := goahttp.ErrorEncoder(encoder, formatter)
+ return func(ctx context.Context, w http.ResponseWriter, v error) error {
+ var en goa.GoaErrorNamer
+ if !errors.As(v, &en) {
+ return encodeError(ctx, w, v)
+ }
+ switch en.GoaErrorName() {
+ case "unauthorized":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseFailureUnauthorizedResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusUnauthorized)
+ return enc.Encode(body)
+ case "forbidden":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseFailureForbiddenResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusForbidden)
+ return enc.Encode(body)
+ case "bad_request":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseFailureBadRequestResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusBadRequest)
+ return enc.Encode(body)
+ case "not_found":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseFailureNotFoundResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusNotFound)
+ return enc.Encode(body)
+ case "conflict":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseFailureConflictResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusConflict)
+ return enc.Encode(body)
+ case "unsupported_media":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseFailureUnsupportedMediaResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusUnsupportedMediaType)
+ return enc.Encode(body)
+ case "invalid":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseFailureInvalidResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ return enc.Encode(body)
+ case "invariant_violation":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseFailureInvariantViolationResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusInternalServerError)
+ return enc.Encode(body)
+ case "unexpected":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseFailureUnexpectedResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusInternalServerError)
+ return enc.Encode(body)
+ case "gateway_error":
+ var res *goa.ServiceError
+ errors.As(v, &res)
+ ctx = context.WithValue(ctx, goahttp.ContentTypeKey, "application/json")
+ enc := encoder(ctx, w)
+ var body any
+ if formatter != nil {
+ body = formatter(ctx, res)
+ } else {
+ body = NewPostToolUseFailureGatewayErrorResponseBody(res)
+ }
+ w.Header().Set("goa-error", res.GoaErrorName())
+ w.WriteHeader(http.StatusBadGateway)
+ return enc.Encode(body)
+ default:
+ return encodeError(ctx, w, v)
+ }
+ }
+}
diff --git a/server/gen/http/hooks/server/paths.go b/server/gen/http/hooks/server/paths.go
new file mode 100644
index 000000000..b89abb465
--- /dev/null
+++ b/server/gen/http/hooks/server/paths.go
@@ -0,0 +1,23 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// HTTP request path constructors for the hooks service.
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package server
+
+// PreToolUseHooksPath returns the URL path to the hooks service preToolUse HTTP endpoint.
+func PreToolUseHooksPath() string {
+ return "/rpc/hooks.preToolUse"
+}
+
+// PostToolUseHooksPath returns the URL path to the hooks service postToolUse HTTP endpoint.
+func PostToolUseHooksPath() string {
+ return "/rpc/hooks.postToolUse"
+}
+
+// PostToolUseFailureHooksPath returns the URL path to the hooks service postToolUseFailure HTTP endpoint.
+func PostToolUseFailureHooksPath() string {
+ return "/rpc/hooks.postToolUseFailure"
+}
diff --git a/server/gen/http/hooks/server/server.go b/server/gen/http/hooks/server/server.go
new file mode 100644
index 000000000..ec516761a
--- /dev/null
+++ b/server/gen/http/hooks/server/server.go
@@ -0,0 +1,246 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// hooks HTTP server
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package server
+
+import (
+ "context"
+ "net/http"
+
+ hooks "github.com/speakeasy-api/gram/server/gen/hooks"
+ goahttp "goa.design/goa/v3/http"
+ goa "goa.design/goa/v3/pkg"
+)
+
+// Server lists the hooks service endpoint HTTP handlers.
+type Server struct {
+ Mounts []*MountPoint
+ PreToolUse http.Handler
+ PostToolUse http.Handler
+ PostToolUseFailure http.Handler
+}
+
+// MountPoint holds information about the mounted endpoints.
+type MountPoint struct {
+ // Method is the name of the service method served by the mounted HTTP handler.
+ Method string
+ // Verb is the HTTP method used to match requests to the mounted handler.
+ Verb string
+ // Pattern is the HTTP request path pattern used to match requests to the
+ // mounted handler.
+ Pattern string
+}
+
+// New instantiates HTTP handlers for all the hooks service endpoints using the
+// provided encoder and decoder. The handlers are mounted on the given mux
+// using the HTTP verb and path defined in the design. errhandler is called
+// whenever a response fails to be encoded. formatter is used to format errors
+// returned by the service methods prior to encoding. Both errhandler and
+// formatter are optional and can be nil.
+func New(
+ e *hooks.Endpoints,
+ mux goahttp.Muxer,
+ decoder func(*http.Request) goahttp.Decoder,
+ encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
+ errhandler func(context.Context, http.ResponseWriter, error),
+ formatter func(ctx context.Context, err error) goahttp.Statuser,
+) *Server {
+ return &Server{
+ Mounts: []*MountPoint{
+ {"PreToolUse", "POST", "/rpc/hooks.preToolUse"},
+ {"PostToolUse", "POST", "/rpc/hooks.postToolUse"},
+ {"PostToolUseFailure", "POST", "/rpc/hooks.postToolUseFailure"},
+ },
+ PreToolUse: NewPreToolUseHandler(e.PreToolUse, mux, decoder, encoder, errhandler, formatter),
+ PostToolUse: NewPostToolUseHandler(e.PostToolUse, mux, decoder, encoder, errhandler, formatter),
+ PostToolUseFailure: NewPostToolUseFailureHandler(e.PostToolUseFailure, mux, decoder, encoder, errhandler, formatter),
+ }
+}
+
+// Service returns the name of the service served.
+func (s *Server) Service() string { return "hooks" }
+
+// Use wraps the server handlers with the given middleware.
+func (s *Server) Use(m func(http.Handler) http.Handler) {
+ s.PreToolUse = m(s.PreToolUse)
+ s.PostToolUse = m(s.PostToolUse)
+ s.PostToolUseFailure = m(s.PostToolUseFailure)
+}
+
+// MethodNames returns the methods served.
+func (s *Server) MethodNames() []string { return hooks.MethodNames[:] }
+
+// Mount configures the mux to serve the hooks endpoints.
+func Mount(mux goahttp.Muxer, h *Server) {
+ MountPreToolUseHandler(mux, h.PreToolUse)
+ MountPostToolUseHandler(mux, h.PostToolUse)
+ MountPostToolUseFailureHandler(mux, h.PostToolUseFailure)
+}
+
+// Mount configures the mux to serve the hooks endpoints.
+func (s *Server) Mount(mux goahttp.Muxer) {
+ Mount(mux, s)
+}
+
+// MountPreToolUseHandler configures the mux to serve the "hooks" service
+// "preToolUse" endpoint.
+func MountPreToolUseHandler(mux goahttp.Muxer, h http.Handler) {
+ f, ok := h.(http.HandlerFunc)
+ if !ok {
+ f = func(w http.ResponseWriter, r *http.Request) {
+ h.ServeHTTP(w, r)
+ }
+ }
+ mux.Handle("POST", "/rpc/hooks.preToolUse", f)
+}
+
+// NewPreToolUseHandler creates a HTTP handler which loads the HTTP request and
+// calls the "hooks" service "preToolUse" endpoint.
+func NewPreToolUseHandler(
+ endpoint goa.Endpoint,
+ mux goahttp.Muxer,
+ decoder func(*http.Request) goahttp.Decoder,
+ encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
+ errhandler func(context.Context, http.ResponseWriter, error),
+ formatter func(ctx context.Context, err error) goahttp.Statuser,
+) http.Handler {
+ var (
+ decodeRequest = DecodePreToolUseRequest(mux, decoder)
+ encodeResponse = EncodePreToolUseResponse(encoder)
+ encodeError = EncodePreToolUseError(encoder, formatter)
+ )
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept"))
+ ctx = context.WithValue(ctx, goa.MethodKey, "preToolUse")
+ ctx = context.WithValue(ctx, goa.ServiceKey, "hooks")
+ payload, err := decodeRequest(r)
+ if err != nil {
+ if err := encodeError(ctx, w, err); err != nil && errhandler != nil {
+ errhandler(ctx, w, err)
+ }
+ return
+ }
+ res, err := endpoint(ctx, payload)
+ if err != nil {
+ if err := encodeError(ctx, w, err); err != nil && errhandler != nil {
+ errhandler(ctx, w, err)
+ }
+ return
+ }
+ if err := encodeResponse(ctx, w, res); err != nil {
+ if errhandler != nil {
+ errhandler(ctx, w, err)
+ }
+ }
+ })
+}
+
+// MountPostToolUseHandler configures the mux to serve the "hooks" service
+// "postToolUse" endpoint.
+func MountPostToolUseHandler(mux goahttp.Muxer, h http.Handler) {
+ f, ok := h.(http.HandlerFunc)
+ if !ok {
+ f = func(w http.ResponseWriter, r *http.Request) {
+ h.ServeHTTP(w, r)
+ }
+ }
+ mux.Handle("POST", "/rpc/hooks.postToolUse", f)
+}
+
+// NewPostToolUseHandler creates a HTTP handler which loads the HTTP request
+// and calls the "hooks" service "postToolUse" endpoint.
+func NewPostToolUseHandler(
+ endpoint goa.Endpoint,
+ mux goahttp.Muxer,
+ decoder func(*http.Request) goahttp.Decoder,
+ encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
+ errhandler func(context.Context, http.ResponseWriter, error),
+ formatter func(ctx context.Context, err error) goahttp.Statuser,
+) http.Handler {
+ var (
+ decodeRequest = DecodePostToolUseRequest(mux, decoder)
+ encodeResponse = EncodePostToolUseResponse(encoder)
+ encodeError = EncodePostToolUseError(encoder, formatter)
+ )
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept"))
+ ctx = context.WithValue(ctx, goa.MethodKey, "postToolUse")
+ ctx = context.WithValue(ctx, goa.ServiceKey, "hooks")
+ payload, err := decodeRequest(r)
+ if err != nil {
+ if err := encodeError(ctx, w, err); err != nil && errhandler != nil {
+ errhandler(ctx, w, err)
+ }
+ return
+ }
+ res, err := endpoint(ctx, payload)
+ if err != nil {
+ if err := encodeError(ctx, w, err); err != nil && errhandler != nil {
+ errhandler(ctx, w, err)
+ }
+ return
+ }
+ if err := encodeResponse(ctx, w, res); err != nil {
+ if errhandler != nil {
+ errhandler(ctx, w, err)
+ }
+ }
+ })
+}
+
+// MountPostToolUseFailureHandler configures the mux to serve the "hooks"
+// service "postToolUseFailure" endpoint.
+func MountPostToolUseFailureHandler(mux goahttp.Muxer, h http.Handler) {
+ f, ok := h.(http.HandlerFunc)
+ if !ok {
+ f = func(w http.ResponseWriter, r *http.Request) {
+ h.ServeHTTP(w, r)
+ }
+ }
+ mux.Handle("POST", "/rpc/hooks.postToolUseFailure", f)
+}
+
+// NewPostToolUseFailureHandler creates a HTTP handler which loads the HTTP
+// request and calls the "hooks" service "postToolUseFailure" endpoint.
+func NewPostToolUseFailureHandler(
+ endpoint goa.Endpoint,
+ mux goahttp.Muxer,
+ decoder func(*http.Request) goahttp.Decoder,
+ encoder func(context.Context, http.ResponseWriter) goahttp.Encoder,
+ errhandler func(context.Context, http.ResponseWriter, error),
+ formatter func(ctx context.Context, err error) goahttp.Statuser,
+) http.Handler {
+ var (
+ decodeRequest = DecodePostToolUseFailureRequest(mux, decoder)
+ encodeResponse = EncodePostToolUseFailureResponse(encoder)
+ encodeError = EncodePostToolUseFailureError(encoder, formatter)
+ )
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept"))
+ ctx = context.WithValue(ctx, goa.MethodKey, "postToolUseFailure")
+ ctx = context.WithValue(ctx, goa.ServiceKey, "hooks")
+ payload, err := decodeRequest(r)
+ if err != nil {
+ if err := encodeError(ctx, w, err); err != nil && errhandler != nil {
+ errhandler(ctx, w, err)
+ }
+ return
+ }
+ res, err := endpoint(ctx, payload)
+ if err != nil {
+ if err := encodeError(ctx, w, err); err != nil && errhandler != nil {
+ errhandler(ctx, w, err)
+ }
+ return
+ }
+ if err := encodeResponse(ctx, w, res); err != nil {
+ if errhandler != nil {
+ errhandler(ctx, w, err)
+ }
+ }
+ })
+}
diff --git a/server/gen/http/hooks/server/types.go b/server/gen/http/hooks/server/types.go
new file mode 100644
index 000000000..b5035eb23
--- /dev/null
+++ b/server/gen/http/hooks/server/types.go
@@ -0,0 +1,1125 @@
+// Code generated by goa v3.25.3, DO NOT EDIT.
+//
+// hooks HTTP server types
+//
+// Command:
+// $ goa gen github.com/speakeasy-api/gram/server/design
+
+package server
+
+import (
+ hooks "github.com/speakeasy-api/gram/server/gen/hooks"
+ goa "goa.design/goa/v3/pkg"
+)
+
+// PreToolUseRequestBody is the type of the "hooks" service "preToolUse"
+// endpoint HTTP request body.
+type PreToolUseRequestBody struct {
+ // The name of the tool being invoked
+ ToolName *string `form:"tool_name,omitempty" json:"tool_name,omitempty" xml:"tool_name,omitempty"`
+ // The input to the tool
+ ToolInput any `form:"tool_input,omitempty" json:"tool_input,omitempty" xml:"tool_input,omitempty"`
+}
+
+// PostToolUseRequestBody is the type of the "hooks" service "postToolUse"
+// endpoint HTTP request body.
+type PostToolUseRequestBody struct {
+ // The name of the tool that was invoked
+ ToolName *string `form:"tool_name,omitempty" json:"tool_name,omitempty" xml:"tool_name,omitempty"`
+ // The input to the tool
+ ToolInput any `form:"tool_input,omitempty" json:"tool_input,omitempty" xml:"tool_input,omitempty"`
+ // The response from the tool
+ ToolResponse any `form:"tool_response,omitempty" json:"tool_response,omitempty" xml:"tool_response,omitempty"`
+}
+
+// PostToolUseFailureRequestBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP request body.
+type PostToolUseFailureRequestBody struct {
+ // The name of the tool that failed
+ ToolName *string `form:"tool_name,omitempty" json:"tool_name,omitempty" xml:"tool_name,omitempty"`
+ // The input to the tool
+ ToolInput any `form:"tool_input,omitempty" json:"tool_input,omitempty" xml:"tool_input,omitempty"`
+ // The error from the tool
+ ToolError any `form:"tool_error,omitempty" json:"tool_error,omitempty" xml:"tool_error,omitempty"`
+}
+
+// PreToolUseResponseBody is the type of the "hooks" service "preToolUse"
+// endpoint HTTP response body.
+type PreToolUseResponseBody struct {
+ // Whether the hook was received successfully
+ OK bool `form:"ok" json:"ok" xml:"ok"`
+}
+
+// PostToolUseResponseBody is the type of the "hooks" service "postToolUse"
+// endpoint HTTP response body.
+type PostToolUseResponseBody struct {
+ // Whether the hook was received successfully
+ OK bool `form:"ok" json:"ok" xml:"ok"`
+}
+
+// PostToolUseFailureResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body.
+type PostToolUseFailureResponseBody struct {
+ // Whether the hook was received successfully
+ OK bool `form:"ok" json:"ok" xml:"ok"`
+}
+
+// PreToolUseUnauthorizedResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "unauthorized" error.
+type PreToolUseUnauthorizedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PreToolUseForbiddenResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "forbidden" error.
+type PreToolUseForbiddenResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PreToolUseBadRequestResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "bad_request" error.
+type PreToolUseBadRequestResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PreToolUseNotFoundResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "not_found" error.
+type PreToolUseNotFoundResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PreToolUseConflictResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "conflict" error.
+type PreToolUseConflictResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PreToolUseUnsupportedMediaResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "unsupported_media" error.
+type PreToolUseUnsupportedMediaResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PreToolUseInvalidResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "invalid" error.
+type PreToolUseInvalidResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PreToolUseInvariantViolationResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "invariant_violation" error.
+type PreToolUseInvariantViolationResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PreToolUseUnexpectedResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "unexpected" error.
+type PreToolUseUnexpectedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PreToolUseGatewayErrorResponseBody is the type of the "hooks" service
+// "preToolUse" endpoint HTTP response body for the "gateway_error" error.
+type PreToolUseGatewayErrorResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseUnauthorizedResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "unauthorized" error.
+type PostToolUseUnauthorizedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseForbiddenResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "forbidden" error.
+type PostToolUseForbiddenResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseBadRequestResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "bad_request" error.
+type PostToolUseBadRequestResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseNotFoundResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "not_found" error.
+type PostToolUseNotFoundResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseConflictResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "conflict" error.
+type PostToolUseConflictResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseUnsupportedMediaResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "unsupported_media" error.
+type PostToolUseUnsupportedMediaResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseInvalidResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "invalid" error.
+type PostToolUseInvalidResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseInvariantViolationResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "invariant_violation"
+// error.
+type PostToolUseInvariantViolationResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseUnexpectedResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "unexpected" error.
+type PostToolUseUnexpectedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseGatewayErrorResponseBody is the type of the "hooks" service
+// "postToolUse" endpoint HTTP response body for the "gateway_error" error.
+type PostToolUseGatewayErrorResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseFailureUnauthorizedResponseBody is the type of the "hooks"
+// service "postToolUseFailure" endpoint HTTP response body for the
+// "unauthorized" error.
+type PostToolUseFailureUnauthorizedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseFailureForbiddenResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "forbidden" error.
+type PostToolUseFailureForbiddenResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseFailureBadRequestResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "bad_request" error.
+type PostToolUseFailureBadRequestResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseFailureNotFoundResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "not_found" error.
+type PostToolUseFailureNotFoundResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseFailureConflictResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "conflict" error.
+type PostToolUseFailureConflictResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseFailureUnsupportedMediaResponseBody is the type of the "hooks"
+// service "postToolUseFailure" endpoint HTTP response body for the
+// "unsupported_media" error.
+type PostToolUseFailureUnsupportedMediaResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseFailureInvalidResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "invalid" error.
+type PostToolUseFailureInvalidResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseFailureInvariantViolationResponseBody is the type of the "hooks"
+// service "postToolUseFailure" endpoint HTTP response body for the
+// "invariant_violation" error.
+type PostToolUseFailureInvariantViolationResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseFailureUnexpectedResponseBody is the type of the "hooks" service
+// "postToolUseFailure" endpoint HTTP response body for the "unexpected" error.
+type PostToolUseFailureUnexpectedResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// PostToolUseFailureGatewayErrorResponseBody is the type of the "hooks"
+// service "postToolUseFailure" endpoint HTTP response body for the
+// "gateway_error" error.
+type PostToolUseFailureGatewayErrorResponseBody struct {
+ // Name is the name of this class of errors.
+ Name string `form:"name" json:"name" xml:"name"`
+ // ID is a unique identifier for this particular occurrence of the problem.
+ ID string `form:"id" json:"id" xml:"id"`
+ // Message is a human-readable explanation specific to this occurrence of the
+ // problem.
+ Message string `form:"message" json:"message" xml:"message"`
+ // Is the error temporary?
+ Temporary bool `form:"temporary" json:"temporary" xml:"temporary"`
+ // Is the error a timeout?
+ Timeout bool `form:"timeout" json:"timeout" xml:"timeout"`
+ // Is the error a server-side fault?
+ Fault bool `form:"fault" json:"fault" xml:"fault"`
+}
+
+// NewPreToolUseResponseBody builds the HTTP response body from the result of
+// the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseResponseBody(res *hooks.HookResult) *PreToolUseResponseBody {
+ body := &PreToolUseResponseBody{
+ OK: res.OK,
+ }
+ return body
+}
+
+// NewPostToolUseResponseBody builds the HTTP response body from the result of
+// the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseResponseBody(res *hooks.HookResult) *PostToolUseResponseBody {
+ body := &PostToolUseResponseBody{
+ OK: res.OK,
+ }
+ return body
+}
+
+// NewPostToolUseFailureResponseBody builds the HTTP response body from the
+// result of the "postToolUseFailure" endpoint of the "hooks" service.
+func NewPostToolUseFailureResponseBody(res *hooks.HookResult) *PostToolUseFailureResponseBody {
+ body := &PostToolUseFailureResponseBody{
+ OK: res.OK,
+ }
+ return body
+}
+
+// NewPreToolUseUnauthorizedResponseBody builds the HTTP response body from the
+// result of the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseUnauthorizedResponseBody(res *goa.ServiceError) *PreToolUseUnauthorizedResponseBody {
+ body := &PreToolUseUnauthorizedResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPreToolUseForbiddenResponseBody builds the HTTP response body from the
+// result of the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseForbiddenResponseBody(res *goa.ServiceError) *PreToolUseForbiddenResponseBody {
+ body := &PreToolUseForbiddenResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPreToolUseBadRequestResponseBody builds the HTTP response body from the
+// result of the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseBadRequestResponseBody(res *goa.ServiceError) *PreToolUseBadRequestResponseBody {
+ body := &PreToolUseBadRequestResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPreToolUseNotFoundResponseBody builds the HTTP response body from the
+// result of the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseNotFoundResponseBody(res *goa.ServiceError) *PreToolUseNotFoundResponseBody {
+ body := &PreToolUseNotFoundResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPreToolUseConflictResponseBody builds the HTTP response body from the
+// result of the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseConflictResponseBody(res *goa.ServiceError) *PreToolUseConflictResponseBody {
+ body := &PreToolUseConflictResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPreToolUseUnsupportedMediaResponseBody builds the HTTP response body from
+// the result of the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseUnsupportedMediaResponseBody(res *goa.ServiceError) *PreToolUseUnsupportedMediaResponseBody {
+ body := &PreToolUseUnsupportedMediaResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPreToolUseInvalidResponseBody builds the HTTP response body from the
+// result of the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseInvalidResponseBody(res *goa.ServiceError) *PreToolUseInvalidResponseBody {
+ body := &PreToolUseInvalidResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPreToolUseInvariantViolationResponseBody builds the HTTP response body
+// from the result of the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseInvariantViolationResponseBody(res *goa.ServiceError) *PreToolUseInvariantViolationResponseBody {
+ body := &PreToolUseInvariantViolationResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPreToolUseUnexpectedResponseBody builds the HTTP response body from the
+// result of the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseUnexpectedResponseBody(res *goa.ServiceError) *PreToolUseUnexpectedResponseBody {
+ body := &PreToolUseUnexpectedResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPreToolUseGatewayErrorResponseBody builds the HTTP response body from the
+// result of the "preToolUse" endpoint of the "hooks" service.
+func NewPreToolUseGatewayErrorResponseBody(res *goa.ServiceError) *PreToolUseGatewayErrorResponseBody {
+ body := &PreToolUseGatewayErrorResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseUnauthorizedResponseBody builds the HTTP response body from
+// the result of the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseUnauthorizedResponseBody(res *goa.ServiceError) *PostToolUseUnauthorizedResponseBody {
+ body := &PostToolUseUnauthorizedResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseForbiddenResponseBody builds the HTTP response body from the
+// result of the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseForbiddenResponseBody(res *goa.ServiceError) *PostToolUseForbiddenResponseBody {
+ body := &PostToolUseForbiddenResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseBadRequestResponseBody builds the HTTP response body from the
+// result of the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseBadRequestResponseBody(res *goa.ServiceError) *PostToolUseBadRequestResponseBody {
+ body := &PostToolUseBadRequestResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseNotFoundResponseBody builds the HTTP response body from the
+// result of the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseNotFoundResponseBody(res *goa.ServiceError) *PostToolUseNotFoundResponseBody {
+ body := &PostToolUseNotFoundResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseConflictResponseBody builds the HTTP response body from the
+// result of the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseConflictResponseBody(res *goa.ServiceError) *PostToolUseConflictResponseBody {
+ body := &PostToolUseConflictResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseUnsupportedMediaResponseBody builds the HTTP response body
+// from the result of the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseUnsupportedMediaResponseBody(res *goa.ServiceError) *PostToolUseUnsupportedMediaResponseBody {
+ body := &PostToolUseUnsupportedMediaResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseInvalidResponseBody builds the HTTP response body from the
+// result of the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseInvalidResponseBody(res *goa.ServiceError) *PostToolUseInvalidResponseBody {
+ body := &PostToolUseInvalidResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseInvariantViolationResponseBody builds the HTTP response body
+// from the result of the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseInvariantViolationResponseBody(res *goa.ServiceError) *PostToolUseInvariantViolationResponseBody {
+ body := &PostToolUseInvariantViolationResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseUnexpectedResponseBody builds the HTTP response body from the
+// result of the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseUnexpectedResponseBody(res *goa.ServiceError) *PostToolUseUnexpectedResponseBody {
+ body := &PostToolUseUnexpectedResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseGatewayErrorResponseBody builds the HTTP response body from
+// the result of the "postToolUse" endpoint of the "hooks" service.
+func NewPostToolUseGatewayErrorResponseBody(res *goa.ServiceError) *PostToolUseGatewayErrorResponseBody {
+ body := &PostToolUseGatewayErrorResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseFailureUnauthorizedResponseBody builds the HTTP response body
+// from the result of the "postToolUseFailure" endpoint of the "hooks" service.
+func NewPostToolUseFailureUnauthorizedResponseBody(res *goa.ServiceError) *PostToolUseFailureUnauthorizedResponseBody {
+ body := &PostToolUseFailureUnauthorizedResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseFailureForbiddenResponseBody builds the HTTP response body
+// from the result of the "postToolUseFailure" endpoint of the "hooks" service.
+func NewPostToolUseFailureForbiddenResponseBody(res *goa.ServiceError) *PostToolUseFailureForbiddenResponseBody {
+ body := &PostToolUseFailureForbiddenResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseFailureBadRequestResponseBody builds the HTTP response body
+// from the result of the "postToolUseFailure" endpoint of the "hooks" service.
+func NewPostToolUseFailureBadRequestResponseBody(res *goa.ServiceError) *PostToolUseFailureBadRequestResponseBody {
+ body := &PostToolUseFailureBadRequestResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseFailureNotFoundResponseBody builds the HTTP response body from
+// the result of the "postToolUseFailure" endpoint of the "hooks" service.
+func NewPostToolUseFailureNotFoundResponseBody(res *goa.ServiceError) *PostToolUseFailureNotFoundResponseBody {
+ body := &PostToolUseFailureNotFoundResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseFailureConflictResponseBody builds the HTTP response body from
+// the result of the "postToolUseFailure" endpoint of the "hooks" service.
+func NewPostToolUseFailureConflictResponseBody(res *goa.ServiceError) *PostToolUseFailureConflictResponseBody {
+ body := &PostToolUseFailureConflictResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseFailureUnsupportedMediaResponseBody builds the HTTP response
+// body from the result of the "postToolUseFailure" endpoint of the "hooks"
+// service.
+func NewPostToolUseFailureUnsupportedMediaResponseBody(res *goa.ServiceError) *PostToolUseFailureUnsupportedMediaResponseBody {
+ body := &PostToolUseFailureUnsupportedMediaResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseFailureInvalidResponseBody builds the HTTP response body from
+// the result of the "postToolUseFailure" endpoint of the "hooks" service.
+func NewPostToolUseFailureInvalidResponseBody(res *goa.ServiceError) *PostToolUseFailureInvalidResponseBody {
+ body := &PostToolUseFailureInvalidResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseFailureInvariantViolationResponseBody builds the HTTP response
+// body from the result of the "postToolUseFailure" endpoint of the "hooks"
+// service.
+func NewPostToolUseFailureInvariantViolationResponseBody(res *goa.ServiceError) *PostToolUseFailureInvariantViolationResponseBody {
+ body := &PostToolUseFailureInvariantViolationResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseFailureUnexpectedResponseBody builds the HTTP response body
+// from the result of the "postToolUseFailure" endpoint of the "hooks" service.
+func NewPostToolUseFailureUnexpectedResponseBody(res *goa.ServiceError) *PostToolUseFailureUnexpectedResponseBody {
+ body := &PostToolUseFailureUnexpectedResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPostToolUseFailureGatewayErrorResponseBody builds the HTTP response body
+// from the result of the "postToolUseFailure" endpoint of the "hooks" service.
+func NewPostToolUseFailureGatewayErrorResponseBody(res *goa.ServiceError) *PostToolUseFailureGatewayErrorResponseBody {
+ body := &PostToolUseFailureGatewayErrorResponseBody{
+ Name: res.Name,
+ ID: res.ID,
+ Message: res.Message,
+ Temporary: res.Temporary,
+ Timeout: res.Timeout,
+ Fault: res.Fault,
+ }
+ return body
+}
+
+// NewPreToolUsePayload builds a hooks service preToolUse endpoint payload.
+func NewPreToolUsePayload(body *PreToolUseRequestBody, apikeyToken *string, projectSlugInput *string) *hooks.PreToolUsePayload {
+ v := &hooks.PreToolUsePayload{
+ ToolName: *body.ToolName,
+ ToolInput: body.ToolInput,
+ }
+ v.ApikeyToken = apikeyToken
+ v.ProjectSlugInput = projectSlugInput
+
+ return v
+}
+
+// NewPostToolUsePayload builds a hooks service postToolUse endpoint payload.
+func NewPostToolUsePayload(body *PostToolUseRequestBody, apikeyToken *string, projectSlugInput *string) *hooks.PostToolUsePayload {
+ v := &hooks.PostToolUsePayload{
+ ToolName: *body.ToolName,
+ ToolInput: body.ToolInput,
+ ToolResponse: body.ToolResponse,
+ }
+ v.ApikeyToken = apikeyToken
+ v.ProjectSlugInput = projectSlugInput
+
+ return v
+}
+
+// NewPostToolUseFailurePayload builds a hooks service postToolUseFailure
+// endpoint payload.
+func NewPostToolUseFailurePayload(body *PostToolUseFailureRequestBody, apikeyToken *string, projectSlugInput *string) *hooks.PostToolUseFailurePayload {
+ v := &hooks.PostToolUseFailurePayload{
+ ToolName: *body.ToolName,
+ ToolInput: body.ToolInput,
+ ToolError: body.ToolError,
+ }
+ v.ApikeyToken = apikeyToken
+ v.ProjectSlugInput = projectSlugInput
+
+ return v
+}
+
+// ValidatePreToolUseRequestBody runs the validations defined on
+// PreToolUseRequestBody
+func ValidatePreToolUseRequestBody(body *PreToolUseRequestBody) (err error) {
+ if body.ToolName == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("tool_name", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseRequestBody runs the validations defined on
+// PostToolUseRequestBody
+func ValidatePostToolUseRequestBody(body *PostToolUseRequestBody) (err error) {
+ if body.ToolName == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("tool_name", "body"))
+ }
+ return
+}
+
+// ValidatePostToolUseFailureRequestBody runs the validations defined on
+// PostToolUseFailureRequestBody
+func ValidatePostToolUseFailureRequestBody(body *PostToolUseFailureRequestBody) (err error) {
+ if body.ToolName == nil {
+ err = goa.MergeErrors(err, goa.MissingFieldError("tool_name", "body"))
+ }
+ return
+}
diff --git a/server/gen/http/openapi3.json b/server/gen/http/openapi3.json
index 73ed3be61..9cdfc37b1 100644
--- a/server/gen/http/openapi3.json
+++ b/server/gen/http/openapi3.json
@@ -1 +1 @@
-{"openapi":"3.0.3","info":{"title":"Gram API Description","description":"Gram is the tools platform for AI agents","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for gram"}],"paths":{"/rpc/assets.createSignedChatAttachmentURL":{"post":{"description":"Create a time-limited signed URL to access a chat attachment without authentication.","operationId":"createSignedChatAttachmentURL","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignedChatAttachmentURLForm2"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignedChatAttachmentURLResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[],"project_slug_header_Gram-Project":[]}],"summary":"createSignedChatAttachmentURL assets","tags":["assets"],"x-speakeasy-name-override":"createSignedChatAttachmentURL","x-speakeasy-react-hook":{"name":"CreateSignedChatAttachmentURL"}}},"/rpc/assets.fetchOpenAPIv3FromURL":{"post":{"description":"Fetch an OpenAPI v3 document from a URL and upload it to Gram.","operationId":"fetchOpenAPIv3FromURL","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchOpenAPIv3FromURLForm2"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOpenAPIv3Result"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"fetchOpenAPIv3FromURL assets","tags":["assets"],"x-speakeasy-name-override":"fetchOpenAPIv3FromURL","x-speakeasy-react-hook":{"name":"FetchOpenAPIv3FromURL"}}},"/rpc/assets.list":{"get":{"description":"List all assets for a project.","operationId":"listAssets","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAssetsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAssets assets","tags":["assets"],"x-speakeasy-name-override":"listAssets","x-speakeasy-react-hook":{"name":"ListAssets"}}},"/rpc/assets.serveChatAttachment":{"get":{"description":"Serve a chat attachment from Gram.","operationId":"serveChatAttachment","parameters":[{"allowEmptyValue":true,"description":"The ID of the attachment to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the attachment to serve","type":"string"}},{"allowEmptyValue":true,"description":"The project ID that the attachment belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The project ID that the attachment belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"serveChatAttachment assets","tags":["assets"],"x-speakeasy-name-override":"serveChatAttachment","x-speakeasy-react-hook":{"name":"serveChatAttachment"}}},"/rpc/assets.serveChatAttachmentSigned":{"get":{"description":"Serve a chat attachment using a signed URL token.","operationId":"serveChatAttachmentSigned","parameters":[{"allowEmptyValue":true,"description":"The signed JWT token","in":"query","name":"token","required":true,"schema":{"description":"The signed JWT token","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"serveChatAttachmentSigned assets","tags":["assets"],"x-speakeasy-name-override":"serveChatAttachmentSigned","x-speakeasy-react-hook":{"name":"serveChatAttachmentSigned"}}},"/rpc/assets.serveFunction":{"get":{"description":"Serve a Gram Functions asset from Gram.","operationId":"serveFunction","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}},{"allowEmptyValue":true,"description":"The procect ID that the asset belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The procect ID that the asset belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"serveFunction assets","tags":["assets"],"x-speakeasy-name-override":"serveFunction","x-speakeasy-react-hook":{"name":"serveFunction"}}},"/rpc/assets.serveImage":{"get":{"description":"Serve an image from Gram.","operationId":"serveImage","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"serveImage assets","tags":["assets"],"x-speakeasy-name-override":"serveImage","x-speakeasy-react-hook":{"name":"serveImage"}}},"/rpc/assets.serveOpenAPIv3":{"get":{"description":"Serve an OpenAPIv3 asset from Gram.","operationId":"serveOpenAPIv3","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}},{"allowEmptyValue":true,"description":"The procect ID that the asset belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The procect ID that the asset belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"serveOpenAPIv3 assets","tags":["assets"],"x-speakeasy-name-override":"serveOpenAPIv3","x-speakeasy-react-hook":{"name":"serveOpenAPIv3"}}},"/rpc/assets.uploadChatAttachment":{"post":{"description":"Upload a chat attachment to Gram.","operationId":"uploadChatAttachment","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadChatAttachmentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[],"project_slug_header_Gram-Project":[]}],"summary":"uploadChatAttachment assets","tags":["assets"],"x-speakeasy-name-override":"uploadChatAttachment","x-speakeasy-react-hook":{"name":"UploadChatAttachment"}}},"/rpc/assets.uploadFunctions":{"post":{"description":"Upload functions to Gram.","operationId":"uploadFunctions","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFunctionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadFunctions assets","tags":["assets"],"x-speakeasy-name-override":"uploadFunctions","x-speakeasy-react-hook":{"name":"UploadFunctions"}}},"/rpc/assets.uploadImage":{"post":{"description":"Upload an image to Gram.","operationId":"uploadImage","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadImageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadImage assets","tags":["assets"],"x-speakeasy-name-override":"uploadImage","x-speakeasy-react-hook":{"name":"UploadImage"}}},"/rpc/assets.uploadOpenAPIv3":{"post":{"description":"Upload an OpenAPI v3 document to Gram.","operationId":"uploadOpenAPIv3Asset","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOpenAPIv3Result"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadOpenAPIv3 assets","tags":["assets"],"x-speakeasy-name-override":"uploadOpenAPIv3","x-speakeasy-react-hook":{"name":"UploadOpenAPIv3"}}},"/rpc/auth.callback":{"get":{"description":"Handles the authentication callback.","operationId":"authCallback","parameters":[{"allowEmptyValue":true,"description":"The auth code for authentication from the speakeasy system","in":"query","name":"code","required":true,"schema":{"description":"The auth code for authentication from the speakeasy system","type":"string"}},{"allowEmptyValue":true,"description":"The opaque state string optionally provided during initialization.","in":"query","name":"state","schema":{"description":"The opaque state string optionally provided during initialization.","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"callback auth","tags":["auth"],"x-speakeasy-name-override":"callback","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/auth.info":{"get":{"description":"Provides information about the current authentication status.","operationId":"sessionInfo","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoResponseBody"}}},"description":"OK response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"info auth","tags":["auth"],"x-speakeasy-name-override":"info","x-speakeasy-react-hook":{"name":"SessionInfo"}}},"/rpc/auth.login":{"get":{"description":"Proxies to auth login through speakeasy oidc.","operationId":"authLogin","parameters":[{"allowEmptyValue":true,"description":"Optional URL to redirect to after successful authentication","in":"query","name":"redirect","schema":{"description":"Optional URL to redirect to after successful authentication","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"login auth","tags":["auth"],"x-speakeasy-name-override":"login","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/auth.logout":{"post":{"description":"Logs out the current user by clearing their session.","operationId":"logout","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response.","headers":{"Set-Cookie":{"description":"Empty string to clear the session","schema":{"description":"Empty string to clear the session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"logout auth","tags":["auth"],"x-speakeasy-name-override":"logout","x-speakeasy-react-hook":{"name":"Logout"}}},"/rpc/auth.register":{"post":{"description":"Register a new org for a user with their session information.","operationId":"register","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"register auth","tags":["auth"],"x-speakeasy-name-override":"register","x-speakeasy-react-hook":{"name":"Register"}}},"/rpc/auth.switchScopes":{"post":{"description":"Switches the authentication scope to a different organization.","operationId":"switchAuthScopes","parameters":[{"allowEmptyValue":true,"description":"The organization slug to switch scopes","in":"query","name":"organization_id","schema":{"description":"The organization slug to switch scopes","type":"string"}},{"allowEmptyValue":true,"description":"The project id to switch scopes too","in":"query","name":"project_id","schema":{"description":"The project id to switch scopes too","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"switchScopes auth","tags":["auth"],"x-speakeasy-name-override":"switchScopes","x-speakeasy-react-hook":{"name":"SwitchScopes"}}},"/rpc/chat.creditUsage":{"get":{"description":"Load a chat by its ID","operationId":"creditUsage","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditUsageResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"creditUsage chat","tags":["chat"],"x-speakeasy-name-override":"creditUsage","x-speakeasy-react-hook":{"name":"GetCreditUsage"}}},"/rpc/chat.generateTitle":{"post":{"description":"Generate a title for a chat based on its messages","operationId":"generateTitle","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServeImageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTitleResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"generateTitle chat","tags":["chat"],"x-speakeasy-name-override":"generateTitle"}},"/rpc/chat.list":{"get":{"description":"List all chats for a project","operationId":"listChats","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChatsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"listChats chat","tags":["chat"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListChats"}}},"/rpc/chat.listChatsWithResolutions":{"get":{"description":"List all chats for a project with their resolutions","operationId":"listChatsWithResolutions","parameters":[{"allowEmptyValue":true,"description":"Search query (searches chat ID, user ID, and title)","in":"query","name":"search","schema":{"description":"Search query (searches chat ID, user ID, and title)","type":"string"}},{"allowEmptyValue":true,"description":"Filter by external user ID","in":"query","name":"external_user_id","schema":{"description":"Filter by external user ID","type":"string"}},{"allowEmptyValue":true,"description":"Filter by resolution status","in":"query","name":"resolution_status","schema":{"description":"Filter by resolution status","type":"string"}},{"allowEmptyValue":true,"description":"Filter chats created after this timestamp (ISO 8601)","in":"query","name":"from","schema":{"description":"Filter chats created after this timestamp (ISO 8601)","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Filter chats created before this timestamp (ISO 8601)","in":"query","name":"to","schema":{"description":"Filter chats created before this timestamp (ISO 8601)","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Number of results per page","in":"query","name":"limit","schema":{"default":50,"description":"Number of results per page","format":"int64","maximum":100,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"Pagination offset","in":"query","name":"offset","schema":{"default":0,"description":"Pagination offset","format":"int64","minimum":0,"type":"integer"}},{"allowEmptyValue":true,"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"created_at","description":"Field to sort by","enum":["created_at","num_messages","score"],"type":"string"}},{"allowEmptyValue":true,"description":"Sort order","in":"query","name":"sort_order","schema":{"default":"desc","description":"Sort order","enum":["asc","desc"],"type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChatsWithResolutionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"listChatsWithResolutions chat","tags":["chat"],"x-speakeasy-name-override":"listChatsWithResolutions","x-speakeasy-react-hook":{"name":"ListChatsWithResolutions","type":"query"}}},"/rpc/chat.load":{"get":{"description":"Load a chat by its ID","operationId":"loadChat","parameters":[{"allowEmptyValue":true,"description":"The ID of the chat","in":"query","name":"id","required":true,"schema":{"description":"The ID of the chat","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"loadChat chat","tags":["chat"],"x-speakeasy-name-override":"load","x-speakeasy-react-hook":{"name":"LoadChat"}}},"/rpc/chat.submitFeedback":{"post":{"description":"Submit user feedback for a chat (success/failure)","operationId":"submitFeedback","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"submitFeedback chat","tags":["chat"],"x-speakeasy-name-override":"submitFeedback"}},"/rpc/chatSessions.create":{"post":{"description":"Creates a new chat session token","operationId":"createChatSession","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"create chatSessions","tags":["chatSessions"],"x-speakeasy-name-override":"create"}},"/rpc/chatSessions.revoke":{"delete":{"description":"Revokes an existing chat session token","operationId":"revokeChatSession","parameters":[{"allowEmptyValue":true,"description":"The chat session token to revoke","in":"query","name":"token","required":true,"schema":{"description":"The chat session token to revoke","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revoke chatSessions","tags":["chatSessions"],"x-speakeasy-name-override":"revoke"}},"/rpc/deployments.active":{"get":{"description":"Get the active deployment for a project.","operationId":"getActiveDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetActiveDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getActiveDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"active","x-speakeasy-react-hook":{"name":"ActiveDeployment"}}},"/rpc/deployments.create":{"post":{"description":"Create a deployment to load tool definitions.","operationId":"createDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m","in":"header","name":"Idempotency-Key","required":true,"schema":{"description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeploymentRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateDeployment"}}},"/rpc/deployments.evolve":{"post":{"description":"Create a new deployment with additional or updated tool sources.","operationId":"evolveDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolveForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolveResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"evolve deployments","tags":["deployments"],"x-speakeasy-name-override":"evolveDeployment","x-speakeasy-react-hook":{"name":"EvolveDeployment"}}},"/rpc/deployments.get":{"get":{"description":"Get a deployment by its ID.","operationId":"getDeployment","parameters":[{"allowEmptyValue":true,"description":"The ID of the deployment","in":"query","name":"id","required":true,"schema":{"description":"The ID of the deployment","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"getById","x-speakeasy-react-hook":{"name":"Deployment"}}},"/rpc/deployments.latest":{"get":{"description":"Get the latest deployment for a project.","operationId":"getLatestDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLatestDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getLatestDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"latest","x-speakeasy-react-hook":{"name":"LatestDeployment"}}},"/rpc/deployments.list":{"get":{"description":"List all deployments in descending order of creation.","operationId":"listDeployments","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listDeployments deployments","tags":["deployments"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListDeployments"}}},"/rpc/deployments.logs":{"get":{"description":"Get logs for a deployment.","operationId":"getDeploymentLogs","parameters":[{"allowEmptyValue":true,"description":"The ID of the deployment","in":"query","name":"deployment_id","required":true,"schema":{"description":"The ID of the deployment","type":"string"}},{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDeploymentLogsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getDeploymentLogs deployments","tags":["deployments"],"x-speakeasy-name-override":"logs","x-speakeasy-react-hook":{"name":"DeploymentLogs"}}},"/rpc/deployments.redeploy":{"post":{"description":"Redeploys an existing deployment.","operationId":"redeployDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeployRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeployResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"redeploy deployments","tags":["deployments"],"x-speakeasy-name-override":"redeployDeployment","x-speakeasy-react-hook":{"name":"RedeployDeployment"}}},"/rpc/domain.delete":{"delete":{"description":"Delete a custom domain","operationId":"deleteDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteDomain domains","tags":["domains"],"x-speakeasy-name-override":"deleteDomain","x-speakeasy-react-hook":{"name":"deleteDomain"}}},"/rpc/domain.get":{"get":{"description":"Get the custom domain for a project","operationId":"getDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getDomain domains","tags":["domains"],"x-speakeasy-name-override":"getDomain","x-speakeasy-react-hook":{"name":"getDomain"}}},"/rpc/domain.register":{"post":{"description":"Create a custom domain for a organization","operationId":"registerDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createDomain domains","tags":["domains"],"x-speakeasy-name-override":"registerDomain","x-speakeasy-react-hook":{"name":"registerDomain"}}},"/rpc/environments.create":{"post":{"description":"Create a new environment","operationId":"createEnvironment","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnvironmentForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateEnvironment"}}},"/rpc/environments.delete":{"delete":{"description":"Delete an environment","operationId":"deleteEnvironment","parameters":[{"allowEmptyValue":true,"description":"The slug of the environment to delete","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"deleteBySlug","x-speakeasy-react-hook":{"name":"DeleteEnvironment"}}},"/rpc/environments.deleteSourceLink":{"delete":{"description":"Delete a link between a source and an environment","operationId":"deleteSourceEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"The kind of source (http or function)","in":"query","name":"source_kind","required":true,"schema":{"description":"The kind of source that can be linked to an environment","enum":["http","function"],"type":"string"}},{"allowEmptyValue":true,"description":"The slug of the source","in":"query","name":"source_slug","required":true,"schema":{"description":"The slug of the source","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteSourceEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"deleteSourceLink","x-speakeasy-react-hook":{"name":"DeleteSourceEnvironmentLink"}}},"/rpc/environments.deleteToolsetLink":{"delete":{"description":"Delete a link between a toolset and an environment","operationId":"deleteToolsetEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"The ID of the toolset","in":"query","name":"toolset_id","required":true,"schema":{"description":"The ID of the toolset","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteToolsetEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"deleteToolsetLink","x-speakeasy-react-hook":{"name":"DeleteToolsetEnvironmentLink"}}},"/rpc/environments.getSourceEnvironment":{"get":{"description":"Get the environment linked to a source","operationId":"getSourceEnvironment","parameters":[{"allowEmptyValue":true,"description":"The kind of source (http or function)","in":"query","name":"source_kind","required":true,"schema":{"description":"The kind of source that can be linked to an environment","enum":["http","function"],"type":"string"}},{"allowEmptyValue":true,"description":"The slug of the source","in":"query","name":"source_slug","required":true,"schema":{"description":"The slug of the source","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getSourceEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"getBySource","x-speakeasy-react-hook":{"name":"GetSourceEnvironment"}}},"/rpc/environments.getToolsetEnvironment":{"get":{"description":"Get the environment linked to a toolset","operationId":"getToolsetEnvironment","parameters":[{"allowEmptyValue":true,"description":"The ID of the toolset","in":"query","name":"toolset_id","required":true,"schema":{"description":"The ID of the toolset","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getToolsetEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"getByToolset","x-speakeasy-react-hook":{"name":"GetToolsetEnvironment"}}},"/rpc/environments.list":{"get":{"description":"List all environments for an organization","operationId":"listEnvironments","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvironmentsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listEnvironments environments","tags":["environments"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListEnvironments"}}},"/rpc/environments.setSourceLink":{"put":{"description":"Set (upsert) a link between a source and an environment","operationId":"setSourceEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSourceEnvironmentLinkRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceEnvironmentLink"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setSourceEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"setSourceLink","x-speakeasy-react-hook":{"name":"SetSourceEnvironmentLink"}}},"/rpc/environments.setToolsetLink":{"put":{"description":"Set (upsert) a link between a toolset and an environment","operationId":"setToolsetEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetToolsetEnvironmentLinkRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolsetEnvironmentLink"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setToolsetEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"setToolsetLink","x-speakeasy-react-hook":{"name":"SetToolsetEnvironmentLink"}}},"/rpc/environments.update":{"post":{"description":"Update an environment","operationId":"updateEnvironment","parameters":[{"allowEmptyValue":true,"description":"The slug of the environment to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEnvironmentRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"updateBySlug","x-speakeasy-react-hook":{"name":"UpdateEnvironment"}}},"/rpc/instances.get":{"get":{"description":"Load all relevant data for an instance of a toolset and environment","operationId":"getInstance","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to load","in":"query","name":"toolset_slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInstanceResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"getInstance instances","tags":["instances"],"x-speakeasy-name-override":"getBySlug","x-speakeasy-react-hook":{"name":"Instance"}}},"/rpc/integrations.get":{"get":{"tags":["integrations"],"summary":"get integrations","description":"Get a third-party integration by ID or name.","operationId":"integrations#get","parameters":[{"name":"id","in":"query","description":"The ID of the integration to get (refers to a package id).","allowEmptyValue":true,"schema":{"type":"string","description":"The ID of the integration to get (refers to a package id)."}},{"name":"name","in":"query","description":"The name of the integration to get (refers to a package name).","allowEmptyValue":true,"schema":{"type":"string","description":"The name of the integration to get (refers to a package name)."}},{"name":"Gram-Session","in":"header","description":"Session header","allowEmptyValue":true,"schema":{"type":"string","description":"Session header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIntegrationResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}]}},"/rpc/integrations.list":{"get":{"description":"List available third-party integrations.","operationId":"listIntegrations","parameters":[{"allowEmptyValue":true,"description":"Keywords to filter integrations by","in":"query","name":"keywords","schema":{"description":"Keywords to filter integrations by","items":{"maxLength":20,"type":"string"},"type":"array"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIntegrationsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"list integrations","tags":["integrations"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListIntegrations"}}},"/rpc/keys.create":{"post":{"description":"Create a new api key","operationId":"createAPIKey","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Key"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createKey keys","tags":["keys"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateAPIKey"}}},"/rpc/keys.list":{"get":{"description":"List all api keys for an organization","operationId":"listAPIKeys","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListKeysResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"listKeys keys","tags":["keys"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListAPIKeys"}}},"/rpc/keys.revoke":{"delete":{"description":"Revoke a api key","operationId":"revokeAPIKey","parameters":[{"allowEmptyValue":true,"description":"The ID of the key to revoke","in":"query","name":"id","required":true,"schema":{"description":"The ID of the key to revoke","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"revokeKey keys","tags":["keys"],"x-speakeasy-name-override":"revokeById","x-speakeasy-react-hook":{"name":"RevokeAPIKey"}}},"/rpc/keys.verify":{"get":{"description":"Verify an api key","operationId":"validateAPIKey","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateKeyResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]}],"summary":"verifyKey keys","tags":["keys"],"x-speakeasy-name-override":"validate","x-speakeasy-react-hook":{"name":"ValidateAPIKey"}}},"/rpc/mcpMetadata.export":{"post":{"description":"Export MCP server details as JSON for documentation and integration purposes.","operationId":"exportMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportMcpMetadataRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpExport"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"exportMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"export","x-speakeasy-react-hook":{"name":"ExportMcpMetadata"}}},"/rpc/mcpMetadata.get":{"get":{"description":"Fetch the metadata that powers the MCP install page.","operationId":"getMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset associated with this install page metadata","in":"query","name":"toolset_slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMcpMetadataResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"GetMcpMetadata"}}},"/rpc/mcpMetadata.set":{"post":{"description":"Create or update the metadata that powers the MCP install page.","operationId":"setMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMcpMetadataRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpMetadata"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"set"}},"/rpc/mcpRegistries.listCatalog":{"get":{"description":"List available MCP servers from configured registries","operationId":"listMCPCatalog","parameters":[{"allowEmptyValue":true,"description":"Filter to a specific registry","in":"query","name":"registry_id","schema":{"description":"Filter to a specific registry","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Search query to filter servers by name","in":"query","name":"search","schema":{"description":"Search query to filter servers by name","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor","in":"query","name":"cursor","schema":{"description":"Pagination cursor","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCatalogResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listCatalog mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"listCatalog","x-speakeasy-react-hook":{"name":"ListMCPCatalog"}}},"/rpc/packages.create":{"post":{"description":"Create a new package for a project.","operationId":"createPackage","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePackageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createPackage packages","tags":["packages"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreatePackage"}}},"/rpc/packages.list":{"get":{"description":"List all packages for a project.","operationId":"listPackages","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPackagesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listPackages packages","tags":["packages"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListPackages"}}},"/rpc/packages.listVersions":{"get":{"description":"List published versions of a package.","operationId":"listVersions","parameters":[{"allowEmptyValue":true,"description":"The name of the package","in":"query","name":"name","required":true,"schema":{"description":"The name of the package","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVersionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listVersions packages","tags":["packages"],"x-speakeasy-name-override":"listVersions","x-speakeasy-react-hook":{"name":"ListVersions"}}},"/rpc/packages.publish":{"post":{"description":"Publish a new version of a package.","operationId":"publish","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPackageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"publish packages","tags":["packages"],"x-speakeasy-name-override":"publish","x-speakeasy-react-hook":{"name":"PublishPackage"}}},"/rpc/packages.update":{"put":{"description":"Update package details.","operationId":"updatePackage","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePackageResult"}}},"description":"OK response."},"304":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotModified"}}},"description":"not_modified: Not Modified response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updatePackage packages","tags":["packages"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdatePackage"}}},"/rpc/productFeatures.set":{"post":{"description":"Enable or disable an organization feature flag.","operationId":"setProductFeature","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProductFeatureRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setProductFeature features","tags":["features"],"x-speakeasy-name-override":"set"}},"/rpc/projects.create":{"post":{"description":"Create a new project.","operationId":"createProject","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"createProject projects","tags":["projects"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateProject"}}},"/rpc/projects.delete":{"delete":{"description":"Delete a project by its ID","operationId":"deleteProject","parameters":[{"allowEmptyValue":true,"description":"The id of the project to delete","in":"query","name":"id","required":true,"schema":{"description":"The id of the project to delete","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"deleteProject projects","tags":["projects"],"x-speakeasy-name-override":"deleteById","x-speakeasy-react-hook":{"name":"DeleteProject"}}},"/rpc/projects.get":{"get":{"description":"Get project details by slug.","operationId":"getProject","parameters":[{"allowEmptyValue":true,"description":"The slug of the project to get","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"getProject projects","tags":["projects"],"x-speakeasy-name-override":"read","x-speakeasy-react-hook":{"name":"Project"}}},"/rpc/projects.list":{"get":{"description":"List all projects for an organization.","operationId":"listProjects","parameters":[{"allowEmptyValue":true,"description":"The ID of the organization to list projects for","in":"query","name":"organization_id","required":true,"schema":{"description":"The ID of the organization to list projects for","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProjectsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listProjects projects","tags":["projects"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListProjects"}}},"/rpc/projects.listAllowedOrigins":{"get":{"description":"List allowed origins for a project.","operationId":"listAllowedOrigins","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAllowedOriginsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAllowedOrigins projects","tags":["projects"],"x-speakeasy-name-override":"listAllowedOrigins","x-speakeasy-react-hook":{"name":"ListAllowedOrigins"}}},"/rpc/projects.setLogo":{"post":{"description":"Uploads a logo for a project.","operationId":"setProjectLogo","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSignedAssetURLForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProjectLogoResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setLogo projects","tags":["projects"],"x-speakeasy-name-override":"setLogo","x-speakeasy-react-hook":{"name":"setProjectLogo"}}},"/rpc/projects.upsertAllowedOrigin":{"post":{"description":"Upsert an allowed origin for a project.","operationId":"upsertAllowedOrigin","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAllowedOriginForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAllowedOriginResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"upsertAllowedOrigin projects","tags":["projects"],"x-speakeasy-name-override":"upsertAllowedOrigin","x-speakeasy-react-hook":{"name":"UpsertAllowedOrigin"}}},"/rpc/resources.list":{"get":{"description":"List all resources for a project","operationId":"listResources","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"The number of resources to return per page","in":"query","name":"limit","schema":{"description":"The number of resources to return per page","format":"int32","type":"integer"}},{"allowEmptyValue":true,"description":"The deployment ID. If unset, latest deployment will be used.","in":"query","name":"deployment_id","schema":{"description":"The deployment ID. If unset, latest deployment will be used.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResourcesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listResources resources","tags":["resources"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListResources"}}},"/rpc/slack.callback":{"get":{"description":"Handles the authentication callback.","operationId":"slackCallback","parameters":[{"allowEmptyValue":true,"description":"The state parameter from the callback","in":"query","name":"state","required":true,"schema":{"description":"The state parameter from the callback","type":"string"}},{"allowEmptyValue":true,"description":"The code parameter from the callback","in":"query","name":"code","required":true,"schema":{"description":"The code parameter from the callback","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"callback slack","tags":["slack"],"x-speakeasy-name-override":"slackCallback","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/slack.deleteConnection":{"delete":{"description":"delete slack connection for an organization and project.","operationId":"deleteSlackConnection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteSlackConnection slack","tags":["slack"],"x-speakeasy-name-override":"deleteSlackConnection","x-speakeasy-react-hook":{"name":"deleteSlackConnection"}}},"/rpc/slack.getConnection":{"get":{"description":"get slack connection for an organization and project.","operationId":"getSlackConnection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSlackConnectionResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getSlackConnection slack","tags":["slack"],"x-speakeasy-name-override":"getSlackConnection","x-speakeasy-react-hook":{"name":"getSlackConnection"}}},"/rpc/slack.updateConnection":{"post":{"description":"update slack connection for an organization and project.","operationId":"updateSlackConnection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSlackConnectionRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSlackConnectionResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateSlackConnection slack","tags":["slack"],"x-speakeasy-name-override":"updateSlackConnection","x-speakeasy-react-hook":{"name":"updateSlackConnection"}}},"/rpc/telemetry.captureEvent":{"post":{"description":"Capture a telemetry event and forward it to PostHog","operationId":"captureEvent","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"captureEvent telemetry","tags":["telemetry"],"x-speakeasy-name-override":"captureEvent"}},"/rpc/telemetry.getObservabilityOverview":{"post":{"description":"Get observability overview metrics including time series, tool breakdowns, and summary stats","operationId":"getObservabilityOverview","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetObservabilityOverviewPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetObservabilityOverviewResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getObservabilityOverview telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getObservabilityOverview","x-speakeasy-react-hook":{"name":"GetObservabilityOverview","type":"query"}}},"/rpc/telemetry.getProjectMetricsSummary":{"post":{"description":"Get aggregated metrics summary for an entire project","operationId":"getProjectMetricsSummary","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMetricsSummaryResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getProjectMetricsSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getProjectMetricsSummary","x-speakeasy-react-hook":{"name":"GetProjectMetricsSummary","type":"query"}}},"/rpc/telemetry.getUserMetricsSummary":{"post":{"description":"Get aggregated metrics summary grouped by user","operationId":"getUserMetricsSummary","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserMetricsSummaryResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getUserMetricsSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getUserMetricsSummary","x-speakeasy-react-hook":{"name":"GetUserMetricsSummary","type":"query"}}},"/rpc/telemetry.listAttributeKeys":{"post":{"description":"List distinct attribute keys available for filtering","operationId":"listAttributeKeys","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAttributeKeysResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAttributeKeys telemetry","tags":["telemetry"],"x-speakeasy-name-override":"listAttributeKeys","x-speakeasy-react-hook":{"name":"ListAttributeKeys","type":"query"}}},"/rpc/telemetry.listFilterOptions":{"post":{"description":"List available filter options (API keys or users) for the observability overview","operationId":"listFilterOptions","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilterOptionsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilterOptionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listFilterOptions telemetry","tags":["telemetry"],"x-speakeasy-name-override":"listFilterOptions","x-speakeasy-react-hook":{"name":"ListFilterOptions","type":"query"}}},"/rpc/telemetry.searchChats":{"post":{"description":"Search and list chat session summaries that match a search filter","operationId":"searchChats","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchChatsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchChatsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchChats telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchChats","x-speakeasy-react-hook":{"name":"SearchChats","type":"query"}}},"/rpc/telemetry.searchLogs":{"post":{"description":"Search and list telemetry logs that match a search filter","operationId":"searchLogs","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchLogsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchLogsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchLogs telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchLogs","x-speakeasy-react-hook":{"name":"SearchLogs"}}},"/rpc/telemetry.searchToolCalls":{"post":{"description":"Search and list tool calls that match a search filter","operationId":"searchToolCalls","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchToolCallsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchToolCallsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchToolCalls telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchToolCalls","x-speakeasy-react-hook":{"name":"SearchToolCalls"}}},"/rpc/telemetry.searchUsers":{"post":{"description":"Search and list user usage summaries grouped by user_id or external_user_id","operationId":"searchUsers","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUsersPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUsersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchUsers telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchUsers","x-speakeasy-react-hook":{"name":"SearchUsers","type":"query"}}},"/rpc/templates.create":{"post":{"description":"Create a new prompt template.","operationId":"createTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromptTemplateForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createTemplate templates","tags":["templates"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateTemplate"}}},"/rpc/templates.delete":{"delete":{"description":"Delete prompt template by its ID or name.","operationId":"deleteTemplate","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template","in":"query","name":"id","schema":{"description":"The ID of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"The name of the prompt template","in":"query","name":"name","schema":{"description":"The name of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteTemplate templates","tags":["templates"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteTemplate"}}},"/rpc/templates.get":{"get":{"description":"Get prompt template by its ID or name.","operationId":"getTemplate","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template","in":"query","name":"id","schema":{"description":"The ID of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"The name of the prompt template","in":"query","name":"name","schema":{"description":"The name of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getTemplate templates","tags":["templates"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"Template"}}},"/rpc/templates.list":{"get":{"description":"List available prompt template.","operationId":"listTemplates","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPromptTemplatesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listTemplates templates","tags":["templates"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"Templates"}}},"/rpc/templates.render":{"post":{"description":"Render a prompt template by ID with provided input data.","operationId":"renderTemplateByID","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template to render","in":"query","name":"id","required":true,"schema":{"description":"The ID of the prompt template to render","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateByIDRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"renderTemplateByID templates","tags":["templates"],"x-speakeasy-name-override":"renderByID","x-speakeasy-react-hook":{"name":"RenderTemplateByID","type":"query"}}},"/rpc/templates.renderDirect":{"post":{"description":"Render a prompt template directly with all template fields provided.","operationId":"renderTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"renderTemplate templates","tags":["templates"],"x-speakeasy-name-override":"render","x-speakeasy-react-hook":{"name":"RenderTemplate","type":"query"}}},"/rpc/templates.update":{"post":{"description":"Update a prompt template.","operationId":"updateTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePromptTemplateForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateTemplate templates","tags":["templates"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateTemplate"}}},"/rpc/tools.list":{"get":{"description":"List all tools for a project","operationId":"listTools","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"The number of tools to return per page","in":"query","name":"limit","schema":{"description":"The number of tools to return per page","format":"int32","type":"integer"}},{"allowEmptyValue":true,"description":"The deployment ID. If unset, latest deployment will be used.","in":"query","name":"deployment_id","schema":{"description":"The deployment ID. If unset, latest deployment will be used.","type":"string"}},{"allowEmptyValue":true,"description":"Filter tools by URN prefix (e.g. 'tools:http:kitchen-sink' to match all tools starting with that prefix)","in":"query","name":"urn_prefix","schema":{"description":"Filter tools by URN prefix (e.g. 'tools:http:kitchen-sink' to match all tools starting with that prefix)","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listTools tools","tags":["tools"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListTools"}}},"/rpc/toolsets.addExternalOAuthServer":{"post":{"description":"Associate an external OAuth server with a toolset","operationId":"addExternalOAuthServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddExternalOAuthServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"addExternalOAuthServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"addExternalOAuthServer","x-speakeasy-react-hook":{"name":"AddExternalOAuthServer"}}},"/rpc/toolsets.addOAuthProxyServer":{"post":{"description":"Associate an OAuth proxy server with a toolset (admin only)","operationId":"addOAuthProxyServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOAuthProxyServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"addOAuthProxyServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"addOAuthProxyServer","x-speakeasy-react-hook":{"name":"AddOAuthProxyServer"}}},"/rpc/toolsets.checkMCPSlugAvailability":{"get":{"description":"Check if a MCP slug is available","operationId":"checkMCPSlugAvailability","parameters":[{"allowEmptyValue":true,"description":"The slug to check","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"boolean"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"checkMCPSlugAvailability toolsets","tags":["toolsets"],"x-speakeasy-name-override":"checkMCPSlugAvailability","x-speakeasy-react-hook":{"name":"CheckMCPSlugAvailability"}}},"/rpc/toolsets.clone":{"post":{"description":"Clone an existing toolset with a new name","operationId":"cloneToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to clone","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Authorization":[],"project_slug_header_Gram-Project":[]}],"summary":"cloneToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"cloneBySlug","x-speakeasy-react-hook":{"name":"CloneToolset"}}},"/rpc/toolsets.create":{"post":{"description":"Create a new toolset with associated tools","operationId":"createToolset","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateToolsetRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateToolset"}}},"/rpc/toolsets.delete":{"delete":{"description":"Delete a toolset by its ID","operationId":"deleteToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"deleteBySlug","x-speakeasy-react-hook":{"name":"DeleteToolset"}}},"/rpc/toolsets.get":{"get":{"description":"Get detailed information about a toolset including full HTTP tool definitions","operationId":"getToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"getBySlug","x-speakeasy-react-hook":{"name":"Toolset"}}},"/rpc/toolsets.list":{"get":{"description":"List all toolsets for a project","operationId":"listToolsets","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolsetsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listToolsets toolsets","tags":["toolsets"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListToolsets"}}},"/rpc/toolsets.removeOAuthServer":{"post":{"description":"Remove OAuth server association from a toolset","operationId":"removeOAuthServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"removeOAuthServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"removeOAuthServer","x-speakeasy-react-hook":{"name":"RemoveOAuthServer"}}},"/rpc/toolsets.update":{"post":{"description":"Update a toolset's properties including name, description, and HTTP tools","operationId":"updateToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolsetRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"updateBySlug","x-speakeasy-react-hook":{"name":"UpdateToolset"}}},"/rpc/usage.createCheckout":{"post":{"description":"Create a checkout link for upgrading to the business plan","operationId":"createCheckout","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createCheckout usage","tags":["usage"],"x-speakeasy-name-override":"createCheckout","x-speakeasy-react-hook":{"name":"createCheckout"}}},"/rpc/usage.createCustomerSession":{"post":{"description":"Create a customer session for the user","operationId":"createCustomerSession","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createCustomerSession usage","tags":["usage"],"x-speakeasy-name-override":"createCustomerSession","x-speakeasy-react-hook":{"name":"createCustomerSession"}}},"/rpc/usage.getPeriodUsage":{"get":{"description":"Get the usage for a project for a given period","operationId":"getPeriodUsage","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodUsage"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getPeriodUsage usage","tags":["usage"],"x-speakeasy-name-override":"getPeriodUsage","x-speakeasy-react-hook":{"name":"getPeriodUsage"}}},"/rpc/usage.getUsageTiers":{"get":{"description":"Get the usage tiers","operationId":"getUsageTiers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageTiers"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"getUsageTiers usage","tags":["usage"],"x-speakeasy-name-override":"getUsageTiers","x-speakeasy-react-hook":{"name":"getUsageTiers"}}},"/rpc/variations.deleteGlobal":{"delete":{"description":"Create or update a globally defined tool variation.","operationId":"deleteGlobalVariation","parameters":[{"allowEmptyValue":true,"description":"The ID of the variation to delete","in":"query","name":"variation_id","required":true,"schema":{"description":"The ID of the variation to delete","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGlobalToolVariationResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteGlobal variations","tags":["variations"],"x-speakeasy-name-override":"deleteGlobal","x-speakeasy-react-hook":{"name":"deleteGlobalVariation"}}},"/rpc/variations.listGlobal":{"get":{"description":"List globally defined tool variations.","operationId":"listGlobalVariations","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVariationsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listGlobal variations","tags":["variations"],"x-speakeasy-name-override":"listGlobal","x-speakeasy-react-hook":{"name":"GlobalVariations"}}},"/rpc/variations.upsertGlobal":{"post":{"description":"Create or update a globally defined tool variation.","operationId":"upsertGlobalVariation","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalToolVariationForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalToolVariationResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"upsertGlobal variations","tags":["variations"],"x-speakeasy-name-override":"upsertGlobal","x-speakeasy-react-hook":{"name":"UpsertGlobalVariation"}}},"/rpc/workflows.createResponse":{"post":{"tags":["agentworkflows"],"summary":"createResponse agentworkflows","description":"Create a new agent response. Executes an agent workflow with the provided input and tools.","operationId":"createResponse","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentRequest"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentResponseOutput"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/workflows.deleteResponse":{"delete":{"tags":["agentworkflows"],"summary":"deleteResponse agentworkflows","description":"Deletes any response associated with a given agent run.","operationId":"deleteResponse","parameters":[{"name":"response_id","in":"query","description":"The ID of the response to retrieve","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"The ID of the response to retrieve"}},{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"responses":{"200":{"description":"OK response."},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/workflows.getResponse":{"get":{"tags":["agentworkflows"],"summary":"getResponse agentworkflows","description":"Get the status of an async agent response by its ID.","operationId":"getResponse","parameters":[{"name":"response_id","in":"query","description":"The ID of the response to retrieve","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"The ID of the response to retrieve"}},{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentResponseOutput"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/{project_slug}/slack.login":{"get":{"description":"Proxies to auth login through speakeasy oidc.","operationId":"slackLogin","parameters":[{"in":"path","name":"project_slug","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"description":"The dashboard location to return too","in":"query","name":"return_url","schema":{"description":"The dashboard location to return too","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_query_project_slug":[],"session_header_Gram-Session":[]}],"summary":"login slack","tags":["slack"],"x-speakeasy-name-override":"slackLogin","x-speakeasy-react-hook":{"disabled":true}}}},"components":{"schemas":{"AddDeploymentPackageForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package."},"version":{"type":"string","description":"The version of the package."}},"required":["name"]},"AddExternalMCPForm":{"type":"object","properties":{"name":{"type":"string","description":"The display name for the external MCP server.","example":"My Slack Integration"},"registry_id":{"type":"string","description":"The ID of the MCP registry the server is from.","format":"uuid"},"registry_server_specifier":{"type":"string","description":"The canonical server name used to look up the server in the registry (e.g., 'slack', 'ai.exa/exa').","example":"slack"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["registry_id","name","slug","registry_server_specifier"]},"AddExternalOAuthServerForm":{"type":"object","properties":{"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServerForm"},"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","external_oauth_server"]},"AddExternalOAuthServerRequestBody":{"type":"object","properties":{"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServerForm"}},"required":["external_oauth_server"]},"AddFunctionsForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the functions file from the assets service."},"name":{"type":"string","description":"The functions file display name."},"runtime":{"type":"string","description":"The runtime to use when executing functions. Allowed values are: nodejs:22, nodejs:24, python:3.12."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug","runtime"]},"AddOAuthProxyServerForm":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerForm"},"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","oauth_proxy_server"]},"AddOAuthProxyServerRequestBody":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerForm"}},"required":["oauth_proxy_server"]},"AddOpenAPIv3DeploymentAssetForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug"]},"AddOpenAPIv3SourceForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug"]},"AddOpenAPIv3SourceResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"AddPackageForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package to add."},"version":{"type":"string","description":"The version of the package to add. If omitted, the latest version will be used."}},"required":["name"]},"AllowedOrigin":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the allowed origin.","format":"date-time"},"id":{"type":"string","description":"The ID of the allowed origin"},"origin":{"type":"string","description":"The origin URL"},"project_id":{"type":"string","description":"The ID of the project"},"status":{"type":"string","default":"pending","enum":["pending","approved","rejected"]},"updated_at":{"type":"string","description":"The last update date of the allowed origin.","format":"date-time"}},"required":["id","project_id","origin","status","created_at","updated_at"]},"Asset":{"type":"object","properties":{"content_length":{"type":"integer","description":"The content length of the asset","format":"int64"},"content_type":{"type":"string","description":"The content type of the asset"},"created_at":{"type":"string","description":"The creation date of the asset.","format":"date-time"},"id":{"type":"string","description":"The ID of the asset"},"kind":{"type":"string","enum":["openapiv3","image","functions","chat_attachment","unknown"]},"sha256":{"type":"string","description":"The SHA256 hash of the asset"},"updated_at":{"type":"string","description":"The last update date of the asset.","format":"date-time"}},"required":["id","kind","sha256","content_type","content_length","created_at","updated_at"]},"AttributeFilter":{"type":"object","properties":{"op":{"type":"string","description":"Comparison operator","default":"eq","enum":["eq","not_eq","contains","exists","not_exists"]},"path":{"type":"string","description":"Attribute path. Use @ prefix for custom attributes (e.g. '@user.region'), or bare path for system attributes (e.g. 'http.route').","example":"@user.region","pattern":"^@?[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*$","minLength":1,"maxLength":256},"value":{"type":"string","description":"Value to compare against (ignored for 'exists' and 'not_exists' operators)","example":"us-east-1","maxLength":1024}},"description":"Filter on a log attribute by path.","required":["path"]},"BaseResourceAttributes":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the resource.","format":"date-time"},"description":{"type":"string","description":"Description of the resource"},"id":{"type":"string","description":"The ID of the resource"},"mime_type":{"type":"string","description":"Optional MIME type of the resource"},"name":{"type":"string","description":"The name of the resource"},"project_id":{"type":"string","description":"The ID of the project"},"resource_urn":{"type":"string","description":"The URN of this resource"},"title":{"type":"string","description":"Optional title for the resource"},"updated_at":{"type":"string","description":"The last update date of the resource.","format":"date-time"},"uri":{"type":"string","description":"The URI of the resource"}},"description":"Common attributes shared by all resource types","required":["id","project_id","name","description","uri","resource_urn","created_at","updated_at"]},"BaseToolAttributes":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"description":{"type":"string","description":"Description of the tool"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"project_id":{"type":"string","description":"The ID of the project"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"Common attributes shared by all tool types","required":["id","project_id","name","canonical_name","description","schema","tool_urn","created_at","updated_at"]},"CanonicalToolAttributes":{"type":"object","properties":{"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"description":{"type":"string","description":"Description of the tool"},"name":{"type":"string","description":"The name of the tool"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"variation_id":{"type":"string","description":"The ID of the variation that was applied to the tool"}},"description":"The original details of a tool","required":["variation_id","name","description"]},"CaptureEventPayload":{"type":"object","properties":{"distinct_id":{"type":"string","description":"Distinct ID for the user or entity (defaults to organization ID if not provided)"},"event":{"type":"string","description":"Event name","example":"button_clicked","minLength":1,"maxLength":255},"properties":{"type":"object","description":"Event properties as key-value pairs","example":{"button_name":"submit","page":"checkout","value":100},"additionalProperties":true}},"description":"Payload for capturing a telemetry event","required":["event"]},"CaptureEventResult":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the event was successfully captured"}},"description":"Result of capturing a telemetry event","required":["success"]},"Chat":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"},"description":"The list of messages in the chat"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"title":{"type":"string","description":"The title of the chat"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"required":["messages","id","title","num_messages","created_at","updated_at"]},"ChatMessage":{"type":"object","properties":{"content":{"type":"string","description":"The content of the message"},"created_at":{"type":"string","description":"When the message was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the message"},"finish_reason":{"type":"string","description":"The finish reason of the message"},"id":{"type":"string","description":"The ID of the message"},"model":{"type":"string","description":"The model that generated the message"},"role":{"type":"string","description":"The role of the message"},"tool_call_id":{"type":"string","description":"The tool call ID of the message"},"tool_calls":{"type":"string","description":"The tool calls in the message as a JSON blob"},"user_id":{"type":"string","description":"The ID of the user who created the message"}},"required":["id","role","model","created_at"]},"ChatOverview":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"title":{"type":"string","description":"The title of the chat"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"required":["id","title","num_messages","created_at","updated_at"]},"ChatOverviewWithResolutions":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"resolutions":{"type":"array","items":{"$ref":"#/components/schemas/ChatResolution"},"description":"List of resolutions for this chat"},"title":{"type":"string","description":"The title of the chat"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"description":"Chat overview with embedded resolution data","required":["resolutions","id","title","num_messages","created_at","updated_at"]},"ChatResolution":{"type":"object","properties":{"created_at":{"type":"string","description":"When resolution was created","format":"date-time"},"id":{"type":"string","description":"Resolution ID","format":"uuid"},"message_ids":{"type":"array","items":{"type":"string"},"description":"Message IDs associated with this resolution","example":["abc-123","def-456"]},"resolution":{"type":"string","description":"Resolution status"},"resolution_notes":{"type":"string","description":"Notes about the resolution"},"score":{"type":"integer","description":"Score 0-100","format":"int64"},"user_goal":{"type":"string","description":"User's intended goal"}},"description":"Resolution information for a chat","required":["id","user_goal","resolution","resolution_notes","score","created_at","message_ids"]},"ChatSummary":{"type":"object","properties":{"duration_seconds":{"type":"number","description":"Chat session duration in seconds","format":"double"},"end_time_unix_nano":{"type":"integer","description":"Latest log timestamp in Unix nanoseconds","format":"int64"},"gram_chat_id":{"type":"string","description":"Chat session ID"},"log_count":{"type":"integer","description":"Total number of logs in this chat session","format":"int64"},"message_count":{"type":"integer","description":"Number of LLM completion messages in this chat session","format":"int64"},"model":{"type":"string","description":"LLM model used in this chat session"},"start_time_unix_nano":{"type":"integer","description":"Earliest log timestamp in Unix nanoseconds","format":"int64"},"status":{"type":"string","description":"Chat session status","enum":["success","error"]},"tool_call_count":{"type":"integer","description":"Number of tool calls in this chat session","format":"int64"},"total_input_tokens":{"type":"integer","description":"Total input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Total output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Total tokens used (input + output)","format":"int64"},"user_id":{"type":"string","description":"User ID associated with this chat session"}},"description":"Summary information for a chat session","required":["gram_chat_id","start_time_unix_nano","end_time_unix_nano","log_count","tool_call_count","message_count","duration_seconds","status","total_input_tokens","total_output_tokens","total_tokens"]},"CreateDeploymentForm":{"type":"object","properties":{"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"}},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"}},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"}},"packages":{"type":"array","items":{"$ref":"#/components/schemas/AddDeploymentPackageForm"}}},"required":["idempotency_key"]},"CreateDeploymentRequestBody":{"type":"object","properties":{"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"}},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"}},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"}},"packages":{"type":"array","items":{"$ref":"#/components/schemas/AddDeploymentPackageForm"}}}},"CreateDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"CreateDomainRequestBody":{"type":"object","properties":{"domain":{"type":"string","description":"The custom domain"}},"required":["domain"]},"CreateEnvironmentForm":{"type":"object","properties":{"description":{"type":"string","description":"Optional description of the environment"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment variable entries"},"name":{"type":"string","description":"The name of the environment"},"organization_id":{"type":"string","description":"The organization ID this environment belongs to"}},"description":"Form for creating a new environment","required":["organization_id","name","entries"]},"CreateKeyForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key"},"scopes":{"type":"array","items":{"type":"string"},"description":"The scopes of the key that determines its permissions.","minItems":1}},"required":["name","scopes"]},"CreatePackageForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the package. Limited markdown syntax is supported.","maxLength":10000},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package","maxLength":50},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package","maxItems":5},"name":{"type":"string","description":"The name of the package","pattern":"^[a-z0-9_-]{1,128}$","maxLength":100},"summary":{"type":"string","description":"The summary of the package","maxLength":80},"title":{"type":"string","description":"The title of the package","maxLength":100},"url":{"type":"string","description":"External URL for the package owner","maxLength":100}},"required":["name","title","summary"]},"CreatePackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"}},"required":["package"]},"CreateProjectForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"name":{"type":"string","description":"The name of the project","maxLength":40},"organization_id":{"type":"string","description":"The ID of the organization to create the project in"},"session_token":{"type":"string"}},"required":["organization_id","name"]},"CreateProjectRequestBody":{"type":"object","properties":{"name":{"type":"string","description":"The name of the project","maxLength":40},"organization_id":{"type":"string","description":"The ID of the organization to create the project in"}},"required":["organization_id","name"]},"CreateProjectResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"CreatePromptTemplateForm":{"type":"object","properties":{"arguments":{"type":"string","description":"The JSON Schema defining the placeholders found in the prompt template","format":"json"},"description":{"type":"string","description":"The description of the prompt template"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"prompt":{"type":"string","description":"The template content"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20}},"required":["name","prompt","engine","kind"]},"CreatePromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"CreateRequestBody":{"type":"object","properties":{"embed_origin":{"type":"string","description":"The origin from which the token will be used"},"expires_after":{"type":"integer","description":"Token expiration in seconds (max / default 3600)","default":3600,"format":"int64","minimum":1,"maximum":3600},"user_identifier":{"type":"string","description":"Optional free-form user identifier"}},"required":["embed_origin"]},"CreateResponseBody":{"type":"object","properties":{"client_token":{"type":"string","description":"JWT token for chat session"},"embed_origin":{"type":"string","description":"The origin from which the token will be used"},"expires_after":{"type":"integer","description":"Token expiration in seconds","format":"int64"},"status":{"type":"string","description":"Session status"},"user_identifier":{"type":"string","description":"User identifier if provided"}},"required":["embed_origin","client_token","expires_after","status"]},"CreateSignedChatAttachmentURLForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"id":{"type":"string","description":"The ID of the chat attachment"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"ttl_seconds":{"type":"integer","description":"Time-to-live in seconds (default: 600, max: 3600)","format":"int64"}},"required":["id","project_id"]},"CreateSignedChatAttachmentURLForm2":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the chat attachment"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"ttl_seconds":{"type":"integer","description":"Time-to-live in seconds (default: 600, max: 3600)","format":"int64"}},"required":["id","project_id"]},"CreateSignedChatAttachmentURLResult":{"type":"object","properties":{"expires_at":{"type":"string","description":"When the signed URL expires","format":"date-time"},"url":{"type":"string","description":"The signed URL to access the chat attachment"}},"required":["url","expires_at"]},"CreateToolsetForm":{"type":"object","properties":{"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"name":{"type":"string","description":"The name of the toolset"},"project_slug_input":{"type":"string"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["name"]},"CreateToolsetRequestBody":{"type":"object","properties":{"default_environment_slug":{"type":"string","description":"The slug of the environment to use as the default for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"name":{"type":"string","description":"The name of the toolset"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["name"]},"CreditUsageResponseBody":{"type":"object","properties":{"credits_used":{"type":"number","description":"The number of credits remaining","format":"double"},"monthly_credits":{"type":"integer","description":"The number of monthly credits","format":"int64"}},"required":["credits_used","monthly_credits"]},"CustomDomain":{"type":"object","properties":{"activated":{"type":"boolean","description":"Whether the domain is activated in ingress"},"created_at":{"type":"string","description":"When the custom domain was created.","format":"date-time"},"domain":{"type":"string","description":"The custom domain name"},"id":{"type":"string","description":"The ID of the custom domain"},"is_updating":{"type":"boolean","description":"The custom domain is actively being registered"},"organization_id":{"type":"string","description":"The ID of the organization this domain belongs to"},"updated_at":{"type":"string","description":"When the custom domain was last updated.","format":"date-time"},"verified":{"type":"boolean","description":"Whether the domain is verified"}},"required":["id","organization_id","domain","verified","activated","created_at","updated_at","is_updating"]},"DeleteGlobalToolVariationForm":{"type":"object","properties":{"variation_id":{"type":"string","description":"The ID of the variation to delete"}},"required":["variation_id"]},"DeleteGlobalToolVariationResult":{"type":"object","properties":{"variation_id":{"type":"string","description":"The ID of the variation that was deleted"}},"required":["variation_id"]},"Deployment":{"type":"object","properties":{"cloned_from":{"type":"string","description":"The ID of the deployment that this deployment was cloned from.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentExternalMCP"},"description":"The external MCP servers that were deployed."},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions_assets":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentFunctions"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/OpenAPIv3DeploymentAsset"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"organization_id":{"type":"string","description":"The ID of the organization that the deployment belongs to."},"packages":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentPackage"},"description":"The packages that were deployed."},"project_id":{"type":"string","description":"The ID of the project that the deployment belongs to."},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","organization_id","project_id","user_id","openapiv3_assets","status","packages","openapiv3_tool_count","functions_tool_count","external_mcp_tool_count"]},"DeploymentExternalMCP":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment external MCP record."},"name":{"type":"string","description":"The display name for the external MCP server."},"registry_id":{"type":"string","description":"The ID of the MCP registry the server is from."},"registry_server_specifier":{"type":"string","description":"The canonical server name used to look up the server in the registry."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","registry_id","name","slug","registry_server_specifier"]},"DeploymentFunctions":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"id":{"type":"string","description":"The ID of the deployment asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"runtime":{"type":"string","description":"The runtime to use when executing functions."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","asset_id","name","slug","runtime"]},"DeploymentLogEvent":{"type":"object","properties":{"attachment_id":{"type":"string","description":"The ID of the asset tied to the log event"},"attachment_type":{"type":"string","description":"The type of the asset tied to the log event"},"created_at":{"type":"string","description":"The creation date of the log event"},"event":{"type":"string","description":"The type of event that occurred"},"id":{"type":"string","description":"The ID of the log event"},"message":{"type":"string","description":"The message of the log event"}},"required":["id","created_at","event","message"]},"DeploymentPackage":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment package."},"name":{"type":"string","description":"The name of the package."},"version":{"type":"string","description":"The version of the package."}},"required":["id","name","version"]},"DeploymentSummary":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_mcp_asset_count":{"type":"integer","description":"The number of external MCP server assets.","format":"int64"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"functions_asset_count":{"type":"integer","description":"The number of Functions assets.","format":"int64"},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"openapiv3_asset_count":{"type":"integer","description":"The number of upstream OpenAPI assets.","format":"int64"},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","user_id","status","openapiv3_asset_count","openapiv3_tool_count","functions_asset_count","functions_tool_count","external_mcp_asset_count","external_mcp_tool_count"]},"Environment":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the environment","format":"date-time"},"description":{"type":"string","description":"The description of the environment"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntry"},"description":"List of environment entries"},"id":{"type":"string","description":"The ID of the environment"},"name":{"type":"string","description":"The name of the environment"},"organization_id":{"type":"string","description":"The organization ID this environment belongs to"},"project_id":{"type":"string","description":"The project ID this environment belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the environment was last updated","format":"date-time"}},"description":"Model representing an environment","required":["id","organization_id","project_id","name","slug","entries","created_at","updated_at"]},"EnvironmentEntry":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the environment entry","format":"date-time"},"name":{"type":"string","description":"The name of the environment variable"},"updated_at":{"type":"string","description":"When the environment entry was last updated","format":"date-time"},"value":{"type":"string","description":"Redacted values of the environment variable"},"value_hash":{"type":"string","description":"Hash of the value to identify matching values across environments without exposing the actual value"}},"description":"A single environment entry","required":["name","value","value_hash","created_at","updated_at"]},"EnvironmentEntryInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the environment variable"},"value":{"type":"string","description":"The value of the environment variable"}},"description":"A single environment entry","required":["name","value"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"description":"unauthorized access","required":["name","id","message","temporary","timeout","fault"]},"EvolveForm":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The ID of the deployment to evolve. If omitted, the latest deployment will be used."},"exclude_external_mcps":{"type":"array","items":{"type":"string"},"description":"The external MCP servers, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_functions":{"type":"array","items":{"type":"string"},"description":"The functions, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_openapiv3_assets":{"type":"array","items":{"type":"string"},"description":"The OpenAPI 3.x documents, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_packages":{"type":"array","items":{"type":"string"},"description":"The packages to exclude from the new deployment when cloning a previous deployment."},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"upsert_external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"},"description":"The external MCP servers to upsert in the new deployment."},"upsert_functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"},"description":"The tool functions to upsert in the new deployment."},"upsert_openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"},"description":"The OpenAPI 3.x documents to upsert in the new deployment."},"upsert_packages":{"type":"array","items":{"$ref":"#/components/schemas/AddPackageForm"},"description":"The packages to upsert in the new deployment."}}},"EvolveResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"ExportMcpMetadataRequestBody":{"type":"object","properties":{"mcp_slug":{"type":"string","description":"The MCP server slug (from the install URL)","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["mcp_slug"]},"ExternalMCPHeaderDefinition":{"type":"object","properties":{"description":{"type":"string","description":"Description of the header"},"header_name":{"type":"string","description":"The actual HTTP header name to send (e.g., X-Api-Key)"},"name":{"type":"string","description":"The prefixed environment variable name (e.g., SLACK_X_API_KEY)"},"placeholder":{"type":"string","description":"Placeholder value for the header"},"required":{"type":"boolean","description":"Whether the header is required"},"secret":{"type":"boolean","description":"Whether the header value is secret"}},"required":["name","header_name","required","secret"]},"ExternalMCPServer":{"type":"object","properties":{"description":{"type":"string","description":"Description of what the server does"},"icon_url":{"type":"string","description":"URL to the server's icon","format":"uri"},"meta":{"description":"Opaque metadata from the registry"},"registry_id":{"type":"string","description":"ID of the registry this server came from","format":"uuid"},"registry_specifier":{"type":"string","description":"Server specifier used to look up in the registry (e.g., 'io.github.user/server')","example":"io.modelcontextprotocol.anonymous/exa"},"title":{"type":"string","description":"Display name for the server"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPTool"},"description":"Tools available on the server"},"version":{"type":"string","description":"Semantic version of the server","example":"1.0.0"}},"description":"An MCP server from an external registry","required":["registry_specifier","version","description","registry_id"]},"ExternalMCPTool":{"type":"object","properties":{"annotations":{"description":"Annotations for the tool"},"description":{"type":"string","description":"Description of the tool"},"input_schema":{"description":"Input schema for the tool"},"name":{"type":"string","description":"Name of the tool"}}},"ExternalMCPToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"deployment_external_mcp_id":{"type":"string","description":"The ID of the deployments_external_mcps record"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"oauth_authorization_endpoint":{"type":"string","description":"The OAuth authorization endpoint URL"},"oauth_registration_endpoint":{"type":"string","description":"The OAuth dynamic client registration endpoint URL"},"oauth_scopes_supported":{"type":"array","items":{"type":"string"},"description":"The OAuth scopes supported by the server"},"oauth_token_endpoint":{"type":"string","description":"The OAuth token endpoint URL"},"oauth_version":{"type":"string","description":"OAuth version: '2.1' (MCP OAuth), '2.0' (legacy), or 'none'"},"project_id":{"type":"string","description":"The ID of the project"},"registry_id":{"type":"string","description":"The ID of the MCP registry"},"registry_server_name":{"type":"string","description":"The name of the external MCP server (e.g., exa)"},"registry_specifier":{"type":"string","description":"The specifier of the external MCP server (e.g., 'io.modelcontextprotocol.anonymous/exa')"},"remote_url":{"type":"string","description":"The URL to connect to the MCP server"},"requires_oauth":{"type":"boolean","description":"Whether the external MCP server requires OAuth authentication"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"slug":{"type":"string","description":"The slug used for tool prefixing (e.g., github)"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"transport_type":{"type":"string","description":"The transport type used to connect to the MCP server","enum":["streamable-http","sse"]},"type":{"type":"string","description":"Whether or not the tool is a proxy tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A proxy tool that references an external MCP server","required":["deployment_external_mcp_id","deployment_id","registry_specifier","registry_server_name","registry_id","slug","remote_url","transport_type","requires_oauth","oauth_version","created_at","updated_at","id","project_id","name","canonical_name","description","schema","tool_urn"]},"ExternalOAuthServer":{"type":"object","properties":{"created_at":{"type":"string","description":"When the external OAuth server was created.","format":"date-time"},"id":{"type":"string","description":"The ID of the external OAuth server"},"metadata":{"description":"The metadata for the external OAuth server"},"project_id":{"type":"string","description":"The project ID this external OAuth server belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the external OAuth server was last updated.","format":"date-time"}},"required":["id","project_id","slug","metadata","created_at","updated_at"]},"ExternalOAuthServerForm":{"type":"object","properties":{"metadata":{"description":"The metadata for the external OAuth server"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","metadata"]},"FetchOpenAPIv3FromURLForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"url":{"type":"string","description":"The URL to fetch the OpenAPI document from"}},"required":["url"]},"FetchOpenAPIv3FromURLForm2":{"type":"object","properties":{"url":{"type":"string","description":"The URL to fetch the OpenAPI document from"}},"required":["url"]},"FilterOption":{"type":"object","properties":{"count":{"type":"integer","description":"Number of events for this option","format":"int64"},"id":{"type":"string","description":"Unique identifier for the option"},"label":{"type":"string","description":"Display label for the option"}},"description":"A single filter option (API key or user)","required":["id","label","count"]},"FunctionEnvironmentVariable":{"type":"object","properties":{"auth_input_type":{"type":"string","description":"Optional value of the function variable comes from a specific auth input"},"description":{"type":"string","description":"Description of the function environment variable"},"name":{"type":"string","description":"The environment variables"}},"required":["name"]},"FunctionResourceDefinition":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the resource.","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the resource"},"function_id":{"type":"string","description":"The ID of the function"},"id":{"type":"string","description":"The ID of the resource"},"meta":{"type":"object","description":"Meta tags for the tool","additionalProperties":true},"mime_type":{"type":"string","description":"Optional MIME type of the resource"},"name":{"type":"string","description":"The name of the resource"},"project_id":{"type":"string","description":"The ID of the project"},"resource_urn":{"type":"string","description":"The URN of this resource"},"runtime":{"type":"string","description":"Runtime environment (e.g., nodejs:24, python:3.12)"},"title":{"type":"string","description":"Optional title for the resource"},"updated_at":{"type":"string","description":"The last update date of the resource.","format":"date-time"},"uri":{"type":"string","description":"The URI of the resource"},"variables":{"description":"Variables configuration for the resource"}},"description":"A function resource","required":["deployment_id","function_id","runtime","id","project_id","name","description","uri","resource_urn","created_at","updated_at"]},"FunctionToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"asset_id":{"type":"string","description":"The ID of the asset"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"function_id":{"type":"string","description":"The ID of the function"},"id":{"type":"string","description":"The ID of the tool"},"meta":{"type":"object","description":"Meta tags for the tool","additionalProperties":true},"name":{"type":"string","description":"The name of the tool"},"project_id":{"type":"string","description":"The ID of the project"},"runtime":{"type":"string","description":"Runtime environment (e.g., nodejs:24, python:3.12)"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variables":{"description":"Variables configuration for the function"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A function tool","required":["deployment_id","asset_id","function_id","runtime","id","project_id","name","canonical_name","description","schema","tool_urn","created_at","updated_at"]},"GenerateTitleResponseBody":{"type":"object","properties":{"title":{"type":"string","description":"The generated title"}},"required":["title"]},"GetActiveDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"GetDeploymentForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment"}},"required":["id"]},"GetDeploymentLogsForm":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor to fetch results from"},"deployment_id":{"type":"string","description":"The ID of the deployment"}},"required":["deployment_id"]},"GetDeploymentLogsResult":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentLogEvent"},"description":"The logs for the deployment"},"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"status":{"type":"string","description":"The status of the deployment"}},"required":["events","status"]},"GetDeploymentResult":{"type":"object","properties":{"cloned_from":{"type":"string","description":"The ID of the deployment that this deployment was cloned from.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentExternalMCP"},"description":"The external MCP servers that were deployed."},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions_assets":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentFunctions"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/OpenAPIv3DeploymentAsset"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"organization_id":{"type":"string","description":"The ID of the organization that the deployment belongs to."},"packages":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentPackage"},"description":"The packages that were deployed."},"project_id":{"type":"string","description":"The ID of the project that the deployment belongs to."},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","organization_id","project_id","user_id","openapiv3_assets","status","packages","openapiv3_tool_count","functions_tool_count","external_mcp_tool_count"]},"GetInstanceForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"toolset_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug"]},"GetInstanceResult":{"type":"object","properties":{"description":{"type":"string","description":"The description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"mcp_servers":{"type":"array","items":{"$ref":"#/components/schemas/InstanceMcpServer"},"description":"The MCP servers that are relevant to the toolset"},"name":{"type":"string","description":"The name of the toolset"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The list of prompt templates"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The list of tools"}},"required":["name","tools","mcp_servers"]},"GetIntegrationForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the integration to get (refers to a package id)."},"name":{"type":"string","description":"The name of the integration to get (refers to a package name)."}},"description":"Get a third-party integration by ID or name."},"GetIntegrationResult":{"type":"object","properties":{"integration":{"$ref":"#/components/schemas/Integration"}}},"GetLatestDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"GetMcpMetadataResponseBody":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/McpMetadata"}}},"GetMetricsSummaryResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"metrics":{"$ref":"#/components/schemas/ProjectSummary"}},"description":"Result of metrics summary query","required":["metrics","enabled"]},"GetObservabilityOverviewPayload":{"type":"object","properties":{"api_key_id":{"type":"string","description":"Optional API key ID filter"},"external_user_id":{"type":"string","description":"Optional external user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"include_time_series":{"type":"boolean","description":"Whether to include time series data (default: true)","default":true},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"},"toolset_id":{"type":"string","description":"Optional toolset/MCP server ID filter"}},"description":"Payload for getting observability overview metrics","required":["from","to"]},"GetObservabilityOverviewResult":{"type":"object","properties":{"comparison":{"$ref":"#/components/schemas/ObservabilitySummary"},"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"interval_seconds":{"type":"integer","description":"The time bucket interval in seconds used for the time series data","format":"int64"},"summary":{"$ref":"#/components/schemas/ObservabilitySummary"},"time_series":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesBucket"},"description":"Time series data points"},"top_tools_by_count":{"type":"array","items":{"$ref":"#/components/schemas/ToolMetric"},"description":"Top tools by call count"},"top_tools_by_failure_rate":{"type":"array","items":{"$ref":"#/components/schemas/ToolMetric"},"description":"Top tools by failure rate"}},"description":"Result of observability overview query","required":["summary","comparison","time_series","top_tools_by_count","top_tools_by_failure_rate","interval_seconds","enabled"]},"GetProjectForm":{"type":"object","properties":{"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug"]},"GetProjectMetricsSummaryPayload":{"type":"object","properties":{"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for getting project-level metrics summary","required":["from","to"]},"GetProjectResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"GetPromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"GetSignedAssetURLForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the function asset"}},"required":["asset_id"]},"GetSignedAssetURLResult":{"type":"object","properties":{"url":{"type":"string","description":"The signed URL to access the asset"}},"required":["url"]},"GetSlackConnectionResult":{"type":"object","properties":{"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"default_toolset_slug":{"type":"string","description":"The default toolset slug for this Slack connection"},"slack_team_id":{"type":"string","description":"The ID of the connected Slack team"},"slack_team_name":{"type":"string","description":"The name of the connected Slack team"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"}},"required":["slack_team_name","slack_team_id","default_toolset_slug","created_at","updated_at"]},"GetUserMetricsSummaryPayload":{"type":"object","properties":{"external_user_id":{"type":"string","description":"External user ID to get metrics for (mutually exclusive with user_id)"},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"},"user_id":{"type":"string","description":"User ID to get metrics for (mutually exclusive with external_user_id)"}},"description":"Payload for getting user-level metrics summary","required":["from","to"]},"GetUserMetricsSummaryResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"metrics":{"$ref":"#/components/schemas/ProjectSummary"}},"description":"Result of user metrics summary query","required":["metrics","enabled"]},"HTTPToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"asset_id":{"type":"string","description":"The ID of the asset"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"default_server_url":{"type":"string","description":"The default server URL for the tool"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"http_method":{"type":"string","description":"HTTP method for the request"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"openapiv3_document_id":{"type":"string","description":"The ID of the OpenAPI v3 document"},"openapiv3_operation":{"type":"string","description":"OpenAPI v3 operation"},"package_name":{"type":"string","description":"The name of the source package"},"path":{"type":"string","description":"Path for the request"},"project_id":{"type":"string","description":"The ID of the project"},"response_filter":{"$ref":"#/components/schemas/ResponseFilter"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"security":{"type":"string","description":"Security requirements for the underlying HTTP endpoint"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"summary":{"type":"string","description":"Summary of the tool"},"tags":{"type":"array","items":{"type":"string"},"description":"The tags list for this http tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"An HTTP tool","required":["summary","tags","http_method","path","schema","deployment_id","asset_id","id","project_id","name","canonical_name","description","tool_urn","created_at","updated_at"]},"InfoResponseBody":{"type":"object","properties":{"active_organization_id":{"type":"string"},"gram_account_type":{"type":"string"},"is_admin":{"type":"boolean"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationEntry"}},"user_display_name":{"type":"string"},"user_email":{"type":"string"},"user_id":{"type":"string"},"user_photo_url":{"type":"string"},"user_signature":{"type":"string"}},"required":["user_id","user_email","is_admin","active_organization_id","organizations","gram_account_type"]},"InstanceMcpServer":{"type":"object","properties":{"url":{"type":"string","description":"The address of the MCP server"}},"required":["url"]},"Integration":{"type":"object","properties":{"package_description":{"type":"string"},"package_description_raw":{"type":"string"},"package_id":{"type":"string"},"package_image_asset_id":{"type":"string"},"package_keywords":{"type":"array","items":{"type":"string"}},"package_name":{"type":"string"},"package_summary":{"type":"string"},"package_title":{"type":"string"},"package_url":{"type":"string"},"tool_names":{"type":"array","items":{"type":"string"}},"version":{"type":"string","description":"The latest version of the integration"},"version_created_at":{"type":"string","format":"date-time"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationVersion"}}},"required":["package_id","package_name","package_title","package_summary","version","version_created_at","tool_names"]},"IntegrationEntry":{"type":"object","properties":{"package_id":{"type":"string"},"package_image_asset_id":{"type":"string"},"package_keywords":{"type":"array","items":{"type":"string"}},"package_name":{"type":"string"},"package_summary":{"type":"string"},"package_title":{"type":"string"},"package_url":{"type":"string"},"tool_names":{"type":"array","items":{"type":"string"}},"version":{"type":"string"},"version_created_at":{"type":"string","format":"date-time"}},"required":["package_id","package_name","version","version_created_at","tool_names"]},"IntegrationVersion":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"version":{"type":"string"}},"required":["version","created_at"]},"Key":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the key.","format":"date-time"},"created_by_user_id":{"type":"string","description":"The ID of the user who created this key"},"id":{"type":"string","description":"The ID of the key"},"key":{"type":"string","description":"The token of the api key (only returned on key creation)"},"key_prefix":{"type":"string","description":"The store prefix of the api key for recognition"},"last_accessed_at":{"type":"string","description":"When the key was last accessed.","format":"date-time"},"name":{"type":"string","description":"The name of the key"},"organization_id":{"type":"string","description":"The organization ID this key belongs to"},"project_id":{"type":"string","description":"The optional project ID this key is scoped to"},"scopes":{"type":"array","items":{"type":"string"},"description":"List of permission scopes for this key"},"updated_at":{"type":"string","description":"When the key was last updated.","format":"date-time"}},"required":["id","organization_id","created_by_user_id","name","key_prefix","scopes","created_at","updated_at"]},"ListAllowedOriginsResult":{"type":"object","properties":{"allowed_origins":{"type":"array","items":{"$ref":"#/components/schemas/AllowedOrigin"},"description":"The list of allowed origins"}},"required":["allowed_origins"]},"ListAssetsResult":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"},"description":"The list of assets"}},"required":["assets"]},"ListAttributeKeysPayload":{"type":"object","properties":{"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for listing distinct attribute keys available for filtering","required":["from","to"]},"ListAttributeKeysResult":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"description":"Distinct attribute keys. User attributes are prefixed with @"}},"description":"Result of listing distinct attribute keys","required":["keys"]},"ListCatalogResponseBody":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Pagination cursor for the next page"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPServer"},"description":"List of available MCP servers"}},"required":["servers"]},"ListChatsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatOverview"},"description":"The list of chats"}},"required":["chats"]},"ListChatsWithResolutionsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatOverviewWithResolutions"},"description":"List of chats with resolutions"},"total":{"type":"integer","description":"Total number of chats (before pagination)","format":"int64"}},"description":"Result of listing chats with resolutions","required":["chats","total"]},"ListDeploymentForm":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor to fetch results from"}}},"ListDeploymentResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentSummary"},"description":"A list of deployments"},"next_cursor":{"type":"string","description":"The cursor to fetch results from","example":"01jp3f054qc02gbcmpp0qmyzed"}},"required":["items"]},"ListEnvironmentsResult":{"type":"object","properties":{"environments":{"type":"array","items":{"$ref":"#/components/schemas/Environment"}}},"description":"Result type for listing environments","required":["environments"]},"ListFilterOptionsPayload":{"type":"object","properties":{"filter_type":{"type":"string","description":"Type of filter to list options for","enum":["api_key","user"]},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for listing filter options","required":["from","to","filter_type"]},"ListFilterOptionsResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"options":{"type":"array","items":{"$ref":"#/components/schemas/FilterOption"},"description":"List of filter options"}},"description":"Result of listing filter options","required":["options","enabled"]},"ListIntegrationsForm":{"type":"object","properties":{"keywords":{"type":"array","items":{"type":"string","maxLength":20},"description":"Keywords to filter integrations by"}}},"ListIntegrationsResult":{"type":"object","properties":{"integrations":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEntry"},"description":"List of available third-party integrations"}}},"ListKeysResult":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/Key"}}},"required":["keys"]},"ListPackagesResult":{"type":"object","properties":{"packages":{"type":"array","items":{"$ref":"#/components/schemas/Package"},"description":"The list of packages"}},"required":["packages"]},"ListProjectsPayload":{"type":"object","properties":{"apikey_token":{"type":"string"},"organization_id":{"type":"string","description":"The ID of the organization to list projects for"},"session_token":{"type":"string"}},"required":["organization_id"]},"ListProjectsResult":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEntry"},"description":"The list of projects"}},"required":["projects"]},"ListPromptTemplatesResult":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The created prompt template"}},"required":["templates"]},"ListResourcesResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resource"},"description":"The list of resources"}},"required":["resources"]},"ListToolsResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The list of tools (polymorphic union of HTTP tools and prompt templates)"}},"required":["tools"]},"ListToolsetsResult":{"type":"object","properties":{"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/ToolsetEntry"},"description":"The list of toolsets"}},"required":["toolsets"]},"ListVariationsResult":{"type":"object","properties":{"variations":{"type":"array","items":{"$ref":"#/components/schemas/ToolVariation"}}},"required":["variations"]},"ListVersionsForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package"}},"required":["name"]},"ListVersionsResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/PackageVersion"}}},"required":["package","versions"]},"McpEnvironmentConfig":{"type":"object","properties":{"created_at":{"type":"string","description":"When the config was created","format":"date-time"},"header_display_name":{"type":"string","description":"Custom display name for the variable in MCP headers"},"id":{"type":"string","description":"The ID of the environment config"},"provided_by":{"type":"string","description":"How the variable is provided: 'user', 'system', or 'none'"},"updated_at":{"type":"string","description":"When the config was last updated","format":"date-time"},"variable_name":{"type":"string","description":"The name of the environment variable"}},"description":"Represents an environment variable configured for an MCP server.","required":["id","variable_name","provided_by","created_at","updated_at"]},"McpEnvironmentConfigInput":{"type":"object","properties":{"header_display_name":{"type":"string","description":"Custom display name for the variable in MCP headers"},"provided_by":{"type":"string","description":"How the variable is provided: 'user', 'system', or 'none'"},"variable_name":{"type":"string","description":"The name of the environment variable"}},"description":"Input for configuring an environment variable for an MCP server.","required":["variable_name","provided_by"]},"McpExport":{"type":"object","properties":{"authentication":{"$ref":"#/components/schemas/McpExportAuthentication"},"description":{"type":"string","description":"Description of the MCP server"},"documentation_url":{"type":"string","description":"Link to external documentation"},"instructions":{"type":"string","description":"Server instructions for users"},"logo_url":{"type":"string","description":"URL to the server logo"},"name":{"type":"string","description":"The MCP server name"},"server_url":{"type":"string","description":"The MCP server URL"},"slug":{"type":"string","description":"The MCP server slug"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/McpExportTool"},"description":"Available tools on this MCP server"}},"description":"Complete MCP server export for documentation and integration","required":["name","slug","server_url","tools","authentication"]},"McpExportAuthHeader":{"type":"object","properties":{"display_name":{"type":"string","description":"User-friendly display name (e.g., API Key)"},"name":{"type":"string","description":"The HTTP header name (e.g., Authorization)"}},"description":"An authentication header required by the MCP server","required":["name","display_name"]},"McpExportAuthentication":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/McpExportAuthHeader"},"description":"Required authentication headers"},"required":{"type":"boolean","description":"Whether authentication is required"}},"description":"Authentication requirements for the MCP server","required":["required","headers"]},"McpExportTool":{"type":"object","properties":{"description":{"type":"string","description":"Description of what the tool does"},"input_schema":{"description":"JSON Schema for the tool's input parameters"},"name":{"type":"string","description":"The tool name"}},"description":"A tool definition in the MCP export","required":["name","description","input_schema"]},"McpMetadata":{"type":"object","properties":{"created_at":{"type":"string","description":"When the metadata entry was created","format":"date-time"},"default_environment_id":{"type":"string","description":"The default environment to load variables from","format":"uuid"},"environment_configs":{"type":"array","items":{"$ref":"#/components/schemas/McpEnvironmentConfig"},"description":"The list of environment variables configured for this MCP"},"external_documentation_text":{"type":"string","description":"A blob of text for the button on the MCP server page"},"external_documentation_url":{"type":"string","description":"A link to external documentation for the MCP install page","format":"uri"},"id":{"type":"string","description":"The ID of the metadata record"},"installation_override_url":{"type":"string","description":"URL to redirect to instead of showing the default installation page","format":"uri"},"instructions":{"type":"string","description":"Server instructions returned in the MCP initialize response"},"logo_asset_id":{"type":"string","description":"The asset ID for the MCP install page logo","format":"uuid"},"toolset_id":{"type":"string","description":"The toolset associated with this install page metadata","format":"uuid"},"updated_at":{"type":"string","description":"When the metadata entry was last updated","format":"date-time"}},"description":"Metadata used to configure the MCP install page.","required":["id","toolset_id","created_at","updated_at"]},"ModelUsage":{"type":"object","properties":{"count":{"type":"integer","description":"Number of times used","format":"int64"},"name":{"type":"string","description":"Model name"}},"description":"Model usage statistics","required":["name","count"]},"NotModified":{"type":"object","properties":{"location":{"type":"string"}},"required":["location"]},"OAuthEnablementMetadata":{"type":"object","properties":{"oauth2_security_count":{"type":"integer","description":"Count of security variables that are OAuth2 supported","format":"int64"}},"required":["oauth2_security_count"]},"OAuthProxyProvider":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"The authorization endpoint URL"},"created_at":{"type":"string","description":"When the OAuth proxy provider was created.","format":"date-time"},"environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"grant_types_supported":{"type":"array","items":{"type":"string"},"description":"The grant types supported by this provider"},"id":{"type":"string","description":"The ID of the OAuth proxy provider"},"provider_type":{"type":"string","description":"The type of OAuth provider","enum":["custom","gram"]},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"The OAuth scopes supported by this provider"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"token_endpoint":{"type":"string","description":"The token endpoint URL"},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"The token endpoint auth methods supported by this provider"},"updated_at":{"type":"string","description":"When the OAuth proxy provider was last updated.","format":"date-time"}},"required":["id","slug","provider_type","authorization_endpoint","token_endpoint","created_at","updated_at"]},"OAuthProxyServer":{"type":"object","properties":{"audience":{"type":"string","description":"The audience parameter to send to the upstream OAuth provider"},"created_at":{"type":"string","description":"When the OAuth proxy server was created.","format":"date-time"},"id":{"type":"string","description":"The ID of the OAuth proxy server"},"oauth_proxy_providers":{"type":"array","items":{"$ref":"#/components/schemas/OAuthProxyProvider"},"description":"The OAuth proxy providers for this server"},"project_id":{"type":"string","description":"The project ID this OAuth proxy server belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the OAuth proxy server was last updated.","format":"date-time"}},"required":["id","project_id","slug","created_at","updated_at"]},"OAuthProxyServerForm":{"type":"object","properties":{"audience":{"type":"string","description":"The audience parameter to send to the upstream OAuth provider"},"authorization_endpoint":{"type":"string","description":"The authorization endpoint URL"},"environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"provider_type":{"type":"string","description":"The type of OAuth provider","enum":["custom","gram"]},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"OAuth scopes to request"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"token_endpoint":{"type":"string","description":"The token endpoint URL"},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"Auth methods (client_secret_basic or client_secret_post)"}},"required":["slug","provider_type"]},"ObservabilitySummary":{"type":"object","properties":{"avg_latency_ms":{"type":"number","description":"Average tool latency in milliseconds","format":"double"},"avg_resolution_time_ms":{"type":"number","description":"Average time to resolution in milliseconds","format":"double"},"avg_session_duration_ms":{"type":"number","description":"Average session duration in milliseconds","format":"double"},"failed_chats":{"type":"integer","description":"Number of failed chat sessions","format":"int64"},"failed_tool_calls":{"type":"integer","description":"Number of failed tool calls","format":"int64"},"resolved_chats":{"type":"integer","description":"Number of resolved chat sessions","format":"int64"},"total_chats":{"type":"integer","description":"Total number of chat sessions","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Aggregated summary metrics for a time period","required":["total_chats","resolved_chats","failed_chats","avg_session_duration_ms","avg_resolution_time_ms","total_tool_calls","failed_tool_calls","avg_latency_ms"]},"OpenAPIv3DeploymentAsset":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"id":{"type":"string","description":"The ID of the deployment asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","asset_id","name","slug"]},"OrganizationEntry":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEntry"}},"slug":{"type":"string"},"sso_connection_id":{"type":"string"},"user_workspace_slugs":{"type":"array","items":{"type":"string"}}},"required":["id","name","slug","projects"]},"Package":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the package","format":"date-time"},"deleted_at":{"type":"string","description":"The deletion date of the package","format":"date-time"},"description":{"type":"string","description":"The description of the package. This contains HTML content."},"description_raw":{"type":"string","description":"The unsanitized, user-supplied description of the package. Limited markdown syntax is supported."},"id":{"type":"string","description":"The ID of the package"},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package"},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package"},"latest_version":{"type":"string","description":"The latest version of the package"},"name":{"type":"string","description":"The name of the package"},"organization_id":{"type":"string","description":"The ID of the organization that owns the package"},"project_id":{"type":"string","description":"The ID of the project that owns the package"},"summary":{"type":"string","description":"The summary of the package"},"title":{"type":"string","description":"The title of the package"},"updated_at":{"type":"string","description":"The last update date of the package","format":"date-time"},"url":{"type":"string","description":"External URL for the package owner"}},"required":["id","name","project_id","organization_id","created_at","updated_at"]},"PackageVersion":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the package version","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment that the version belongs to"},"id":{"type":"string","description":"The ID of the package version"},"package_id":{"type":"string","description":"The ID of the package that the version belongs to"},"semver":{"type":"string","description":"The semantic version value"},"visibility":{"type":"string","description":"The visibility of the package version"}},"required":["id","package_id","deployment_id","visibility","semver","created_at"]},"PeriodUsage":{"type":"object","properties":{"actual_enabled_server_count":{"type":"integer","description":"The number of servers enabled at the time of the request","format":"int64"},"credits":{"type":"integer","description":"The number of credits used","format":"int64"},"has_active_subscription":{"type":"boolean","description":"Whether the project has an active subscription"},"included_credits":{"type":"integer","description":"The number of credits included in the tier","format":"int64"},"included_servers":{"type":"integer","description":"The number of servers included in the tier","format":"int64"},"included_tool_calls":{"type":"integer","description":"The number of tool calls included in the tier","format":"int64"},"servers":{"type":"integer","description":"The number of servers used, according to the Polar meter","format":"int64"},"tool_calls":{"type":"integer","description":"The number of tool calls used","format":"int64"}},"required":["tool_calls","included_tool_calls","servers","included_servers","actual_enabled_server_count","credits","included_credits","has_active_subscription"]},"Project":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the project.","format":"date-time"},"id":{"type":"string","description":"The ID of the project"},"logo_asset_id":{"type":"string","description":"The ID of the logo asset for the project"},"name":{"type":"string","description":"The name of the project"},"organization_id":{"type":"string","description":"The ID of the organization that owns the project"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"The last update date of the project.","format":"date-time"}},"required":["id","name","slug","organization_id","created_at","updated_at"]},"ProjectEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the project"},"name":{"type":"string","description":"The name of the project"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","name","slug"]},"ProjectSummary":{"type":"object","properties":{"avg_chat_duration_ms":{"type":"number","description":"Average chat request duration in milliseconds","format":"double"},"avg_chat_resolution_score":{"type":"number","description":"Average chat resolution score (0-100)","format":"double"},"avg_tokens_per_request":{"type":"number","description":"Average tokens per chat request","format":"double"},"avg_tool_duration_ms":{"type":"number","description":"Average tool call duration in milliseconds","format":"double"},"chat_resolution_abandoned":{"type":"integer","description":"Chats abandoned by user","format":"int64"},"chat_resolution_failure":{"type":"integer","description":"Chats that failed to resolve","format":"int64"},"chat_resolution_partial":{"type":"integer","description":"Chats partially resolved","format":"int64"},"chat_resolution_success":{"type":"integer","description":"Chats resolved successfully","format":"int64"},"distinct_models":{"type":"integer","description":"Number of distinct models used (project scope only)","format":"int64"},"distinct_providers":{"type":"integer","description":"Number of distinct providers used (project scope only)","format":"int64"},"finish_reason_stop":{"type":"integer","description":"Requests that completed naturally","format":"int64"},"finish_reason_tool_calls":{"type":"integer","description":"Requests that resulted in tool calls","format":"int64"},"first_seen_unix_nano":{"type":"string","description":"Earliest activity timestamp in Unix nanoseconds"},"last_seen_unix_nano":{"type":"string","description":"Latest activity timestamp in Unix nanoseconds"},"models":{"type":"array","items":{"$ref":"#/components/schemas/ModelUsage"},"description":"List of models used with call counts"},"tool_call_failure":{"type":"integer","description":"Failed tool calls (4xx/5xx status)","format":"int64"},"tool_call_success":{"type":"integer","description":"Successful tool calls (2xx status)","format":"int64"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolUsage"},"description":"List of tools used with success/failure counts"},"total_chat_requests":{"type":"integer","description":"Total number of chat requests","format":"int64"},"total_chats":{"type":"integer","description":"Number of unique chat sessions (project scope only)","format":"int64"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens used","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Aggregated metrics","required":["first_seen_unix_nano","last_seen_unix_nano","total_input_tokens","total_output_tokens","total_tokens","avg_tokens_per_request","total_chat_requests","avg_chat_duration_ms","finish_reason_stop","finish_reason_tool_calls","total_tool_calls","tool_call_success","tool_call_failure","avg_tool_duration_ms","chat_resolution_success","chat_resolution_failure","chat_resolution_partial","chat_resolution_abandoned","avg_chat_resolution_score","total_chats","distinct_models","distinct_providers","models","tools"]},"PromptTemplate":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"description":{"type":"string","description":"Description of the tool"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"history_id":{"type":"string","description":"The revision tree ID for the prompt template"},"id":{"type":"string","description":"The ID of the tool"},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"The name of the tool"},"predecessor_id":{"type":"string","description":"The previous version of the prompt template to use as predecessor"},"project_id":{"type":"string","description":"The ID of the project"},"prompt":{"type":"string","description":"The template content"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A prompt template","required":["id","history_id","name","prompt","engine","kind","tools_hint","tool_urn","created_at","updated_at","project_id","canonical_name","description","schema"]},"PromptTemplateEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the prompt template"},"kind":{"type":"string","description":"The kind of the prompt template"},"name":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","name"]},"PublishPackageForm":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The deployment ID to associate with the package version"},"name":{"type":"string","description":"The name of the package"},"version":{"type":"string","description":"The new semantic version of the package to publish"},"visibility":{"type":"string","description":"The visibility of the package version","enum":["public","private"]}},"required":["name","version","deployment_id","visibility"]},"PublishPackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"},"version":{"$ref":"#/components/schemas/PackageVersion"}},"required":["package","version"]},"RedeployRequestBody":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The ID of the deployment to redeploy."}},"required":["deployment_id"]},"RedeployResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"RegisterRequestBody":{"type":"object","properties":{"org_name":{"type":"string","description":"The name of the org to register"}},"required":["org_name"]},"RenderTemplateByIDRequestBody":{"type":"object","properties":{"arguments":{"type":"object","description":"The input data to render the template with","additionalProperties":true}},"required":["arguments"]},"RenderTemplateRequestBody":{"type":"object","properties":{"arguments":{"type":"object","description":"The input data to render the template with","additionalProperties":true},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"prompt":{"type":"string","description":"The template content to render"}},"required":["prompt","arguments","engine","kind"]},"RenderTemplateResult":{"type":"object","properties":{"prompt":{"type":"string","description":"The rendered prompt"}},"required":["prompt"]},"Resource":{"type":"object","properties":{"function_resource_definition":{"$ref":"#/components/schemas/FunctionResourceDefinition"}},"description":"A polymorphic resource - currently only function resources are supported"},"ResourceEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the resource"},"name":{"type":"string","description":"The name of the resource"},"resource_urn":{"type":"string","description":"The URN of the resource"},"type":{"type":"string","enum":["function"]},"uri":{"type":"string","description":"The uri of the resource"}},"required":["type","id","name","uri","resource_urn"]},"ResponseFilter":{"type":"object","properties":{"content_types":{"type":"array","items":{"type":"string"},"description":"Content types to filter for"},"status_codes":{"type":"array","items":{"type":"string"},"description":"Status codes to filter for"},"type":{"type":"string","description":"Response filter type for the tool"}},"description":"Response filter metadata for the tool","required":["type","status_codes","content_types"]},"SearchChatsFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"external_user_id":{"type":"string","description":"External user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"user_id":{"type":"string","description":"User ID filter"}},"description":"Filter criteria for searching chat sessions"},"SearchChatsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchChatsFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]}},"description":"Payload for searching chat session summaries"},"SearchChatsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatSummary"},"description":"List of chat session summaries"},"enabled":{"type":"boolean","description":"Whether tool metrics are enabled for the organization"},"next_cursor":{"type":"string","description":"Cursor for next page"}},"description":"Result of searching chat session summaries","required":["chats","enabled"]},"SearchLogsFilter":{"type":"object","properties":{"attribute_filters":{"type":"array","items":{"$ref":"#/components/schemas/AttributeFilter"},"description":"Filters on custom log attributes"},"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"external_user_id":{"type":"string","description":"External user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_chat_id":{"type":"string","description":"Chat ID filter"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"gram_urns":{"type":"array","items":{"type":"string"},"description":"Gram URN filter (one or more URNs)"},"http_method":{"type":"string","description":"HTTP method filter","enum":["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]},"http_route":{"type":"string","description":"HTTP route filter"},"http_status_code":{"type":"integer","description":"HTTP status code filter","format":"int32"},"service_name":{"type":"string","description":"Service name filter"},"severity_text":{"type":"string","description":"Severity level filter","enum":["DEBUG","INFO","WARN","ERROR","FATAL"]},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"trace_id":{"type":"string","description":"Trace ID filter (32 hex characters)","pattern":"^[a-f0-9]{32}$"},"user_id":{"type":"string","description":"User ID filter"}},"description":"Filter criteria for searching logs"},"SearchLogsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchLogsFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]}},"description":"Payload for searching telemetry logs"},"SearchLogsResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether tool metrics are enabled for the organization"},"logs":{"type":"array","items":{"$ref":"#/components/schemas/TelemetryLogRecord"},"description":"List of telemetry log records"},"next_cursor":{"type":"string","description":"Cursor for next page"}},"description":"Result of searching telemetry logs","required":["logs","enabled"]},"SearchToolCallsFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Filter criteria for searching tool calls"},"SearchToolCallsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchToolCallsFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]}},"description":"Payload for searching tool call summaries"},"SearchToolCallsResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether tool metrics are enabled for the organization"},"next_cursor":{"type":"string","description":"Cursor for next page"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCallSummary"},"description":"List of tool call summaries"},"tool_io_logs_enabled":{"type":"boolean","description":"Whether tool input/output logging is enabled for the organization"}},"description":"Result of searching tool call summaries","required":["tool_calls","enabled","tool_io_logs_enabled"]},"SearchUsersFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Filter criteria for searching user usage summaries","required":["from","to"]},"SearchUsersPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination (user identifier from last item)"},"filter":{"$ref":"#/components/schemas/SearchUsersFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]},"user_type":{"type":"string","description":"Type of user identifier to group by","enum":["internal","external"]}},"description":"Payload for searching user usage summaries","required":["filter","user_type"]},"SearchUsersResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"next_cursor":{"type":"string","description":"Cursor for next page"},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserSummary"},"description":"List of user usage summaries"}},"description":"Result of searching user usage summaries","required":["users","enabled"]},"SecurityVariable":{"type":"object","properties":{"bearer_format":{"type":"string","description":"The bearer format"},"display_name":{"type":"string","description":"User-friendly display name for the security variable (defaults to name if not set)"},"env_variables":{"type":"array","items":{"type":"string"},"description":"The environment variables"},"id":{"type":"string","description":"The unique identifier of the security variable"},"in_placement":{"type":"string","description":"Where the security token is placed"},"name":{"type":"string","description":"The name of the security scheme (actual header/parameter name)"},"oauth_flows":{"type":"string","description":"The OAuth flows","format":"binary"},"oauth_types":{"type":"array","items":{"type":"string"},"description":"The OAuth types"},"scheme":{"type":"string","description":"The security scheme"},"type":{"type":"string","description":"The type of security"}},"required":["id","name","in_placement","scheme","env_variables"]},"ServeChatAttachmentForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"id":{"type":"string","description":"The ID of the attachment to serve"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeChatAttachmentResult":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeChatAttachmentSignedForm":{"type":"object","properties":{"token":{"type":"string","description":"The signed JWT token"}},"required":["token"]},"ServeChatAttachmentSignedResult":{"type":"object","properties":{"access_control_allow_origin":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeFunctionForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"id":{"type":"string","description":"The ID of the asset to serve"},"project_id":{"type":"string","description":"The procect ID that the asset belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeFunctionResult":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeImageForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the asset to serve"}},"required":["id"]},"ServeImageResult":{"type":"object","properties":{"access_control_allow_origin":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeOpenAPIv3Form":{"type":"object","properties":{"apikey_token":{"type":"string"},"id":{"type":"string","description":"The ID of the asset to serve"},"project_id":{"type":"string","description":"The procect ID that the asset belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeOpenAPIv3Result":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServerVariable":{"type":"object","properties":{"description":{"type":"string","description":"Description of the server variable"},"env_variables":{"type":"array","items":{"type":"string"},"description":"The environment variables"}},"required":["description","env_variables"]},"ServiceInfo":{"type":"object","properties":{"name":{"type":"string","description":"Service name"},"version":{"type":"string","description":"Service version"}},"description":"Service information","required":["name"]},"SetMcpMetadataRequestBody":{"type":"object","properties":{"default_environment_id":{"type":"string","description":"The default environment to load variables from","format":"uuid"},"environment_configs":{"type":"array","items":{"$ref":"#/components/schemas/McpEnvironmentConfigInput"},"description":"The list of environment variables to configure for this MCP"},"external_documentation_text":{"type":"string","description":"A blob of text for the button on the MCP server page"},"external_documentation_url":{"type":"string","description":"A link to external documentation for the MCP install page"},"installation_override_url":{"type":"string","description":"URL to redirect to instead of showing the default installation page","format":"uri"},"instructions":{"type":"string","description":"Server instructions returned in the MCP initialize response"},"logo_asset_id":{"type":"string","description":"The asset ID for the MCP install page logo"},"toolset_slug":{"type":"string","description":"The slug of the toolset associated with this install page metadata","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug"]},"SetProductFeatureRequestBody":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the feature should be enabled"},"feature_name":{"type":"string","description":"Name of the feature to update","enum":["logs","tool_io_logs"],"maxLength":60}},"required":["feature_name","enabled"]},"SetProjectLogoForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the asset"}},"required":["asset_id"]},"SetProjectLogoResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"SetSourceEnvironmentLinkRequestBody":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to link","format":"uuid"},"source_kind":{"type":"string","description":"The kind of source (http or function)","enum":["http","function"]},"source_slug":{"type":"string","description":"The slug of the source"}},"required":["source_kind","source_slug","environment_id"]},"SetToolsetEnvironmentLinkRequestBody":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to link","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset","format":"uuid"}},"required":["toolset_id","environment_id"]},"SourceEnvironmentLink":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment","format":"uuid"},"id":{"type":"string","description":"The ID of the source environment link","format":"uuid"},"source_kind":{"type":"string","description":"The kind of source that can be linked to an environment","enum":["http","function"]},"source_slug":{"type":"string","description":"The slug of the source"}},"description":"A link between a source and an environment","required":["id","source_kind","source_slug","environment_id"]},"SubmitFeedbackRequestBody":{"type":"object","properties":{"feedback":{"type":"string","description":"User feedback: success or failure","enum":["success","failure"]},"id":{"type":"string","description":"The ID of the chat"}},"required":["id","feedback"]},"TelemetryFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Filter criteria for telemetry queries"},"TelemetryLogRecord":{"type":"object","properties":{"attributes":{"description":"Log attributes as JSON object"},"body":{"type":"string","description":"The primary log message"},"id":{"type":"string","description":"Log record ID","format":"uuid"},"observed_time_unix_nano":{"type":"integer","description":"Unix time in nanoseconds when event was observed","format":"int64"},"resource_attributes":{"description":"Resource attributes as JSON object"},"service":{"$ref":"#/components/schemas/ServiceInfo"},"severity_text":{"type":"string","description":"Text representation of severity"},"span_id":{"type":"string","description":"W3C span ID (16 hex characters)"},"time_unix_nano":{"type":"integer","description":"Unix time in nanoseconds when event occurred","format":"int64"},"trace_id":{"type":"string","description":"W3C trace ID (32 hex characters)"}},"description":"OpenTelemetry log record","required":["id","time_unix_nano","observed_time_unix_nano","body","attributes","resource_attributes","service"]},"TierLimits":{"type":"object","properties":{"add_on_bullets":{"type":"array","items":{"type":"string"},"description":"Add-on items bullets of the tier (optional)"},"base_price":{"type":"number","description":"The base price for the tier","format":"double"},"feature_bullets":{"type":"array","items":{"type":"string"},"description":"Key feature bullets of the tier"},"included_bullets":{"type":"array","items":{"type":"string"},"description":"Included items bullets of the tier"},"included_credits":{"type":"integer","description":"The number of credits included in the tier for playground and other dashboard activities","format":"int64"},"included_servers":{"type":"integer","description":"The number of servers included in the tier","format":"int64"},"included_tool_calls":{"type":"integer","description":"The number of tool calls included in the tier","format":"int64"},"price_per_additional_server":{"type":"number","description":"The price per additional server","format":"double"},"price_per_additional_tool_call":{"type":"number","description":"The price per additional tool call","format":"double"}},"required":["base_price","included_tool_calls","included_servers","included_credits","price_per_additional_tool_call","price_per_additional_server","feature_bullets","included_bullets"]},"TimeSeriesBucket":{"type":"object","properties":{"abandoned_chats":{"type":"integer","description":"Abandoned chat sessions in this bucket","format":"int64"},"avg_session_duration_ms":{"type":"number","description":"Average session duration in milliseconds","format":"double"},"avg_tool_latency_ms":{"type":"number","description":"Average tool latency in milliseconds","format":"double"},"bucket_time_unix_nano":{"type":"string","description":"Bucket start time in Unix nanoseconds (string for JS precision)"},"failed_chats":{"type":"integer","description":"Failed chat sessions in this bucket","format":"int64"},"failed_tool_calls":{"type":"integer","description":"Failed tool calls in this bucket","format":"int64"},"partial_chats":{"type":"integer","description":"Partially resolved chat sessions in this bucket","format":"int64"},"resolved_chats":{"type":"integer","description":"Resolved chat sessions in this bucket","format":"int64"},"total_chats":{"type":"integer","description":"Total chat sessions in this bucket","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total tool calls in this bucket","format":"int64"}},"description":"A single time bucket for time series metrics","required":["bucket_time_unix_nano","total_chats","resolved_chats","failed_chats","partial_chats","abandoned_chats","total_tool_calls","failed_tool_calls","avg_tool_latency_ms","avg_session_duration_ms"]},"Tool":{"type":"object","properties":{"external_mcp_tool_definition":{"$ref":"#/components/schemas/ExternalMCPToolDefinition"},"function_tool_definition":{"$ref":"#/components/schemas/FunctionToolDefinition"},"http_tool_definition":{"$ref":"#/components/schemas/HTTPToolDefinition"},"prompt_template":{"$ref":"#/components/schemas/PromptTemplate"}},"description":"A polymorphic tool - can be an HTTP tool, function tool, prompt template, or external MCP proxy"},"ToolAnnotations":{"type":"object","properties":{"destructive_hint":{"type":"boolean","description":"If true, the tool may perform destructive updates (only meaningful when read_only_hint is false)"},"idempotent_hint":{"type":"boolean","description":"If true, repeated calls with same arguments have no additional effect (only meaningful when read_only_hint is false)"},"open_world_hint":{"type":"boolean","description":"If true, the tool interacts with external entities beyond its local environment"},"read_only_hint":{"type":"boolean","description":"If true, the tool does not modify its environment"},"title":{"type":"string","description":"Human-readable display name for the tool"}},"description":"Tool annotations providing behavioral hints about the tool"},"ToolCallSummary":{"type":"object","properties":{"gram_urn":{"type":"string","description":"Gram URN associated with this tool call"},"http_status_code":{"type":"integer","description":"HTTP status code (if applicable)","format":"int32"},"log_count":{"type":"integer","description":"Total number of logs in this tool call","format":"int64"},"start_time_unix_nano":{"type":"integer","description":"Earliest log timestamp in Unix nanoseconds","format":"int64"},"trace_id":{"type":"string","description":"Trace ID (32 hex characters)","pattern":"^[a-f0-9]{32}$"}},"description":"Summary information for a tool call","required":["trace_id","start_time_unix_nano","log_count","gram_urn"]},"ToolEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"tool_urn":{"type":"string","description":"The URN of the tool"},"type":{"type":"string","enum":["http","prompt","function","externalmcp"]}},"required":["type","id","name","tool_urn"]},"ToolMetric":{"type":"object","properties":{"avg_latency_ms":{"type":"number","description":"Average latency in milliseconds","format":"double"},"call_count":{"type":"integer","description":"Total number of calls","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed calls","format":"int64"},"failure_rate":{"type":"number","description":"Failure rate (0.0 to 1.0)","format":"double"},"gram_urn":{"type":"string","description":"Tool URN"},"success_count":{"type":"integer","description":"Number of successful calls","format":"int64"}},"description":"Aggregated metrics for a single tool","required":["gram_urn","call_count","success_count","failure_count","avg_latency_ms","failure_rate"]},"ToolUsage":{"type":"object","properties":{"count":{"type":"integer","description":"Total call count","format":"int64"},"failure_count":{"type":"integer","description":"Failed calls (4xx/5xx status)","format":"int64"},"success_count":{"type":"integer","description":"Successful calls (2xx status)","format":"int64"},"urn":{"type":"string","description":"Tool URN"}},"description":"Tool usage statistics","required":["urn","count","success_count","failure_count"]},"ToolVariation":{"type":"object","properties":{"confirm":{"type":"string","description":"The confirmation mode for the tool variation"},"confirm_prompt":{"type":"string","description":"The confirmation prompt for the tool variation"},"created_at":{"type":"string","description":"The creation date of the tool variation"},"description":{"type":"string","description":"The description of the tool variation"},"destructive_hint":{"type":"boolean","description":"Override: if true, the tool may perform destructive updates"},"group_id":{"type":"string","description":"The ID of the tool variation group"},"id":{"type":"string","description":"The ID of the tool variation"},"idempotent_hint":{"type":"boolean","description":"Override: if true, repeated calls have no additional effect"},"name":{"type":"string","description":"The name of the tool variation"},"open_world_hint":{"type":"boolean","description":"Override: if true, the tool interacts with external entities"},"read_only_hint":{"type":"boolean","description":"Override: if true, the tool does not modify its environment"},"src_tool_name":{"type":"string","description":"The name of the source tool"},"src_tool_urn":{"type":"string","description":"The URN of the source tool"},"summarizer":{"type":"string","description":"The summarizer of the tool variation"},"title":{"type":"string","description":"Display name override for the tool"},"updated_at":{"type":"string","description":"The last update date of the tool variation"}},"required":["id","group_id","src_tool_name","src_tool_urn","created_at","updated_at"]},"Toolset":{"type":"object","properties":{"account_type":{"type":"string","description":"The account type of the organization"},"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServer"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"id":{"type":"string","description":"The ID of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The name of the toolset"},"oauth_enablement_metadata":{"$ref":"#/components/schemas/OAuthEnablementMetadata"},"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServer"},"organization_id":{"type":"string","description":"The organization ID this toolset belongs to"},"project_id":{"type":"string","description":"The project ID this toolset belongs to"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"The resource URNs in this toolset"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resource"},"description":"The resources in this toolset"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"The tool URNs in this toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The tools in this toolset"},"toolset_version":{"type":"integer","description":"The version of the toolset (will be 0 if none exists)","format":"int64"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"}},"required":["id","project_id","organization_id","account_type","name","slug","tools","tool_selection_mode","toolset_version","prompt_templates","tool_urns","resources","resource_urns","oauth_enablement_metadata","created_at","updated_at"]},"ToolsetEntry":{"type":"object","properties":{"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"id":{"type":"string","description":"The ID of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The name of the toolset"},"organization_id":{"type":"string","description":"The organization ID this toolset belongs to"},"project_id":{"type":"string","description":"The project ID this toolset belongs to"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplateEntry"},"description":"The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"The resource URNs in this toolset"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourceEntry"},"description":"The resources in this toolset"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"The tool URNs in this toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolEntry"},"description":"The tools in this toolset"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"}},"required":["id","project_id","organization_id","name","slug","tools","tool_selection_mode","prompt_templates","tool_urns","resources","resource_urns","created_at","updated_at"]},"ToolsetEnvironmentLink":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment","format":"uuid"},"id":{"type":"string","description":"The ID of the toolset environment link","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset","format":"uuid"}},"description":"A link between a toolset and an environment","required":["id","toolset_id","environment_id"]},"UpdateEnvironmentForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the environment"},"entries_to_remove":{"type":"array","items":{"type":"string"},"description":"List of environment entry names to remove"},"entries_to_update":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment entries to update or create"},"name":{"type":"string","description":"The name of the environment"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"description":"Form for updating an environment","required":["slug","entries_to_update","entries_to_remove"]},"UpdateEnvironmentRequestBody":{"type":"object","properties":{"description":{"type":"string","description":"The description of the environment"},"entries_to_remove":{"type":"array","items":{"type":"string"},"description":"List of environment entry names to remove"},"entries_to_update":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment entries to update or create"},"name":{"type":"string","description":"The name of the environment"}},"required":["entries_to_update","entries_to_remove"]},"UpdatePackageForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the package. Limited markdown syntax is supported.","maxLength":10000},"id":{"type":"string","description":"The id of the package to update","maxLength":50},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package","maxLength":50},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package","maxItems":5},"summary":{"type":"string","description":"The summary of the package","maxLength":80},"title":{"type":"string","description":"The title of the package","maxLength":100},"url":{"type":"string","description":"External URL for the package owner","maxLength":100}},"required":["id"]},"UpdatePackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"}},"required":["package"]},"UpdatePromptTemplateForm":{"type":"object","properties":{"arguments":{"type":"string","description":"The JSON Schema defining the placeholders found in the prompt template","format":"json"},"description":{"type":"string","description":"The description of the prompt template"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"id":{"type":"string","description":"The ID of the prompt template to update"},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"The name of the prompt template. Will be updated via variation"},"prompt":{"type":"string","description":"The template content"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20}},"required":["id"]},"UpdatePromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"UpdateSecurityVariableDisplayNameForm":{"type":"object","properties":{"display_name":{"type":"string","description":"The user-friendly display name. Set to empty string to clear and use the original name.","maxLength":120},"project_slug_input":{"type":"string"},"security_key":{"type":"string","description":"The security scheme key (e.g., 'BearerAuth', 'ApiKeyAuth') from the OpenAPI spec","maxLength":60},"toolset_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug","security_key","display_name"]},"UpdateSlackConnectionRequestBody":{"type":"object","properties":{"default_toolset_slug":{"type":"string","description":"The default toolset slug for this Slack connection"}},"required":["default_toolset_slug"]},"UpdateToolsetForm":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"The new description of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The new name of the toolset"},"project_slug_input":{"type":"string"},"prompt_template_names":{"type":"array","items":{"type":"string"},"description":"List of prompt template names to include (note: for actual prompts, not tools)"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["slug"]},"UpdateToolsetRequestBody":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"The slug of the environment to use as the default for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"The new description of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"The slug of the MCP to use for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The new name of the toolset"},"prompt_template_names":{"type":"array","items":{"type":"string"},"description":"List of prompt template names to include (note: for actual prompts, not tools)"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}}},"UploadChatAttachmentForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadChatAttachmentResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"url":{"type":"string","description":"The URL to serve the chat attachment"}},"required":["asset","url"]},"UploadFunctionsForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadFunctionsResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UploadImageForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadImageResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UploadOpenAPIv3Form":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadOpenAPIv3Result":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UpsertAllowedOriginForm":{"type":"object","properties":{"origin":{"type":"string","description":"The origin URL to upsert","minLength":1,"maxLength":500},"status":{"type":"string","default":"pending","enum":["pending","approved","rejected"]}},"required":["origin"]},"UpsertAllowedOriginResult":{"type":"object","properties":{"allowed_origin":{"$ref":"#/components/schemas/AllowedOrigin"}},"required":["allowed_origin"]},"UpsertGlobalToolVariationForm":{"type":"object","properties":{"confirm":{"type":"string","description":"The confirmation mode for the tool variation","enum":["always","never","session"]},"confirm_prompt":{"type":"string","description":"The confirmation prompt for the tool variation"},"description":{"type":"string","description":"The description of the tool variation"},"destructive_hint":{"type":"boolean","description":"Override: if true, the tool may perform destructive updates"},"idempotent_hint":{"type":"boolean","description":"Override: if true, repeated calls have no additional effect"},"name":{"type":"string","description":"The name of the tool variation"},"open_world_hint":{"type":"boolean","description":"Override: if true, the tool interacts with external entities"},"read_only_hint":{"type":"boolean","description":"Override: if true, the tool does not modify its environment"},"src_tool_name":{"type":"string","description":"The name of the source tool"},"src_tool_urn":{"type":"string","description":"The URN of the source tool"},"summarizer":{"type":"string","description":"The summarizer of the tool variation"},"summary":{"type":"string","description":"The summary of the tool variation"},"tags":{"type":"array","items":{"type":"string"},"description":"The tags of the tool variation"},"title":{"type":"string","description":"Display name override for the tool"}},"required":["src_tool_name","src_tool_urn"]},"UpsertGlobalToolVariationResult":{"type":"object","properties":{"variation":{"$ref":"#/components/schemas/ToolVariation"}},"required":["variation"]},"UsageTiers":{"type":"object","properties":{"enterprise":{"$ref":"#/components/schemas/TierLimits"},"free":{"$ref":"#/components/schemas/TierLimits"},"pro":{"$ref":"#/components/schemas/TierLimits"}},"required":["free","pro","enterprise"]},"UserSummary":{"type":"object","properties":{"avg_tokens_per_request":{"type":"number","description":"Average tokens per chat request","format":"double"},"first_seen_unix_nano":{"type":"string","description":"Earliest activity timestamp in Unix nanoseconds"},"last_seen_unix_nano":{"type":"string","description":"Latest activity timestamp in Unix nanoseconds"},"tool_call_failure":{"type":"integer","description":"Failed tool calls (4xx/5xx status)","format":"int64"},"tool_call_success":{"type":"integer","description":"Successful tool calls (2xx status)","format":"int64"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolUsage"},"description":"Per-tool usage breakdown"},"total_chat_requests":{"type":"integer","description":"Total number of chat completion requests","format":"int64"},"total_chats":{"type":"integer","description":"Number of unique chat sessions","format":"int64"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens used","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"},"user_id":{"type":"string","description":"User identifier (user_id or external_user_id depending on group_by)"}},"description":"Aggregated usage summary for a single user","required":["user_id","first_seen_unix_nano","last_seen_unix_nano","total_chats","total_chat_requests","total_input_tokens","total_output_tokens","total_tokens","avg_tokens_per_request","total_tool_calls","tool_call_success","tool_call_failure","tools"]},"ValidateKeyOrganization":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the organization"},"name":{"type":"string","description":"The name of the organization"},"slug":{"type":"string","description":"The slug of the organization"}},"required":["id","name","slug"]},"ValidateKeyProject":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the project"},"name":{"type":"string","description":"The name of the project"},"slug":{"type":"string","description":"The slug of the project"}},"required":["id","name","slug"]},"ValidateKeyResult":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/ValidateKeyOrganization"},"projects":{"type":"array","items":{"$ref":"#/components/schemas/ValidateKeyProject"},"description":"The projects accessible with this key"},"scopes":{"type":"array","items":{"type":"string"},"description":"List of permission scopes for this key"}},"required":["organization","projects","scopes"]},"WorkflowAgentRequest":{"type":"object","properties":{"async":{"type":"boolean","description":"If true, returns immediately with a response ID for polling"},"input":{"description":"The input to the agent - can be a string or array of messages"},"instructions":{"type":"string","description":"System instructions for the agent"},"model":{"type":"string","description":"The model to use for the agent (e.g., openai/gpt-4o)"},"previous_response_id":{"type":"string","description":"ID of a previous response to continue from"},"store":{"type":"boolean","description":"If true, stores the response defaults to true"},"sub_agents":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowSubAgent"},"description":"Sub-agents available for delegation"},"temperature":{"type":"number","description":"Temperature for model responses","format":"double"},"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowAgentToolset"},"description":"Toolsets available to the agent"}},"description":"Request payload for creating an agent response","required":["model","input"]},"WorkflowAgentResponseOutput":{"type":"object","properties":{"created_at":{"type":"integer","description":"Unix timestamp when the response was created","format":"int64"},"error":{"type":"string","description":"Error message if the response failed"},"id":{"type":"string","description":"Unique identifier for this response"},"instructions":{"type":"string","description":"The instructions that were used"},"model":{"type":"string","description":"The model that was used"},"object":{"type":"string","description":"Object type, always 'response'"},"output":{"type":"array","items":{},"description":"Array of output items (messages, tool calls)"},"previous_response_id":{"type":"string","description":"ID of the previous response if continuing"},"result":{"type":"string","description":"The final text result from the agent"},"status":{"type":"string","description":"Status of the response","enum":["in_progress","completed","failed"]},"temperature":{"type":"number","description":"Temperature that was used","format":"double"},"text":{"$ref":"#/components/schemas/WorkflowAgentResponseText"}},"description":"Response output from an agent workflow","required":["id","object","created_at","status","model","output","temperature","text","result"]},"WorkflowAgentResponseText":{"type":"object","properties":{"format":{"$ref":"#/components/schemas/WorkflowAgentTextFormat"}},"description":"Text format configuration for the response","required":["format"]},"WorkflowAgentTextFormat":{"type":"object","properties":{"type":{"type":"string","description":"The type of text format (e.g., 'text')"}},"description":"Text format type","required":["type"]},"WorkflowAgentToolset":{"type":"object","properties":{"environment_slug":{"type":"string","description":"The slug of the environment for auth"},"toolset_slug":{"type":"string","description":"The slug of the toolset to use"}},"description":"A toolset reference for agent execution","required":["toolset_slug","environment_slug"]},"WorkflowSubAgent":{"type":"object","properties":{"description":{"type":"string","description":"Description of what this sub-agent does"},"environment_slug":{"type":"string","description":"The environment slug for auth"},"instructions":{"type":"string","description":"Instructions for this sub-agent"},"name":{"type":"string","description":"The name of this sub-agent"},"tools":{"type":"array","items":{"type":"string"},"description":"Tool URNs available to this sub-agent"},"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowAgentToolset"},"description":"Toolsets available to this sub-agent"}},"description":"A sub-agent definition for the agent workflow","required":["name","description"]}},"securitySchemes":{"apikey_header_Authorization":{"type":"apiKey","description":"key based auth.","name":"Authorization","in":"header"},"apikey_header_Gram-Key":{"type":"apiKey","description":"key based auth.","name":"Gram-Key","in":"header"},"chat_sessions_token_header_Gram-Chat-Session":{"type":"http","description":"Gram Chat Sessions token based auth.","scheme":"bearer"},"function_token_header_Authorization":{"type":"http","description":"Gram Functions token based auth.","scheme":"bearer"},"project_slug_header_Gram-Project":{"type":"apiKey","description":"project slug header auth.","name":"Gram-Project","in":"header"},"project_slug_query_project_slug":{"type":"apiKey","description":"project slug header auth.","name":"project_slug","in":"query"},"session_header_Gram-Session":{"type":"apiKey","description":"Session based auth. By cookie or header.","name":"Gram-Session","in":"header"}}},"tags":[{"name":"agentworkflows","description":"OpenAI Responses API compatible endpoint for running agent workflows."},{"name":"assets","description":"Manages assets used by Gram projects."},{"name":"auth","description":"Managed auth for gram producers and dashboard."},{"name":"chat","description":"Managed chats for gram AI consumers."},{"name":"chatSessions","description":"Manages chat session tokens for client-side authentication"},{"name":"deployments","description":"Manages deployments of tools from upstream sources."},{"name":"domains","description":"Manage custom domains for gram."},{"name":"environments","description":"Managing toolset environments."},{"name":"mcpRegistries","description":"External MCP registry operations"},{"name":"functions","description":"Endpoints for working with functions."},{"name":"instances","description":"Consumer APIs for interacting with all relevant data for an instance of a toolset and environment."},{"name":"integrations","description":"Explore third-party tools in Gram."},{"name":"keys","description":"Managing system api keys."},{"name":"mcpMetadata","description":"Manages metadata for the MCP install page shown to users."},{"name":"packages","description":"Manages packages in Gram."},{"name":"features","description":"Manage product level feature controls."},{"name":"projects","description":"Manages projects in Gram."},{"name":"resources","description":"Dashboard API for interacting with resources."},{"name":"slack","description":"Auth and interactions for the Gram Slack App."},{"name":"telemetry","description":"Fetch telemetry data for tools in Gram."},{"name":"templates","description":"Manages re-usable prompt templates and higher-order tools for a project."},{"name":"tools","description":"Dashboard API for interacting with tools."},{"name":"toolsets","description":"Managed toolsets for gram AI consumers."},{"name":"usage","description":"Read usage for gram."},{"name":"variations","description":"Manage variations of tools."}]}
\ No newline at end of file
+{"openapi":"3.0.3","info":{"title":"Gram API Description","description":"Gram is the tools platform for AI agents","version":"0.0.1"},"servers":[{"url":"http://localhost:80","description":"Default server for gram"}],"paths":{"/rpc/assets.createSignedChatAttachmentURL":{"post":{"description":"Create a time-limited signed URL to access a chat attachment without authentication.","operationId":"createSignedChatAttachmentURL","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignedChatAttachmentURLForm2"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignedChatAttachmentURLResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[],"project_slug_header_Gram-Project":[]}],"summary":"createSignedChatAttachmentURL assets","tags":["assets"],"x-speakeasy-name-override":"createSignedChatAttachmentURL","x-speakeasy-react-hook":{"name":"CreateSignedChatAttachmentURL"}}},"/rpc/assets.fetchOpenAPIv3FromURL":{"post":{"description":"Fetch an OpenAPI v3 document from a URL and upload it to Gram.","operationId":"fetchOpenAPIv3FromURL","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchOpenAPIv3FromURLForm2"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOpenAPIv3Result"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"fetchOpenAPIv3FromURL assets","tags":["assets"],"x-speakeasy-name-override":"fetchOpenAPIv3FromURL","x-speakeasy-react-hook":{"name":"FetchOpenAPIv3FromURL"}}},"/rpc/assets.list":{"get":{"description":"List all assets for a project.","operationId":"listAssets","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAssetsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAssets assets","tags":["assets"],"x-speakeasy-name-override":"listAssets","x-speakeasy-react-hook":{"name":"ListAssets"}}},"/rpc/assets.serveChatAttachment":{"get":{"description":"Serve a chat attachment from Gram.","operationId":"serveChatAttachment","parameters":[{"allowEmptyValue":true,"description":"The ID of the attachment to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the attachment to serve","type":"string"}},{"allowEmptyValue":true,"description":"The project ID that the attachment belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The project ID that the attachment belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"serveChatAttachment assets","tags":["assets"],"x-speakeasy-name-override":"serveChatAttachment","x-speakeasy-react-hook":{"name":"serveChatAttachment"}}},"/rpc/assets.serveChatAttachmentSigned":{"get":{"description":"Serve a chat attachment using a signed URL token.","operationId":"serveChatAttachmentSigned","parameters":[{"allowEmptyValue":true,"description":"The signed JWT token","in":"query","name":"token","required":true,"schema":{"description":"The signed JWT token","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"serveChatAttachmentSigned assets","tags":["assets"],"x-speakeasy-name-override":"serveChatAttachmentSigned","x-speakeasy-react-hook":{"name":"serveChatAttachmentSigned"}}},"/rpc/assets.serveFunction":{"get":{"description":"Serve a Gram Functions asset from Gram.","operationId":"serveFunction","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}},{"allowEmptyValue":true,"description":"The procect ID that the asset belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The procect ID that the asset belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"serveFunction assets","tags":["assets"],"x-speakeasy-name-override":"serveFunction","x-speakeasy-react-hook":{"name":"serveFunction"}}},"/rpc/assets.serveImage":{"get":{"description":"Serve an image from Gram.","operationId":"serveImage","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"serveImage assets","tags":["assets"],"x-speakeasy-name-override":"serveImage","x-speakeasy-react-hook":{"name":"serveImage"}}},"/rpc/assets.serveOpenAPIv3":{"get":{"description":"Serve an OpenAPIv3 asset from Gram.","operationId":"serveOpenAPIv3","parameters":[{"allowEmptyValue":true,"description":"The ID of the asset to serve","in":"query","name":"id","required":true,"schema":{"description":"The ID of the asset to serve","type":"string"}},{"allowEmptyValue":true,"description":"The procect ID that the asset belongs to","in":"query","name":"project_id","required":true,"schema":{"description":"The procect ID that the asset belongs to","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"format":"binary","type":"string"}}},"description":"OK response.","headers":{"Content-Length":{"schema":{"format":"int64","type":"integer"}},"Content-Type":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"serveOpenAPIv3 assets","tags":["assets"],"x-speakeasy-name-override":"serveOpenAPIv3","x-speakeasy-react-hook":{"name":"serveOpenAPIv3"}}},"/rpc/assets.uploadChatAttachment":{"post":{"description":"Upload a chat attachment to Gram.","operationId":"uploadChatAttachment","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadChatAttachmentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[],"project_slug_header_Gram-Project":[]}],"summary":"uploadChatAttachment assets","tags":["assets"],"x-speakeasy-name-override":"uploadChatAttachment","x-speakeasy-react-hook":{"name":"UploadChatAttachment"}}},"/rpc/assets.uploadFunctions":{"post":{"description":"Upload functions to Gram.","operationId":"uploadFunctions","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFunctionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadFunctions assets","tags":["assets"],"x-speakeasy-name-override":"uploadFunctions","x-speakeasy-react-hook":{"name":"UploadFunctions"}}},"/rpc/assets.uploadImage":{"post":{"description":"Upload an image to Gram.","operationId":"uploadImage","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadImageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadImage assets","tags":["assets"],"x-speakeasy-name-override":"uploadImage","x-speakeasy-react-hook":{"name":"UploadImage"}}},"/rpc/assets.uploadOpenAPIv3":{"post":{"description":"Upload an OpenAPI v3 document to Gram.","operationId":"uploadOpenAPIv3Asset","parameters":[{"allowEmptyValue":true,"in":"header","name":"Content-Type","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"in":"header","name":"Content-Length","required":true,"schema":{"format":"int64","type":"integer"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOpenAPIv3Result"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"uploadOpenAPIv3 assets","tags":["assets"],"x-speakeasy-name-override":"uploadOpenAPIv3","x-speakeasy-react-hook":{"name":"UploadOpenAPIv3"}}},"/rpc/auth.callback":{"get":{"description":"Handles the authentication callback.","operationId":"authCallback","parameters":[{"allowEmptyValue":true,"description":"The auth code for authentication from the speakeasy system","in":"query","name":"code","required":true,"schema":{"description":"The auth code for authentication from the speakeasy system","type":"string"}},{"allowEmptyValue":true,"description":"The opaque state string optionally provided during initialization.","in":"query","name":"state","schema":{"description":"The opaque state string optionally provided during initialization.","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"callback auth","tags":["auth"],"x-speakeasy-name-override":"callback","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/auth.info":{"get":{"description":"Provides information about the current authentication status.","operationId":"sessionInfo","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoResponseBody"}}},"description":"OK response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"info auth","tags":["auth"],"x-speakeasy-name-override":"info","x-speakeasy-react-hook":{"name":"SessionInfo"}}},"/rpc/auth.login":{"get":{"description":"Proxies to auth login through speakeasy oidc.","operationId":"authLogin","parameters":[{"allowEmptyValue":true,"description":"Optional URL to redirect to after successful authentication","in":"query","name":"redirect","schema":{"description":"Optional URL to redirect to after successful authentication","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"login auth","tags":["auth"],"x-speakeasy-name-override":"login","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/auth.logout":{"post":{"description":"Logs out the current user by clearing their session.","operationId":"logout","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response.","headers":{"Set-Cookie":{"description":"Empty string to clear the session","schema":{"description":"Empty string to clear the session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"logout auth","tags":["auth"],"x-speakeasy-name-override":"logout","x-speakeasy-react-hook":{"name":"Logout"}}},"/rpc/auth.register":{"post":{"description":"Register a new org for a user with their session information.","operationId":"register","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"register auth","tags":["auth"],"x-speakeasy-name-override":"register","x-speakeasy-react-hook":{"name":"Register"}}},"/rpc/auth.switchScopes":{"post":{"description":"Switches the authentication scope to a different organization.","operationId":"switchAuthScopes","parameters":[{"allowEmptyValue":true,"description":"The organization slug to switch scopes","in":"query","name":"organization_id","schema":{"description":"The organization slug to switch scopes","type":"string"}},{"allowEmptyValue":true,"description":"The project id to switch scopes too","in":"query","name":"project_id","schema":{"description":"The project id to switch scopes too","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response.","headers":{"Gram-Session":{"description":"Session header","schema":{"description":"Session header","type":"string"}},"Set-Cookie":{"description":"The authentication session","schema":{"description":"The authentication session","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"switchScopes auth","tags":["auth"],"x-speakeasy-name-override":"switchScopes","x-speakeasy-react-hook":{"name":"SwitchScopes"}}},"/rpc/chat.creditUsage":{"get":{"description":"Load a chat by its ID","operationId":"creditUsage","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditUsageResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"creditUsage chat","tags":["chat"],"x-speakeasy-name-override":"creditUsage","x-speakeasy-react-hook":{"name":"GetCreditUsage"}}},"/rpc/chat.generateTitle":{"post":{"description":"Generate a title for a chat based on its messages","operationId":"generateTitle","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServeImageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTitleResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"generateTitle chat","tags":["chat"],"x-speakeasy-name-override":"generateTitle"}},"/rpc/chat.list":{"get":{"description":"List all chats for a project","operationId":"listChats","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChatsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"listChats chat","tags":["chat"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListChats"}}},"/rpc/chat.listChatsWithResolutions":{"get":{"description":"List all chats for a project with their resolutions","operationId":"listChatsWithResolutions","parameters":[{"allowEmptyValue":true,"description":"Search query (searches chat ID, user ID, and title)","in":"query","name":"search","schema":{"description":"Search query (searches chat ID, user ID, and title)","type":"string"}},{"allowEmptyValue":true,"description":"Filter by external user ID","in":"query","name":"external_user_id","schema":{"description":"Filter by external user ID","type":"string"}},{"allowEmptyValue":true,"description":"Filter by resolution status","in":"query","name":"resolution_status","schema":{"description":"Filter by resolution status","type":"string"}},{"allowEmptyValue":true,"description":"Filter chats created after this timestamp (ISO 8601)","in":"query","name":"from","schema":{"description":"Filter chats created after this timestamp (ISO 8601)","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Filter chats created before this timestamp (ISO 8601)","in":"query","name":"to","schema":{"description":"Filter chats created before this timestamp (ISO 8601)","format":"date-time","type":"string"}},{"allowEmptyValue":true,"description":"Number of results per page","in":"query","name":"limit","schema":{"default":50,"description":"Number of results per page","format":"int64","maximum":100,"minimum":1,"type":"integer"}},{"allowEmptyValue":true,"description":"Pagination offset","in":"query","name":"offset","schema":{"default":0,"description":"Pagination offset","format":"int64","minimum":0,"type":"integer"}},{"allowEmptyValue":true,"description":"Field to sort by","in":"query","name":"sort_by","schema":{"default":"created_at","description":"Field to sort by","enum":["created_at","num_messages","score"],"type":"string"}},{"allowEmptyValue":true,"description":"Sort order","in":"query","name":"sort_order","schema":{"default":"desc","description":"Sort order","enum":["asc","desc"],"type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChatsWithResolutionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"listChatsWithResolutions chat","tags":["chat"],"x-speakeasy-name-override":"listChatsWithResolutions","x-speakeasy-react-hook":{"name":"ListChatsWithResolutions","type":"query"}}},"/rpc/chat.load":{"get":{"description":"Load a chat by its ID","operationId":"loadChat","parameters":[{"allowEmptyValue":true,"description":"The ID of the chat","in":"query","name":"id","required":true,"schema":{"description":"The ID of the chat","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"loadChat chat","tags":["chat"],"x-speakeasy-name-override":"load","x-speakeasy-react-hook":{"name":"LoadChat"}}},"/rpc/chat.submitFeedback":{"post":{"description":"Submit user feedback for a chat (success/failure)","operationId":"submitFeedback","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"submitFeedback chat","tags":["chat"],"x-speakeasy-name-override":"submitFeedback"}},"/rpc/chatSessions.create":{"post":{"description":"Creates a new chat session token","operationId":"createChatSession","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"create chatSessions","tags":["chatSessions"],"x-speakeasy-name-override":"create"}},"/rpc/chatSessions.revoke":{"delete":{"description":"Revokes an existing chat session token","operationId":"revokeChatSession","parameters":[{"allowEmptyValue":true,"description":"The chat session token to revoke","in":"query","name":"token","required":true,"schema":{"description":"The chat session token to revoke","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"revoke chatSessions","tags":["chatSessions"],"x-speakeasy-name-override":"revoke"}},"/rpc/deployments.active":{"get":{"description":"Get the active deployment for a project.","operationId":"getActiveDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetActiveDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getActiveDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"active","x-speakeasy-react-hook":{"name":"ActiveDeployment"}}},"/rpc/deployments.create":{"post":{"description":"Create a deployment to load tool definitions.","operationId":"createDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m","in":"header","name":"Idempotency-Key","required":true,"schema":{"description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeploymentRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateDeployment"}}},"/rpc/deployments.evolve":{"post":{"description":"Create a new deployment with additional or updated tool sources.","operationId":"evolveDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolveForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvolveResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"evolve deployments","tags":["deployments"],"x-speakeasy-name-override":"evolveDeployment","x-speakeasy-react-hook":{"name":"EvolveDeployment"}}},"/rpc/deployments.get":{"get":{"description":"Get a deployment by its ID.","operationId":"getDeployment","parameters":[{"allowEmptyValue":true,"description":"The ID of the deployment","in":"query","name":"id","required":true,"schema":{"description":"The ID of the deployment","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"getById","x-speakeasy-react-hook":{"name":"Deployment"}}},"/rpc/deployments.latest":{"get":{"description":"Get the latest deployment for a project.","operationId":"getLatestDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLatestDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getLatestDeployment deployments","tags":["deployments"],"x-speakeasy-name-override":"latest","x-speakeasy-react-hook":{"name":"LatestDeployment"}}},"/rpc/deployments.list":{"get":{"description":"List all deployments in descending order of creation.","operationId":"listDeployments","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDeploymentResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listDeployments deployments","tags":["deployments"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListDeployments"}}},"/rpc/deployments.logs":{"get":{"description":"Get logs for a deployment.","operationId":"getDeploymentLogs","parameters":[{"allowEmptyValue":true,"description":"The ID of the deployment","in":"query","name":"deployment_id","required":true,"schema":{"description":"The ID of the deployment","type":"string"}},{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDeploymentLogsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getDeploymentLogs deployments","tags":["deployments"],"x-speakeasy-name-override":"logs","x-speakeasy-react-hook":{"name":"DeploymentLogs"}}},"/rpc/deployments.redeploy":{"post":{"description":"Redeploys an existing deployment.","operationId":"redeployDeployment","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeployRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeployResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"redeploy deployments","tags":["deployments"],"x-speakeasy-name-override":"redeployDeployment","x-speakeasy-react-hook":{"name":"RedeployDeployment"}}},"/rpc/domain.delete":{"delete":{"description":"Delete a custom domain","operationId":"deleteDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteDomain domains","tags":["domains"],"x-speakeasy-name-override":"deleteDomain","x-speakeasy-react-hook":{"name":"deleteDomain"}}},"/rpc/domain.get":{"get":{"description":"Get the custom domain for a project","operationId":"getDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getDomain domains","tags":["domains"],"x-speakeasy-name-override":"getDomain","x-speakeasy-react-hook":{"name":"getDomain"}}},"/rpc/domain.register":{"post":{"description":"Create a custom domain for a organization","operationId":"registerDomain","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createDomain domains","tags":["domains"],"x-speakeasy-name-override":"registerDomain","x-speakeasy-react-hook":{"name":"registerDomain"}}},"/rpc/environments.create":{"post":{"description":"Create a new environment","operationId":"createEnvironment","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnvironmentForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateEnvironment"}}},"/rpc/environments.delete":{"delete":{"description":"Delete an environment","operationId":"deleteEnvironment","parameters":[{"allowEmptyValue":true,"description":"The slug of the environment to delete","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"deleteBySlug","x-speakeasy-react-hook":{"name":"DeleteEnvironment"}}},"/rpc/environments.deleteSourceLink":{"delete":{"description":"Delete a link between a source and an environment","operationId":"deleteSourceEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"The kind of source (http or function)","in":"query","name":"source_kind","required":true,"schema":{"description":"The kind of source that can be linked to an environment","enum":["http","function"],"type":"string"}},{"allowEmptyValue":true,"description":"The slug of the source","in":"query","name":"source_slug","required":true,"schema":{"description":"The slug of the source","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteSourceEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"deleteSourceLink","x-speakeasy-react-hook":{"name":"DeleteSourceEnvironmentLink"}}},"/rpc/environments.deleteToolsetLink":{"delete":{"description":"Delete a link between a toolset and an environment","operationId":"deleteToolsetEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"The ID of the toolset","in":"query","name":"toolset_id","required":true,"schema":{"description":"The ID of the toolset","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteToolsetEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"deleteToolsetLink","x-speakeasy-react-hook":{"name":"DeleteToolsetEnvironmentLink"}}},"/rpc/environments.getSourceEnvironment":{"get":{"description":"Get the environment linked to a source","operationId":"getSourceEnvironment","parameters":[{"allowEmptyValue":true,"description":"The kind of source (http or function)","in":"query","name":"source_kind","required":true,"schema":{"description":"The kind of source that can be linked to an environment","enum":["http","function"],"type":"string"}},{"allowEmptyValue":true,"description":"The slug of the source","in":"query","name":"source_slug","required":true,"schema":{"description":"The slug of the source","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getSourceEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"getBySource","x-speakeasy-react-hook":{"name":"GetSourceEnvironment"}}},"/rpc/environments.getToolsetEnvironment":{"get":{"description":"Get the environment linked to a toolset","operationId":"getToolsetEnvironment","parameters":[{"allowEmptyValue":true,"description":"The ID of the toolset","in":"query","name":"toolset_id","required":true,"schema":{"description":"The ID of the toolset","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getToolsetEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"getByToolset","x-speakeasy-react-hook":{"name":"GetToolsetEnvironment"}}},"/rpc/environments.list":{"get":{"description":"List all environments for an organization","operationId":"listEnvironments","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvironmentsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listEnvironments environments","tags":["environments"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListEnvironments"}}},"/rpc/environments.setSourceLink":{"put":{"description":"Set (upsert) a link between a source and an environment","operationId":"setSourceEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSourceEnvironmentLinkRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceEnvironmentLink"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setSourceEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"setSourceLink","x-speakeasy-react-hook":{"name":"SetSourceEnvironmentLink"}}},"/rpc/environments.setToolsetLink":{"put":{"description":"Set (upsert) a link between a toolset and an environment","operationId":"setToolsetEnvironmentLink","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetToolsetEnvironmentLinkRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolsetEnvironmentLink"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setToolsetEnvironmentLink environments","tags":["environments"],"x-speakeasy-name-override":"setToolsetLink","x-speakeasy-react-hook":{"name":"SetToolsetEnvironmentLink"}}},"/rpc/environments.update":{"post":{"description":"Update an environment","operationId":"updateEnvironment","parameters":[{"allowEmptyValue":true,"description":"The slug of the environment to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEnvironmentRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateEnvironment environments","tags":["environments"],"x-speakeasy-name-override":"updateBySlug","x-speakeasy-react-hook":{"name":"UpdateEnvironment"}}},"/rpc/instances.get":{"get":{"description":"Load all relevant data for an instance of a toolset and environment","operationId":"getInstance","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to load","in":"query","name":"toolset_slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInstanceResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"getInstance instances","tags":["instances"],"x-speakeasy-name-override":"getBySlug","x-speakeasy-react-hook":{"name":"Instance"}}},"/rpc/integrations.get":{"get":{"tags":["integrations"],"summary":"get integrations","description":"Get a third-party integration by ID or name.","operationId":"integrations#get","parameters":[{"name":"id","in":"query","description":"The ID of the integration to get (refers to a package id).","allowEmptyValue":true,"schema":{"type":"string","description":"The ID of the integration to get (refers to a package id)."}},{"name":"name","in":"query","description":"The name of the integration to get (refers to a package name).","allowEmptyValue":true,"schema":{"type":"string","description":"The name of the integration to get (refers to a package name)."}},{"name":"Gram-Session","in":"header","description":"Session header","allowEmptyValue":true,"schema":{"type":"string","description":"Session header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIntegrationResult"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}]}},"/rpc/integrations.list":{"get":{"description":"List available third-party integrations.","operationId":"listIntegrations","parameters":[{"allowEmptyValue":true,"description":"Keywords to filter integrations by","in":"query","name":"keywords","schema":{"description":"Keywords to filter integrations by","items":{"maxLength":20,"type":"string"},"type":"array"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIntegrationsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"list integrations","tags":["integrations"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListIntegrations"}}},"/rpc/keys.create":{"post":{"description":"Create a new api key","operationId":"createAPIKey","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Key"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"createKey keys","tags":["keys"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateAPIKey"}}},"/rpc/keys.list":{"get":{"description":"List all api keys for an organization","operationId":"listAPIKeys","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListKeysResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"listKeys keys","tags":["keys"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListAPIKeys"}}},"/rpc/keys.revoke":{"delete":{"description":"Revoke a api key","operationId":"revokeAPIKey","parameters":[{"allowEmptyValue":true,"description":"The ID of the key to revoke","in":"query","name":"id","required":true,"schema":{"description":"The ID of the key to revoke","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"session_header_Gram-Session":[]}],"summary":"revokeKey keys","tags":["keys"],"x-speakeasy-name-override":"revokeById","x-speakeasy-react-hook":{"name":"RevokeAPIKey"}}},"/rpc/keys.verify":{"get":{"description":"Verify an api key","operationId":"validateAPIKey","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateKeyResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]}],"summary":"verifyKey keys","tags":["keys"],"x-speakeasy-name-override":"validate","x-speakeasy-react-hook":{"name":"ValidateAPIKey"}}},"/rpc/mcpMetadata.export":{"post":{"description":"Export MCP server details as JSON for documentation and integration purposes.","operationId":"exportMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportMcpMetadataRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpExport"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"exportMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"export","x-speakeasy-react-hook":{"name":"ExportMcpMetadata"}}},"/rpc/mcpMetadata.get":{"get":{"description":"Fetch the metadata that powers the MCP install page.","operationId":"getMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset associated with this install page metadata","in":"query","name":"toolset_slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMcpMetadataResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"GetMcpMetadata"}}},"/rpc/mcpMetadata.set":{"post":{"description":"Create or update the metadata that powers the MCP install page.","operationId":"setMcpMetadata","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMcpMetadataRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpMetadata"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setMcpMetadata mcpMetadata","tags":["mcpMetadata"],"x-speakeasy-name-override":"set"}},"/rpc/mcpRegistries.listCatalog":{"get":{"description":"List available MCP servers from configured registries","operationId":"listMCPCatalog","parameters":[{"allowEmptyValue":true,"description":"Filter to a specific registry","in":"query","name":"registry_id","schema":{"description":"Filter to a specific registry","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Search query to filter servers by name","in":"query","name":"search","schema":{"description":"Search query to filter servers by name","type":"string"}},{"allowEmptyValue":true,"description":"Pagination cursor","in":"query","name":"cursor","schema":{"description":"Pagination cursor","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCatalogResponseBody"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listCatalog mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"listCatalog","x-speakeasy-react-hook":{"name":"ListMCPCatalog"}}},"/rpc/packages.create":{"post":{"description":"Create a new package for a project.","operationId":"createPackage","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePackageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createPackage packages","tags":["packages"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreatePackage"}}},"/rpc/packages.list":{"get":{"description":"List all packages for a project.","operationId":"listPackages","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPackagesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listPackages packages","tags":["packages"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListPackages"}}},"/rpc/packages.listVersions":{"get":{"description":"List published versions of a package.","operationId":"listVersions","parameters":[{"allowEmptyValue":true,"description":"The name of the package","in":"query","name":"name","required":true,"schema":{"description":"The name of the package","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVersionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listVersions packages","tags":["packages"],"x-speakeasy-name-override":"listVersions","x-speakeasy-react-hook":{"name":"ListVersions"}}},"/rpc/packages.publish":{"post":{"description":"Publish a new version of a package.","operationId":"publish","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPackageResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"publish packages","tags":["packages"],"x-speakeasy-name-override":"publish","x-speakeasy-react-hook":{"name":"PublishPackage"}}},"/rpc/packages.update":{"put":{"description":"Update package details.","operationId":"updatePackage","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePackageForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePackageResult"}}},"description":"OK response."},"304":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotModified"}}},"description":"not_modified: Not Modified response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updatePackage packages","tags":["packages"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdatePackage"}}},"/rpc/productFeatures.set":{"post":{"description":"Enable or disable an organization feature flag.","operationId":"setProductFeature","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProductFeatureRequestBody"}}},"required":true},"responses":{"200":{"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setProductFeature features","tags":["features"],"x-speakeasy-name-override":"set"}},"/rpc/projects.create":{"post":{"description":"Create a new project.","operationId":"createProject","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"createProject projects","tags":["projects"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateProject"}}},"/rpc/projects.delete":{"delete":{"description":"Delete a project by its ID","operationId":"deleteProject","parameters":[{"allowEmptyValue":true,"description":"The id of the project to delete","in":"query","name":"id","required":true,"schema":{"description":"The id of the project to delete","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"deleteProject projects","tags":["projects"],"x-speakeasy-name-override":"deleteById","x-speakeasy-react-hook":{"name":"DeleteProject"}}},"/rpc/projects.get":{"get":{"description":"Get project details by slug.","operationId":"getProject","parameters":[{"allowEmptyValue":true,"description":"The slug of the project to get","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"getProject projects","tags":["projects"],"x-speakeasy-name-override":"read","x-speakeasy-react-hook":{"name":"Project"}}},"/rpc/projects.list":{"get":{"description":"List all projects for an organization.","operationId":"listProjects","parameters":[{"allowEmptyValue":true,"description":"The ID of the organization to list projects for","in":"query","name":"organization_id","required":true,"schema":{"description":"The ID of the organization to list projects for","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProjectsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[]},{"session_header_Gram-Session":[]}],"summary":"listProjects projects","tags":["projects"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListProjects"}}},"/rpc/projects.listAllowedOrigins":{"get":{"description":"List allowed origins for a project.","operationId":"listAllowedOrigins","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAllowedOriginsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAllowedOrigins projects","tags":["projects"],"x-speakeasy-name-override":"listAllowedOrigins","x-speakeasy-react-hook":{"name":"ListAllowedOrigins"}}},"/rpc/projects.setLogo":{"post":{"description":"Uploads a logo for a project.","operationId":"setProjectLogo","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSignedAssetURLForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetProjectLogoResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"setLogo projects","tags":["projects"],"x-speakeasy-name-override":"setLogo","x-speakeasy-react-hook":{"name":"setProjectLogo"}}},"/rpc/projects.upsertAllowedOrigin":{"post":{"description":"Upsert an allowed origin for a project.","operationId":"upsertAllowedOrigin","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAllowedOriginForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertAllowedOriginResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"upsertAllowedOrigin projects","tags":["projects"],"x-speakeasy-name-override":"upsertAllowedOrigin","x-speakeasy-react-hook":{"name":"UpsertAllowedOrigin"}}},"/rpc/resources.list":{"get":{"description":"List all resources for a project","operationId":"listResources","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"The number of resources to return per page","in":"query","name":"limit","schema":{"description":"The number of resources to return per page","format":"int32","type":"integer"}},{"allowEmptyValue":true,"description":"The deployment ID. If unset, latest deployment will be used.","in":"query","name":"deployment_id","schema":{"description":"The deployment ID. If unset, latest deployment will be used.","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResourcesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listResources resources","tags":["resources"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListResources"}}},"/rpc/slack.callback":{"get":{"description":"Handles the authentication callback.","operationId":"slackCallback","parameters":[{"allowEmptyValue":true,"description":"The state parameter from the callback","in":"query","name":"state","required":true,"schema":{"description":"The state parameter from the callback","type":"string"}},{"allowEmptyValue":true,"description":"The code parameter from the callback","in":"query","name":"code","required":true,"schema":{"description":"The code parameter from the callback","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"callback slack","tags":["slack"],"x-speakeasy-name-override":"slackCallback","x-speakeasy-react-hook":{"disabled":true}}},"/rpc/slack.deleteConnection":{"delete":{"description":"delete slack connection for an organization and project.","operationId":"deleteSlackConnection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"deleteSlackConnection slack","tags":["slack"],"x-speakeasy-name-override":"deleteSlackConnection","x-speakeasy-react-hook":{"name":"deleteSlackConnection"}}},"/rpc/slack.getConnection":{"get":{"description":"get slack connection for an organization and project.","operationId":"getSlackConnection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSlackConnectionResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getSlackConnection slack","tags":["slack"],"x-speakeasy-name-override":"getSlackConnection","x-speakeasy-react-hook":{"name":"getSlackConnection"}}},"/rpc/slack.updateConnection":{"post":{"description":"update slack connection for an organization and project.","operationId":"updateSlackConnection","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSlackConnectionRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSlackConnectionResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"updateSlackConnection slack","tags":["slack"],"x-speakeasy-name-override":"updateSlackConnection","x-speakeasy-react-hook":{"name":"updateSlackConnection"}}},"/rpc/telemetry.captureEvent":{"post":{"description":"Capture a telemetry event and forward it to PostHog","operationId":"captureEvent","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}},{"allowEmptyValue":true,"description":"Chat Sessions token header","in":"header","name":"Gram-Chat-Session","schema":{"description":"Chat Sessions token header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureEventResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"chat_sessions_token_header_Gram-Chat-Session":[]}],"summary":"captureEvent telemetry","tags":["telemetry"],"x-speakeasy-name-override":"captureEvent"}},"/rpc/telemetry.getObservabilityOverview":{"post":{"description":"Get observability overview metrics including time series, tool breakdowns, and summary stats","operationId":"getObservabilityOverview","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetObservabilityOverviewPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetObservabilityOverviewResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getObservabilityOverview telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getObservabilityOverview","x-speakeasy-react-hook":{"name":"GetObservabilityOverview","type":"query"}}},"/rpc/telemetry.getProjectMetricsSummary":{"post":{"description":"Get aggregated metrics summary for an entire project","operationId":"getProjectMetricsSummary","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMetricsSummaryResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getProjectMetricsSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getProjectMetricsSummary","x-speakeasy-react-hook":{"name":"GetProjectMetricsSummary","type":"query"}}},"/rpc/telemetry.getUserMetricsSummary":{"post":{"description":"Get aggregated metrics summary grouped by user","operationId":"getUserMetricsSummary","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserMetricsSummaryResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getUserMetricsSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getUserMetricsSummary","x-speakeasy-react-hook":{"name":"GetUserMetricsSummary","type":"query"}}},"/rpc/telemetry.listAttributeKeys":{"post":{"description":"List distinct attribute keys available for filtering","operationId":"listAttributeKeys","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectMetricsSummaryPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAttributeKeysResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listAttributeKeys telemetry","tags":["telemetry"],"x-speakeasy-name-override":"listAttributeKeys","x-speakeasy-react-hook":{"name":"ListAttributeKeys","type":"query"}}},"/rpc/telemetry.listFilterOptions":{"post":{"description":"List available filter options (API keys or users) for the observability overview","operationId":"listFilterOptions","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilterOptionsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilterOptionsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listFilterOptions telemetry","tags":["telemetry"],"x-speakeasy-name-override":"listFilterOptions","x-speakeasy-react-hook":{"name":"ListFilterOptions","type":"query"}}},"/rpc/telemetry.searchChats":{"post":{"description":"Search and list chat session summaries that match a search filter","operationId":"searchChats","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchChatsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchChatsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchChats telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchChats","x-speakeasy-react-hook":{"name":"SearchChats","type":"query"}}},"/rpc/telemetry.searchLogs":{"post":{"description":"Search and list telemetry logs that match a search filter","operationId":"searchLogs","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchLogsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchLogsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchLogs telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchLogs","x-speakeasy-react-hook":{"name":"SearchLogs"}}},"/rpc/telemetry.searchToolCalls":{"post":{"description":"Search and list tool calls that match a search filter","operationId":"searchToolCalls","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchToolCallsPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchToolCallsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchToolCalls telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchToolCalls","x-speakeasy-react-hook":{"name":"SearchToolCalls"}}},"/rpc/telemetry.searchUsers":{"post":{"description":"Search and list user usage summaries grouped by user_id or external_user_id","operationId":"searchUsers","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUsersPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUsersResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"searchUsers telemetry","tags":["telemetry"],"x-speakeasy-name-override":"searchUsers","x-speakeasy-react-hook":{"name":"SearchUsers","type":"query"}}},"/rpc/templates.create":{"post":{"description":"Create a new prompt template.","operationId":"createTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromptTemplateForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createTemplate templates","tags":["templates"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateTemplate"}}},"/rpc/templates.delete":{"delete":{"description":"Delete prompt template by its ID or name.","operationId":"deleteTemplate","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template","in":"query","name":"id","schema":{"description":"The ID of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"The name of the prompt template","in":"query","name":"name","schema":{"description":"The name of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteTemplate templates","tags":["templates"],"x-speakeasy-name-override":"delete","x-speakeasy-react-hook":{"name":"DeleteTemplate"}}},"/rpc/templates.get":{"get":{"description":"Get prompt template by its ID or name.","operationId":"getTemplate","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template","in":"query","name":"id","schema":{"description":"The ID of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"The name of the prompt template","in":"query","name":"name","schema":{"description":"The name of the prompt template","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getTemplate templates","tags":["templates"],"x-speakeasy-name-override":"get","x-speakeasy-react-hook":{"name":"Template"}}},"/rpc/templates.list":{"get":{"description":"List available prompt template.","operationId":"listTemplates","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPromptTemplatesResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listTemplates templates","tags":["templates"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"Templates"}}},"/rpc/templates.render":{"post":{"description":"Render a prompt template by ID with provided input data.","operationId":"renderTemplateByID","parameters":[{"allowEmptyValue":true,"description":"The ID of the prompt template to render","in":"query","name":"id","required":true,"schema":{"description":"The ID of the prompt template to render","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateByIDRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"renderTemplateByID templates","tags":["templates"],"x-speakeasy-name-override":"renderByID","x-speakeasy-react-hook":{"name":"RenderTemplateByID","type":"query"}}},"/rpc/templates.renderDirect":{"post":{"description":"Render a prompt template directly with all template fields provided.","operationId":"renderTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"renderTemplate templates","tags":["templates"],"x-speakeasy-name-override":"render","x-speakeasy-react-hook":{"name":"RenderTemplate","type":"query"}}},"/rpc/templates.update":{"post":{"description":"Update a prompt template.","operationId":"updateTemplate","parameters":[{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePromptTemplateForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePromptTemplateResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateTemplate templates","tags":["templates"],"x-speakeasy-name-override":"update","x-speakeasy-react-hook":{"name":"UpdateTemplate"}}},"/rpc/tools.list":{"get":{"description":"List all tools for a project","operationId":"listTools","parameters":[{"allowEmptyValue":true,"description":"The cursor to fetch results from","in":"query","name":"cursor","schema":{"description":"The cursor to fetch results from","type":"string"}},{"allowEmptyValue":true,"description":"The number of tools to return per page","in":"query","name":"limit","schema":{"description":"The number of tools to return per page","format":"int32","type":"integer"}},{"allowEmptyValue":true,"description":"The deployment ID. If unset, latest deployment will be used.","in":"query","name":"deployment_id","schema":{"description":"The deployment ID. If unset, latest deployment will be used.","type":"string"}},{"allowEmptyValue":true,"description":"Filter tools by URN prefix (e.g. 'tools:http:kitchen-sink' to match all tools starting with that prefix)","in":"query","name":"urn_prefix","schema":{"description":"Filter tools by URN prefix (e.g. 'tools:http:kitchen-sink' to match all tools starting with that prefix)","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"listTools tools","tags":["tools"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListTools"}}},"/rpc/toolsets.addExternalOAuthServer":{"post":{"description":"Associate an external OAuth server with a toolset","operationId":"addExternalOAuthServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddExternalOAuthServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"addExternalOAuthServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"addExternalOAuthServer","x-speakeasy-react-hook":{"name":"AddExternalOAuthServer"}}},"/rpc/toolsets.addOAuthProxyServer":{"post":{"description":"Associate an OAuth proxy server with a toolset (admin only)","operationId":"addOAuthProxyServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOAuthProxyServerRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"addOAuthProxyServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"addOAuthProxyServer","x-speakeasy-react-hook":{"name":"AddOAuthProxyServer"}}},"/rpc/toolsets.checkMCPSlugAvailability":{"get":{"description":"Check if a MCP slug is available","operationId":"checkMCPSlugAvailability","parameters":[{"allowEmptyValue":true,"description":"The slug to check","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"boolean"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"checkMCPSlugAvailability toolsets","tags":["toolsets"],"x-speakeasy-name-override":"checkMCPSlugAvailability","x-speakeasy-react-hook":{"name":"CheckMCPSlugAvailability"}}},"/rpc/toolsets.clone":{"post":{"description":"Clone an existing toolset with a new name","operationId":"cloneToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to clone","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Authorization":[],"project_slug_header_Gram-Project":[]}],"summary":"cloneToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"cloneBySlug","x-speakeasy-react-hook":{"name":"CloneToolset"}}},"/rpc/toolsets.create":{"post":{"description":"Create a new toolset with associated tools","operationId":"createToolset","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateToolsetRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"createToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"create","x-speakeasy-react-hook":{"name":"CreateToolset"}}},"/rpc/toolsets.delete":{"delete":{"description":"Delete a toolset by its ID","operationId":"deleteToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"204":{"description":"No Content response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"deleteBySlug","x-speakeasy-react-hook":{"name":"DeleteToolset"}}},"/rpc/toolsets.get":{"get":{"description":"Get detailed information about a toolset including full HTTP tool definitions","operationId":"getToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"getToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"getBySlug","x-speakeasy-react-hook":{"name":"Toolset"}}},"/rpc/toolsets.list":{"get":{"description":"List all toolsets for a project","operationId":"listToolsets","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListToolsetsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listToolsets toolsets","tags":["toolsets"],"x-speakeasy-name-override":"list","x-speakeasy-react-hook":{"name":"ListToolsets"}}},"/rpc/toolsets.removeOAuthServer":{"post":{"description":"Remove OAuth server association from a toolset","operationId":"removeOAuthServer","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"removeOAuthServer toolsets","tags":["toolsets"],"x-speakeasy-name-override":"removeOAuthServer","x-speakeasy-react-hook":{"name":"RemoveOAuthServer"}}},"/rpc/toolsets.update":{"post":{"description":"Update a toolset's properties including name, description, and HTTP tools","operationId":"updateToolset","parameters":[{"allowEmptyValue":true,"description":"The slug of the toolset to update","in":"query","name":"slug","required":true,"schema":{"description":"A short url-friendly label that uniquely identifies a resource.","maxLength":40,"pattern":"^[a-z0-9_-]{1,128}$","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolsetRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolset"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"updateToolset toolsets","tags":["toolsets"],"x-speakeasy-name-override":"updateBySlug","x-speakeasy-react-hook":{"name":"UpdateToolset"}}},"/rpc/usage.createCheckout":{"post":{"description":"Create a checkout link for upgrading to the business plan","operationId":"createCheckout","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createCheckout usage","tags":["usage"],"x-speakeasy-name-override":"createCheckout","x-speakeasy-react-hook":{"name":"createCheckout"}}},"/rpc/usage.createCustomerSession":{"post":{"description":"Create a customer session for the user","operationId":"createCustomerSession","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"createCustomerSession usage","tags":["usage"],"x-speakeasy-name-override":"createCustomerSession","x-speakeasy-react-hook":{"name":"createCustomerSession"}}},"/rpc/usage.getPeriodUsage":{"get":{"description":"Get the usage for a project for a given period","operationId":"getPeriodUsage","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodUsage"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]}],"summary":"getPeriodUsage usage","tags":["usage"],"x-speakeasy-name-override":"getPeriodUsage","x-speakeasy-react-hook":{"name":"getPeriodUsage"}}},"/rpc/usage.getUsageTiers":{"get":{"description":"Get the usage tiers","operationId":"getUsageTiers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageTiers"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"summary":"getUsageTiers usage","tags":["usage"],"x-speakeasy-name-override":"getUsageTiers","x-speakeasy-react-hook":{"name":"getUsageTiers"}}},"/rpc/variations.deleteGlobal":{"delete":{"description":"Create or update a globally defined tool variation.","operationId":"deleteGlobalVariation","parameters":[{"allowEmptyValue":true,"description":"The ID of the variation to delete","in":"query","name":"variation_id","required":true,"schema":{"description":"The ID of the variation to delete","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGlobalToolVariationResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"deleteGlobal variations","tags":["variations"],"x-speakeasy-name-override":"deleteGlobal","x-speakeasy-react-hook":{"name":"deleteGlobalVariation"}}},"/rpc/variations.listGlobal":{"get":{"description":"List globally defined tool variations.","operationId":"listGlobalVariations","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVariationsResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"listGlobal variations","tags":["variations"],"x-speakeasy-name-override":"listGlobal","x-speakeasy-react-hook":{"name":"GlobalVariations"}}},"/rpc/variations.upsertGlobal":{"post":{"description":"Create or update a globally defined tool variation.","operationId":"upsertGlobalVariation","parameters":[{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}},{"allowEmptyValue":true,"description":"API Key header","in":"header","name":"Gram-Key","schema":{"description":"API Key header","type":"string"}},{"allowEmptyValue":true,"description":"project header","in":"header","name":"Gram-Project","schema":{"description":"project header","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalToolVariationForm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertGlobalToolVariationResult"}}},"description":"OK response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_header_Gram-Project":[],"session_header_Gram-Session":[]},{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}],"summary":"upsertGlobal variations","tags":["variations"],"x-speakeasy-name-override":"upsertGlobal","x-speakeasy-react-hook":{"name":"UpsertGlobalVariation"}}},"/rpc/workflows.createResponse":{"post":{"tags":["agentworkflows"],"summary":"createResponse agentworkflows","description":"Create a new agent response. Executes an agent workflow with the provided input and tools.","operationId":"createResponse","parameters":[{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentRequest"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentResponseOutput"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/workflows.deleteResponse":{"delete":{"tags":["agentworkflows"],"summary":"deleteResponse agentworkflows","description":"Deletes any response associated with a given agent run.","operationId":"deleteResponse","parameters":[{"name":"response_id","in":"query","description":"The ID of the response to retrieve","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"The ID of the response to retrieve"}},{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"responses":{"200":{"description":"OK response."},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/workflows.getResponse":{"get":{"tags":["agentworkflows"],"summary":"getResponse agentworkflows","description":"Get the status of an async agent response by its ID.","operationId":"getResponse","parameters":[{"name":"response_id","in":"query","description":"The ID of the response to retrieve","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"The ID of the response to retrieve"}},{"name":"Gram-Key","in":"header","description":"API Key header","allowEmptyValue":true,"schema":{"type":"string","description":"API Key header"}},{"name":"Gram-Project","in":"header","description":"project header","allowEmptyValue":true,"schema":{"type":"string","description":"project header"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentResponseOutput"}}}},"400":{"description":"bad_request: request is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized: unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden: permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict: resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media: unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid: request contains one or more invalidation fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"unexpected: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"gateway_error: an unexpected error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apikey_header_Gram-Key":[],"project_slug_header_Gram-Project":[]}]}},"/rpc/{project_slug}/slack.login":{"get":{"description":"Proxies to auth login through speakeasy oidc.","operationId":"slackLogin","parameters":[{"in":"path","name":"project_slug","required":true,"schema":{"type":"string"}},{"allowEmptyValue":true,"description":"The dashboard location to return too","in":"query","name":"return_url","schema":{"description":"The dashboard location to return too","type":"string"}},{"allowEmptyValue":true,"description":"Session header","in":"header","name":"Gram-Session","schema":{"description":"Session header","type":"string"}}],"responses":{"307":{"description":"Temporary Redirect response.","headers":{"Location":{"description":"The URL to redirect to after authentication","schema":{"description":"The URL to redirect to after authentication","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"bad_request: request is invalid"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unauthorized: unauthorized access"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"forbidden: permission denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"not_found: resource not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"conflict: resource already exists"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unsupported_media: unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invalid: request contains one or more invalidation fields"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected: an unexpected error occurred"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"gateway_error: an unexpected error occurred"}},"security":[{"project_slug_query_project_slug":[],"session_header_Gram-Session":[]}],"summary":"login slack","tags":["slack"],"x-speakeasy-name-override":"slackLogin","x-speakeasy-react-hook":{"disabled":true}}}},"components":{"schemas":{"AddDeploymentPackageForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package."},"version":{"type":"string","description":"The version of the package."}},"required":["name"]},"AddExternalMCPForm":{"type":"object","properties":{"name":{"type":"string","description":"The display name for the external MCP server.","example":"My Slack Integration"},"registry_id":{"type":"string","description":"The ID of the MCP registry the server is from.","format":"uuid"},"registry_server_specifier":{"type":"string","description":"The canonical server name used to look up the server in the registry (e.g., 'slack', 'ai.exa/exa').","example":"slack"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["registry_id","name","slug","registry_server_specifier"]},"AddExternalOAuthServerForm":{"type":"object","properties":{"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServerForm"},"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","external_oauth_server"]},"AddExternalOAuthServerRequestBody":{"type":"object","properties":{"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServerForm"}},"required":["external_oauth_server"]},"AddFunctionsForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the functions file from the assets service."},"name":{"type":"string","description":"The functions file display name."},"runtime":{"type":"string","description":"The runtime to use when executing functions. Allowed values are: nodejs:22, nodejs:24, python:3.12."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug","runtime"]},"AddOAuthProxyServerForm":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerForm"},"project_slug_input":{"type":"string"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","oauth_proxy_server"]},"AddOAuthProxyServerRequestBody":{"type":"object","properties":{"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServerForm"}},"required":["oauth_proxy_server"]},"AddOpenAPIv3DeploymentAssetForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug"]},"AddOpenAPIv3SourceForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["asset_id","name","slug"]},"AddOpenAPIv3SourceResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"AddPackageForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package to add."},"version":{"type":"string","description":"The version of the package to add. If omitted, the latest version will be used."}},"required":["name"]},"AllowedOrigin":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the allowed origin.","format":"date-time"},"id":{"type":"string","description":"The ID of the allowed origin"},"origin":{"type":"string","description":"The origin URL"},"project_id":{"type":"string","description":"The ID of the project"},"status":{"type":"string","default":"pending","enum":["pending","approved","rejected"]},"updated_at":{"type":"string","description":"The last update date of the allowed origin.","format":"date-time"}},"required":["id","project_id","origin","status","created_at","updated_at"]},"Asset":{"type":"object","properties":{"content_length":{"type":"integer","description":"The content length of the asset","format":"int64"},"content_type":{"type":"string","description":"The content type of the asset"},"created_at":{"type":"string","description":"The creation date of the asset.","format":"date-time"},"id":{"type":"string","description":"The ID of the asset"},"kind":{"type":"string","enum":["openapiv3","image","functions","chat_attachment","unknown"]},"sha256":{"type":"string","description":"The SHA256 hash of the asset"},"updated_at":{"type":"string","description":"The last update date of the asset.","format":"date-time"}},"required":["id","kind","sha256","content_type","content_length","created_at","updated_at"]},"AttributeFilter":{"type":"object","properties":{"op":{"type":"string","description":"Comparison operator","default":"eq","enum":["eq","not_eq","contains","exists","not_exists"]},"path":{"type":"string","description":"Attribute path. Use @ prefix for custom attributes (e.g. '@user.region'), or bare path for system attributes (e.g. 'http.route').","example":"@user.region","pattern":"^@?[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*$","minLength":1,"maxLength":256},"value":{"type":"string","description":"Value to compare against (ignored for 'exists' and 'not_exists' operators)","example":"us-east-1","maxLength":1024}},"description":"Filter on a log attribute by path.","required":["path"]},"BaseResourceAttributes":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the resource.","format":"date-time"},"description":{"type":"string","description":"Description of the resource"},"id":{"type":"string","description":"The ID of the resource"},"mime_type":{"type":"string","description":"Optional MIME type of the resource"},"name":{"type":"string","description":"The name of the resource"},"project_id":{"type":"string","description":"The ID of the project"},"resource_urn":{"type":"string","description":"The URN of this resource"},"title":{"type":"string","description":"Optional title for the resource"},"updated_at":{"type":"string","description":"The last update date of the resource.","format":"date-time"},"uri":{"type":"string","description":"The URI of the resource"}},"description":"Common attributes shared by all resource types","required":["id","project_id","name","description","uri","resource_urn","created_at","updated_at"]},"BaseToolAttributes":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"description":{"type":"string","description":"Description of the tool"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"project_id":{"type":"string","description":"The ID of the project"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"Common attributes shared by all tool types","required":["id","project_id","name","canonical_name","description","schema","tool_urn","created_at","updated_at"]},"CanonicalToolAttributes":{"type":"object","properties":{"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"description":{"type":"string","description":"Description of the tool"},"name":{"type":"string","description":"The name of the tool"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"variation_id":{"type":"string","description":"The ID of the variation that was applied to the tool"}},"description":"The original details of a tool","required":["variation_id","name","description"]},"CaptureEventPayload":{"type":"object","properties":{"distinct_id":{"type":"string","description":"Distinct ID for the user or entity (defaults to organization ID if not provided)"},"event":{"type":"string","description":"Event name","example":"button_clicked","minLength":1,"maxLength":255},"properties":{"type":"object","description":"Event properties as key-value pairs","example":{"button_name":"submit","page":"checkout","value":100},"additionalProperties":true}},"description":"Payload for capturing a telemetry event","required":["event"]},"CaptureEventResult":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the event was successfully captured"}},"description":"Result of capturing a telemetry event","required":["success"]},"Chat":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"},"description":"The list of messages in the chat"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"title":{"type":"string","description":"The title of the chat"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"required":["messages","id","title","num_messages","created_at","updated_at"]},"ChatMessage":{"type":"object","properties":{"content":{"type":"string","description":"The content of the message"},"created_at":{"type":"string","description":"When the message was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the message"},"finish_reason":{"type":"string","description":"The finish reason of the message"},"id":{"type":"string","description":"The ID of the message"},"model":{"type":"string","description":"The model that generated the message"},"role":{"type":"string","description":"The role of the message"},"tool_call_id":{"type":"string","description":"The tool call ID of the message"},"tool_calls":{"type":"string","description":"The tool calls in the message as a JSON blob"},"user_id":{"type":"string","description":"The ID of the user who created the message"}},"required":["id","role","model","created_at"]},"ChatOverview":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"title":{"type":"string","description":"The title of the chat"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"required":["id","title","num_messages","created_at","updated_at"]},"ChatOverviewWithResolutions":{"type":"object","properties":{"created_at":{"type":"string","description":"When the chat was created.","format":"date-time"},"external_user_id":{"type":"string","description":"The ID of the external user who created the chat"},"id":{"type":"string","description":"The ID of the chat"},"num_messages":{"type":"integer","description":"The number of messages in the chat","format":"int64"},"resolutions":{"type":"array","items":{"$ref":"#/components/schemas/ChatResolution"},"description":"List of resolutions for this chat"},"title":{"type":"string","description":"The title of the chat"},"updated_at":{"type":"string","description":"When the chat was last updated.","format":"date-time"},"user_id":{"type":"string","description":"The ID of the user who created the chat"}},"description":"Chat overview with embedded resolution data","required":["resolutions","id","title","num_messages","created_at","updated_at"]},"ChatResolution":{"type":"object","properties":{"created_at":{"type":"string","description":"When resolution was created","format":"date-time"},"id":{"type":"string","description":"Resolution ID","format":"uuid"},"message_ids":{"type":"array","items":{"type":"string"},"description":"Message IDs associated with this resolution","example":["abc-123","def-456"]},"resolution":{"type":"string","description":"Resolution status"},"resolution_notes":{"type":"string","description":"Notes about the resolution"},"score":{"type":"integer","description":"Score 0-100","format":"int64"},"user_goal":{"type":"string","description":"User's intended goal"}},"description":"Resolution information for a chat","required":["id","user_goal","resolution","resolution_notes","score","created_at","message_ids"]},"ChatSummary":{"type":"object","properties":{"duration_seconds":{"type":"number","description":"Chat session duration in seconds","format":"double"},"end_time_unix_nano":{"type":"integer","description":"Latest log timestamp in Unix nanoseconds","format":"int64"},"gram_chat_id":{"type":"string","description":"Chat session ID"},"log_count":{"type":"integer","description":"Total number of logs in this chat session","format":"int64"},"message_count":{"type":"integer","description":"Number of LLM completion messages in this chat session","format":"int64"},"model":{"type":"string","description":"LLM model used in this chat session"},"start_time_unix_nano":{"type":"integer","description":"Earliest log timestamp in Unix nanoseconds","format":"int64"},"status":{"type":"string","description":"Chat session status","enum":["success","error"]},"tool_call_count":{"type":"integer","description":"Number of tool calls in this chat session","format":"int64"},"total_input_tokens":{"type":"integer","description":"Total input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Total output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Total tokens used (input + output)","format":"int64"},"user_id":{"type":"string","description":"User ID associated with this chat session"}},"description":"Summary information for a chat session","required":["gram_chat_id","start_time_unix_nano","end_time_unix_nano","log_count","tool_call_count","message_count","duration_seconds","status","total_input_tokens","total_output_tokens","total_tokens"]},"CreateDeploymentForm":{"type":"object","properties":{"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"}},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"}},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"}},"packages":{"type":"array","items":{"$ref":"#/components/schemas/AddDeploymentPackageForm"}}},"required":["idempotency_key"]},"CreateDeploymentRequestBody":{"type":"object","properties":{"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"}},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"}},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"}},"packages":{"type":"array","items":{"$ref":"#/components/schemas/AddDeploymentPackageForm"}}}},"CreateDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"CreateDomainRequestBody":{"type":"object","properties":{"domain":{"type":"string","description":"The custom domain"}},"required":["domain"]},"CreateEnvironmentForm":{"type":"object","properties":{"description":{"type":"string","description":"Optional description of the environment"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment variable entries"},"name":{"type":"string","description":"The name of the environment"},"organization_id":{"type":"string","description":"The organization ID this environment belongs to"}},"description":"Form for creating a new environment","required":["organization_id","name","entries"]},"CreateKeyForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key"},"scopes":{"type":"array","items":{"type":"string"},"description":"The scopes of the key that determines its permissions.","minItems":1}},"required":["name","scopes"]},"CreatePackageForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the package. Limited markdown syntax is supported.","maxLength":10000},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package","maxLength":50},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package","maxItems":5},"name":{"type":"string","description":"The name of the package","pattern":"^[a-z0-9_-]{1,128}$","maxLength":100},"summary":{"type":"string","description":"The summary of the package","maxLength":80},"title":{"type":"string","description":"The title of the package","maxLength":100},"url":{"type":"string","description":"External URL for the package owner","maxLength":100}},"required":["name","title","summary"]},"CreatePackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"}},"required":["package"]},"CreateProjectForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"name":{"type":"string","description":"The name of the project","maxLength":40},"organization_id":{"type":"string","description":"The ID of the organization to create the project in"},"session_token":{"type":"string"}},"required":["organization_id","name"]},"CreateProjectRequestBody":{"type":"object","properties":{"name":{"type":"string","description":"The name of the project","maxLength":40},"organization_id":{"type":"string","description":"The ID of the organization to create the project in"}},"required":["organization_id","name"]},"CreateProjectResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"CreatePromptTemplateForm":{"type":"object","properties":{"arguments":{"type":"string","description":"The JSON Schema defining the placeholders found in the prompt template","format":"json"},"description":{"type":"string","description":"The description of the prompt template"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"prompt":{"type":"string","description":"The template content"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20}},"required":["name","prompt","engine","kind"]},"CreatePromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"CreateRequestBody":{"type":"object","properties":{"embed_origin":{"type":"string","description":"The origin from which the token will be used"},"expires_after":{"type":"integer","description":"Token expiration in seconds (max / default 3600)","default":3600,"format":"int64","minimum":1,"maximum":3600},"user_identifier":{"type":"string","description":"Optional free-form user identifier"}},"required":["embed_origin"]},"CreateResponseBody":{"type":"object","properties":{"client_token":{"type":"string","description":"JWT token for chat session"},"embed_origin":{"type":"string","description":"The origin from which the token will be used"},"expires_after":{"type":"integer","description":"Token expiration in seconds","format":"int64"},"status":{"type":"string","description":"Session status"},"user_identifier":{"type":"string","description":"User identifier if provided"}},"required":["embed_origin","client_token","expires_after","status"]},"CreateSignedChatAttachmentURLForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"id":{"type":"string","description":"The ID of the chat attachment"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"ttl_seconds":{"type":"integer","description":"Time-to-live in seconds (default: 600, max: 3600)","format":"int64"}},"required":["id","project_id"]},"CreateSignedChatAttachmentURLForm2":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the chat attachment"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"ttl_seconds":{"type":"integer","description":"Time-to-live in seconds (default: 600, max: 3600)","format":"int64"}},"required":["id","project_id"]},"CreateSignedChatAttachmentURLResult":{"type":"object","properties":{"expires_at":{"type":"string","description":"When the signed URL expires","format":"date-time"},"url":{"type":"string","description":"The signed URL to access the chat attachment"}},"required":["url","expires_at"]},"CreateToolsetForm":{"type":"object","properties":{"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"name":{"type":"string","description":"The name of the toolset"},"project_slug_input":{"type":"string"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["name"]},"CreateToolsetRequestBody":{"type":"object","properties":{"default_environment_slug":{"type":"string","description":"The slug of the environment to use as the default for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"name":{"type":"string","description":"The name of the toolset"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["name"]},"CreditUsageResponseBody":{"type":"object","properties":{"credits_used":{"type":"number","description":"The number of credits remaining","format":"double"},"monthly_credits":{"type":"integer","description":"The number of monthly credits","format":"int64"}},"required":["credits_used","monthly_credits"]},"CustomDomain":{"type":"object","properties":{"activated":{"type":"boolean","description":"Whether the domain is activated in ingress"},"created_at":{"type":"string","description":"When the custom domain was created.","format":"date-time"},"domain":{"type":"string","description":"The custom domain name"},"id":{"type":"string","description":"The ID of the custom domain"},"is_updating":{"type":"boolean","description":"The custom domain is actively being registered"},"organization_id":{"type":"string","description":"The ID of the organization this domain belongs to"},"updated_at":{"type":"string","description":"When the custom domain was last updated.","format":"date-time"},"verified":{"type":"boolean","description":"Whether the domain is verified"}},"required":["id","organization_id","domain","verified","activated","created_at","updated_at","is_updating"]},"DeleteGlobalToolVariationForm":{"type":"object","properties":{"variation_id":{"type":"string","description":"The ID of the variation to delete"}},"required":["variation_id"]},"DeleteGlobalToolVariationResult":{"type":"object","properties":{"variation_id":{"type":"string","description":"The ID of the variation that was deleted"}},"required":["variation_id"]},"Deployment":{"type":"object","properties":{"cloned_from":{"type":"string","description":"The ID of the deployment that this deployment was cloned from.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentExternalMCP"},"description":"The external MCP servers that were deployed."},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions_assets":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentFunctions"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/OpenAPIv3DeploymentAsset"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"organization_id":{"type":"string","description":"The ID of the organization that the deployment belongs to."},"packages":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentPackage"},"description":"The packages that were deployed."},"project_id":{"type":"string","description":"The ID of the project that the deployment belongs to."},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","organization_id","project_id","user_id","openapiv3_assets","status","packages","openapiv3_tool_count","functions_tool_count","external_mcp_tool_count"]},"DeploymentExternalMCP":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment external MCP record."},"name":{"type":"string","description":"The display name for the external MCP server."},"registry_id":{"type":"string","description":"The ID of the MCP registry the server is from."},"registry_server_specifier":{"type":"string","description":"The canonical server name used to look up the server in the registry."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","registry_id","name","slug","registry_server_specifier"]},"DeploymentFunctions":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"id":{"type":"string","description":"The ID of the deployment asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"runtime":{"type":"string","description":"The runtime to use when executing functions."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","asset_id","name","slug","runtime"]},"DeploymentLogEvent":{"type":"object","properties":{"attachment_id":{"type":"string","description":"The ID of the asset tied to the log event"},"attachment_type":{"type":"string","description":"The type of the asset tied to the log event"},"created_at":{"type":"string","description":"The creation date of the log event"},"event":{"type":"string","description":"The type of event that occurred"},"id":{"type":"string","description":"The ID of the log event"},"message":{"type":"string","description":"The message of the log event"}},"required":["id","created_at","event","message"]},"DeploymentPackage":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment package."},"name":{"type":"string","description":"The name of the package."},"version":{"type":"string","description":"The version of the package."}},"required":["id","name","version"]},"DeploymentSummary":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_mcp_asset_count":{"type":"integer","description":"The number of external MCP server assets.","format":"int64"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"functions_asset_count":{"type":"integer","description":"The number of Functions assets.","format":"int64"},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"openapiv3_asset_count":{"type":"integer","description":"The number of upstream OpenAPI assets.","format":"int64"},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","user_id","status","openapiv3_asset_count","openapiv3_tool_count","functions_asset_count","functions_tool_count","external_mcp_asset_count","external_mcp_tool_count"]},"Environment":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the environment","format":"date-time"},"description":{"type":"string","description":"The description of the environment"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntry"},"description":"List of environment entries"},"id":{"type":"string","description":"The ID of the environment"},"name":{"type":"string","description":"The name of the environment"},"organization_id":{"type":"string","description":"The organization ID this environment belongs to"},"project_id":{"type":"string","description":"The project ID this environment belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the environment was last updated","format":"date-time"}},"description":"Model representing an environment","required":["id","organization_id","project_id","name","slug","entries","created_at","updated_at"]},"EnvironmentEntry":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the environment entry","format":"date-time"},"name":{"type":"string","description":"The name of the environment variable"},"updated_at":{"type":"string","description":"When the environment entry was last updated","format":"date-time"},"value":{"type":"string","description":"Redacted values of the environment variable"},"value_hash":{"type":"string","description":"Hash of the value to identify matching values across environments without exposing the actual value"}},"description":"A single environment entry","required":["name","value","value_hash","created_at","updated_at"]},"EnvironmentEntryInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the environment variable"},"value":{"type":"string","description":"The value of the environment variable"}},"description":"A single environment entry","required":["name","value"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"description":"unauthorized access","required":["name","id","message","temporary","timeout","fault"]},"EvolveForm":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The ID of the deployment to evolve. If omitted, the latest deployment will be used."},"exclude_external_mcps":{"type":"array","items":{"type":"string"},"description":"The external MCP servers, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_functions":{"type":"array","items":{"type":"string"},"description":"The functions, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_openapiv3_assets":{"type":"array","items":{"type":"string"},"description":"The OpenAPI 3.x documents, identified by slug, to exclude from the new deployment when cloning a previous deployment."},"exclude_packages":{"type":"array","items":{"type":"string"},"description":"The packages to exclude from the new deployment when cloning a previous deployment."},"non_blocking":{"type":"boolean","description":"If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.","example":false},"upsert_external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/AddExternalMCPForm"},"description":"The external MCP servers to upsert in the new deployment."},"upsert_functions":{"type":"array","items":{"$ref":"#/components/schemas/AddFunctionsForm"},"description":"The tool functions to upsert in the new deployment."},"upsert_openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/AddOpenAPIv3DeploymentAssetForm"},"description":"The OpenAPI 3.x documents to upsert in the new deployment."},"upsert_packages":{"type":"array","items":{"$ref":"#/components/schemas/AddPackageForm"},"description":"The packages to upsert in the new deployment."}}},"EvolveResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"ExportMcpMetadataRequestBody":{"type":"object","properties":{"mcp_slug":{"type":"string","description":"The MCP server slug (from the install URL)","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["mcp_slug"]},"ExternalMCPHeaderDefinition":{"type":"object","properties":{"description":{"type":"string","description":"Description of the header"},"header_name":{"type":"string","description":"The actual HTTP header name to send (e.g., X-Api-Key)"},"name":{"type":"string","description":"The prefixed environment variable name (e.g., SLACK_X_API_KEY)"},"placeholder":{"type":"string","description":"Placeholder value for the header"},"required":{"type":"boolean","description":"Whether the header is required"},"secret":{"type":"boolean","description":"Whether the header value is secret"}},"required":["name","header_name","required","secret"]},"ExternalMCPServer":{"type":"object","properties":{"description":{"type":"string","description":"Description of what the server does"},"icon_url":{"type":"string","description":"URL to the server's icon","format":"uri"},"meta":{"description":"Opaque metadata from the registry"},"registry_id":{"type":"string","description":"ID of the registry this server came from","format":"uuid"},"registry_specifier":{"type":"string","description":"Server specifier used to look up in the registry (e.g., 'io.github.user/server')","example":"io.modelcontextprotocol.anonymous/exa"},"title":{"type":"string","description":"Display name for the server"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPTool"},"description":"Tools available on the server"},"version":{"type":"string","description":"Semantic version of the server","example":"1.0.0"}},"description":"An MCP server from an external registry","required":["registry_specifier","version","description","registry_id"]},"ExternalMCPTool":{"type":"object","properties":{"annotations":{"description":"Annotations for the tool"},"description":{"type":"string","description":"Description of the tool"},"input_schema":{"description":"Input schema for the tool"},"name":{"type":"string","description":"Name of the tool"}}},"ExternalMCPToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"deployment_external_mcp_id":{"type":"string","description":"The ID of the deployments_external_mcps record"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"oauth_authorization_endpoint":{"type":"string","description":"The OAuth authorization endpoint URL"},"oauth_registration_endpoint":{"type":"string","description":"The OAuth dynamic client registration endpoint URL"},"oauth_scopes_supported":{"type":"array","items":{"type":"string"},"description":"The OAuth scopes supported by the server"},"oauth_token_endpoint":{"type":"string","description":"The OAuth token endpoint URL"},"oauth_version":{"type":"string","description":"OAuth version: '2.1' (MCP OAuth), '2.0' (legacy), or 'none'"},"project_id":{"type":"string","description":"The ID of the project"},"registry_id":{"type":"string","description":"The ID of the MCP registry"},"registry_server_name":{"type":"string","description":"The name of the external MCP server (e.g., exa)"},"registry_specifier":{"type":"string","description":"The specifier of the external MCP server (e.g., 'io.modelcontextprotocol.anonymous/exa')"},"remote_url":{"type":"string","description":"The URL to connect to the MCP server"},"requires_oauth":{"type":"boolean","description":"Whether the external MCP server requires OAuth authentication"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"slug":{"type":"string","description":"The slug used for tool prefixing (e.g., github)"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"transport_type":{"type":"string","description":"The transport type used to connect to the MCP server","enum":["streamable-http","sse"]},"type":{"type":"string","description":"Whether or not the tool is a proxy tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A proxy tool that references an external MCP server","required":["deployment_external_mcp_id","deployment_id","registry_specifier","registry_server_name","registry_id","slug","remote_url","transport_type","requires_oauth","oauth_version","created_at","updated_at","id","project_id","name","canonical_name","description","schema","tool_urn"]},"ExternalOAuthServer":{"type":"object","properties":{"created_at":{"type":"string","description":"When the external OAuth server was created.","format":"date-time"},"id":{"type":"string","description":"The ID of the external OAuth server"},"metadata":{"description":"The metadata for the external OAuth server"},"project_id":{"type":"string","description":"The project ID this external OAuth server belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the external OAuth server was last updated.","format":"date-time"}},"required":["id","project_id","slug","metadata","created_at","updated_at"]},"ExternalOAuthServerForm":{"type":"object","properties":{"metadata":{"description":"The metadata for the external OAuth server"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug","metadata"]},"FetchOpenAPIv3FromURLForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"url":{"type":"string","description":"The URL to fetch the OpenAPI document from"}},"required":["url"]},"FetchOpenAPIv3FromURLForm2":{"type":"object","properties":{"url":{"type":"string","description":"The URL to fetch the OpenAPI document from"}},"required":["url"]},"FilterOption":{"type":"object","properties":{"count":{"type":"integer","description":"Number of events for this option","format":"int64"},"id":{"type":"string","description":"Unique identifier for the option"},"label":{"type":"string","description":"Display label for the option"}},"description":"A single filter option (API key or user)","required":["id","label","count"]},"FunctionEnvironmentVariable":{"type":"object","properties":{"auth_input_type":{"type":"string","description":"Optional value of the function variable comes from a specific auth input"},"description":{"type":"string","description":"Description of the function environment variable"},"name":{"type":"string","description":"The environment variables"}},"required":["name"]},"FunctionResourceDefinition":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the resource.","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the resource"},"function_id":{"type":"string","description":"The ID of the function"},"id":{"type":"string","description":"The ID of the resource"},"meta":{"type":"object","description":"Meta tags for the tool","additionalProperties":true},"mime_type":{"type":"string","description":"Optional MIME type of the resource"},"name":{"type":"string","description":"The name of the resource"},"project_id":{"type":"string","description":"The ID of the project"},"resource_urn":{"type":"string","description":"The URN of this resource"},"runtime":{"type":"string","description":"Runtime environment (e.g., nodejs:24, python:3.12)"},"title":{"type":"string","description":"Optional title for the resource"},"updated_at":{"type":"string","description":"The last update date of the resource.","format":"date-time"},"uri":{"type":"string","description":"The URI of the resource"},"variables":{"description":"Variables configuration for the resource"}},"description":"A function resource","required":["deployment_id","function_id","runtime","id","project_id","name","description","uri","resource_urn","created_at","updated_at"]},"FunctionToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"asset_id":{"type":"string","description":"The ID of the asset"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"function_id":{"type":"string","description":"The ID of the function"},"id":{"type":"string","description":"The ID of the tool"},"meta":{"type":"object","description":"Meta tags for the tool","additionalProperties":true},"name":{"type":"string","description":"The name of the tool"},"project_id":{"type":"string","description":"The ID of the project"},"runtime":{"type":"string","description":"Runtime environment (e.g., nodejs:24, python:3.12)"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variables":{"description":"Variables configuration for the function"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A function tool","required":["deployment_id","asset_id","function_id","runtime","id","project_id","name","canonical_name","description","schema","tool_urn","created_at","updated_at"]},"GenerateTitleResponseBody":{"type":"object","properties":{"title":{"type":"string","description":"The generated title"}},"required":["title"]},"GetActiveDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"GetDeploymentForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deployment"}},"required":["id"]},"GetDeploymentLogsForm":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor to fetch results from"},"deployment_id":{"type":"string","description":"The ID of the deployment"}},"required":["deployment_id"]},"GetDeploymentLogsResult":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentLogEvent"},"description":"The logs for the deployment"},"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"status":{"type":"string","description":"The status of the deployment"}},"required":["events","status"]},"GetDeploymentResult":{"type":"object","properties":{"cloned_from":{"type":"string","description":"The ID of the deployment that this deployment was cloned from.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"created_at":{"type":"string","description":"The creation date of the deployment.","format":"date-time"},"external_id":{"type":"string","description":"The external ID to refer to the deployment. This can be a git commit hash for example.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"external_mcp_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from external MCP servers.","format":"int64"},"external_mcps":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentExternalMCP"},"description":"The external MCP servers that were deployed."},"external_url":{"type":"string","description":"The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request."},"functions_assets":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentFunctions"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"functions_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from Functions.","format":"int64"},"github_pr":{"type":"string","description":"The github pull request that resulted in the deployment.","example":"1234"},"github_repo":{"type":"string","description":"The github repository in the form of \"owner/repo\".","example":"speakeasyapi/gram"},"github_sha":{"type":"string","description":"The commit hash that triggered the deployment.","example":"f33e693e9e12552043bc0ec5c37f1b8a9e076161"},"id":{"type":"string","description":"The ID to of the deployment.","example":"bc5f4a555e933e6861d12edba4c2d87ef6caf8e6"},"idempotency_key":{"type":"string","description":"A unique identifier that will mitigate against duplicate deployments.","example":"01jqq0ajmb4qh9eppz48dejr2m"},"openapiv3_assets":{"type":"array","items":{"$ref":"#/components/schemas/OpenAPIv3DeploymentAsset"},"description":"The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions."},"openapiv3_tool_count":{"type":"integer","description":"The number of tools in the deployment generated from OpenAPI documents.","format":"int64"},"organization_id":{"type":"string","description":"The ID of the organization that the deployment belongs to."},"packages":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentPackage"},"description":"The packages that were deployed."},"project_id":{"type":"string","description":"The ID of the project that the deployment belongs to."},"status":{"type":"string","description":"The status of the deployment."},"user_id":{"type":"string","description":"The ID of the user that created the deployment."}},"required":["id","created_at","organization_id","project_id","user_id","openapiv3_assets","status","packages","openapiv3_tool_count","functions_tool_count","external_mcp_tool_count"]},"GetInstanceForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"},"toolset_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug"]},"GetInstanceResult":{"type":"object","properties":{"description":{"type":"string","description":"The description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"mcp_servers":{"type":"array","items":{"$ref":"#/components/schemas/InstanceMcpServer"},"description":"The MCP servers that are relevant to the toolset"},"name":{"type":"string","description":"The name of the toolset"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The list of prompt templates"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The list of tools"}},"required":["name","tools","mcp_servers"]},"GetIntegrationForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the integration to get (refers to a package id)."},"name":{"type":"string","description":"The name of the integration to get (refers to a package name)."}},"description":"Get a third-party integration by ID or name."},"GetIntegrationResult":{"type":"object","properties":{"integration":{"$ref":"#/components/schemas/Integration"}}},"GetLatestDeploymentResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"GetMcpMetadataResponseBody":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/McpMetadata"}}},"GetMetricsSummaryResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"metrics":{"$ref":"#/components/schemas/ProjectSummary"}},"description":"Result of metrics summary query","required":["metrics","enabled"]},"GetObservabilityOverviewPayload":{"type":"object","properties":{"api_key_id":{"type":"string","description":"Optional API key ID filter"},"external_user_id":{"type":"string","description":"Optional external user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"include_time_series":{"type":"boolean","description":"Whether to include time series data (default: true)","default":true},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"},"toolset_id":{"type":"string","description":"Optional toolset/MCP server ID filter"}},"description":"Payload for getting observability overview metrics","required":["from","to"]},"GetObservabilityOverviewResult":{"type":"object","properties":{"comparison":{"$ref":"#/components/schemas/ObservabilitySummary"},"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"interval_seconds":{"type":"integer","description":"The time bucket interval in seconds used for the time series data","format":"int64"},"summary":{"$ref":"#/components/schemas/ObservabilitySummary"},"time_series":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesBucket"},"description":"Time series data points"},"top_tools_by_count":{"type":"array","items":{"$ref":"#/components/schemas/ToolMetric"},"description":"Top tools by call count"},"top_tools_by_failure_rate":{"type":"array","items":{"$ref":"#/components/schemas/ToolMetric"},"description":"Top tools by failure rate"}},"description":"Result of observability overview query","required":["summary","comparison","time_series","top_tools_by_count","top_tools_by_failure_rate","interval_seconds","enabled"]},"GetProjectForm":{"type":"object","properties":{"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["slug"]},"GetProjectMetricsSummaryPayload":{"type":"object","properties":{"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for getting project-level metrics summary","required":["from","to"]},"GetProjectResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"GetPromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"GetSignedAssetURLForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the function asset"}},"required":["asset_id"]},"GetSignedAssetURLResult":{"type":"object","properties":{"url":{"type":"string","description":"The signed URL to access the asset"}},"required":["url"]},"GetSlackConnectionResult":{"type":"object","properties":{"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"default_toolset_slug":{"type":"string","description":"The default toolset slug for this Slack connection"},"slack_team_id":{"type":"string","description":"The ID of the connected Slack team"},"slack_team_name":{"type":"string","description":"The name of the connected Slack team"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"}},"required":["slack_team_name","slack_team_id","default_toolset_slug","created_at","updated_at"]},"GetUserMetricsSummaryPayload":{"type":"object","properties":{"external_user_id":{"type":"string","description":"External user ID to get metrics for (mutually exclusive with user_id)"},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"},"user_id":{"type":"string","description":"User ID to get metrics for (mutually exclusive with external_user_id)"}},"description":"Payload for getting user-level metrics summary","required":["from","to"]},"GetUserMetricsSummaryResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"metrics":{"$ref":"#/components/schemas/ProjectSummary"}},"description":"Result of user metrics summary query","required":["metrics","enabled"]},"HTTPToolDefinition":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"asset_id":{"type":"string","description":"The ID of the asset"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"default_server_url":{"type":"string","description":"The default server URL for the tool"},"deployment_id":{"type":"string","description":"The ID of the deployment"},"description":{"type":"string","description":"Description of the tool"},"http_method":{"type":"string","description":"HTTP method for the request"},"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"openapiv3_document_id":{"type":"string","description":"The ID of the OpenAPI v3 document"},"openapiv3_operation":{"type":"string","description":"OpenAPI v3 operation"},"package_name":{"type":"string","description":"The name of the source package"},"path":{"type":"string","description":"Path for the request"},"project_id":{"type":"string","description":"The ID of the project"},"response_filter":{"$ref":"#/components/schemas/ResponseFilter"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"security":{"type":"string","description":"Security requirements for the underlying HTTP endpoint"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"summary":{"type":"string","description":"Summary of the tool"},"tags":{"type":"array","items":{"type":"string"},"description":"The tags list for this http tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"An HTTP tool","required":["summary","tags","http_method","path","schema","deployment_id","asset_id","id","project_id","name","canonical_name","description","tool_urn","created_at","updated_at"]},"HookResult":{"type":"object","properties":{"ok":{"type":"boolean","description":"Whether the hook was received successfully"}},"required":["ok"]},"InfoResponseBody":{"type":"object","properties":{"active_organization_id":{"type":"string"},"gram_account_type":{"type":"string"},"is_admin":{"type":"boolean"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationEntry"}},"user_display_name":{"type":"string"},"user_email":{"type":"string"},"user_id":{"type":"string"},"user_photo_url":{"type":"string"},"user_signature":{"type":"string"}},"required":["user_id","user_email","is_admin","active_organization_id","organizations","gram_account_type"]},"InstanceMcpServer":{"type":"object","properties":{"url":{"type":"string","description":"The address of the MCP server"}},"required":["url"]},"Integration":{"type":"object","properties":{"package_description":{"type":"string"},"package_description_raw":{"type":"string"},"package_id":{"type":"string"},"package_image_asset_id":{"type":"string"},"package_keywords":{"type":"array","items":{"type":"string"}},"package_name":{"type":"string"},"package_summary":{"type":"string"},"package_title":{"type":"string"},"package_url":{"type":"string"},"tool_names":{"type":"array","items":{"type":"string"}},"version":{"type":"string","description":"The latest version of the integration"},"version_created_at":{"type":"string","format":"date-time"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationVersion"}}},"required":["package_id","package_name","package_title","package_summary","version","version_created_at","tool_names"]},"IntegrationEntry":{"type":"object","properties":{"package_id":{"type":"string"},"package_image_asset_id":{"type":"string"},"package_keywords":{"type":"array","items":{"type":"string"}},"package_name":{"type":"string"},"package_summary":{"type":"string"},"package_title":{"type":"string"},"package_url":{"type":"string"},"tool_names":{"type":"array","items":{"type":"string"}},"version":{"type":"string"},"version_created_at":{"type":"string","format":"date-time"}},"required":["package_id","package_name","version","version_created_at","tool_names"]},"IntegrationVersion":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"version":{"type":"string"}},"required":["version","created_at"]},"Key":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the key.","format":"date-time"},"created_by_user_id":{"type":"string","description":"The ID of the user who created this key"},"id":{"type":"string","description":"The ID of the key"},"key":{"type":"string","description":"The token of the api key (only returned on key creation)"},"key_prefix":{"type":"string","description":"The store prefix of the api key for recognition"},"last_accessed_at":{"type":"string","description":"When the key was last accessed.","format":"date-time"},"name":{"type":"string","description":"The name of the key"},"organization_id":{"type":"string","description":"The organization ID this key belongs to"},"project_id":{"type":"string","description":"The optional project ID this key is scoped to"},"scopes":{"type":"array","items":{"type":"string"},"description":"List of permission scopes for this key"},"updated_at":{"type":"string","description":"When the key was last updated.","format":"date-time"}},"required":["id","organization_id","created_by_user_id","name","key_prefix","scopes","created_at","updated_at"]},"ListAllowedOriginsResult":{"type":"object","properties":{"allowed_origins":{"type":"array","items":{"$ref":"#/components/schemas/AllowedOrigin"},"description":"The list of allowed origins"}},"required":["allowed_origins"]},"ListAssetsResult":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"},"description":"The list of assets"}},"required":["assets"]},"ListAttributeKeysPayload":{"type":"object","properties":{"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for listing distinct attribute keys available for filtering","required":["from","to"]},"ListAttributeKeysResult":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"description":"Distinct attribute keys. User attributes are prefixed with @"}},"description":"Result of listing distinct attribute keys","required":["keys"]},"ListCatalogResponseBody":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Pagination cursor for the next page"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPServer"},"description":"List of available MCP servers"}},"required":["servers"]},"ListChatsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatOverview"},"description":"The list of chats"}},"required":["chats"]},"ListChatsWithResolutionsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatOverviewWithResolutions"},"description":"List of chats with resolutions"},"total":{"type":"integer","description":"Total number of chats (before pagination)","format":"int64"}},"description":"Result of listing chats with resolutions","required":["chats","total"]},"ListDeploymentForm":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor to fetch results from"}}},"ListDeploymentResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentSummary"},"description":"A list of deployments"},"next_cursor":{"type":"string","description":"The cursor to fetch results from","example":"01jp3f054qc02gbcmpp0qmyzed"}},"required":["items"]},"ListEnvironmentsResult":{"type":"object","properties":{"environments":{"type":"array","items":{"$ref":"#/components/schemas/Environment"}}},"description":"Result type for listing environments","required":["environments"]},"ListFilterOptionsPayload":{"type":"object","properties":{"filter_type":{"type":"string","description":"Type of filter to list options for","enum":["api_key","user"]},"from":{"type":"string","description":"Start time in ISO 8601 format","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Payload for listing filter options","required":["from","to","filter_type"]},"ListFilterOptionsResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"options":{"type":"array","items":{"$ref":"#/components/schemas/FilterOption"},"description":"List of filter options"}},"description":"Result of listing filter options","required":["options","enabled"]},"ListIntegrationsForm":{"type":"object","properties":{"keywords":{"type":"array","items":{"type":"string","maxLength":20},"description":"Keywords to filter integrations by"}}},"ListIntegrationsResult":{"type":"object","properties":{"integrations":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEntry"},"description":"List of available third-party integrations"}}},"ListKeysResult":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/Key"}}},"required":["keys"]},"ListPackagesResult":{"type":"object","properties":{"packages":{"type":"array","items":{"$ref":"#/components/schemas/Package"},"description":"The list of packages"}},"required":["packages"]},"ListProjectsPayload":{"type":"object","properties":{"apikey_token":{"type":"string"},"organization_id":{"type":"string","description":"The ID of the organization to list projects for"},"session_token":{"type":"string"}},"required":["organization_id"]},"ListProjectsResult":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEntry"},"description":"The list of projects"}},"required":["projects"]},"ListPromptTemplatesResult":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The created prompt template"}},"required":["templates"]},"ListResourcesResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resource"},"description":"The list of resources"}},"required":["resources"]},"ListToolsResult":{"type":"object","properties":{"next_cursor":{"type":"string","description":"The cursor to fetch results from"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The list of tools (polymorphic union of HTTP tools and prompt templates)"}},"required":["tools"]},"ListToolsetsResult":{"type":"object","properties":{"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/ToolsetEntry"},"description":"The list of toolsets"}},"required":["toolsets"]},"ListVariationsResult":{"type":"object","properties":{"variations":{"type":"array","items":{"$ref":"#/components/schemas/ToolVariation"}}},"required":["variations"]},"ListVersionsForm":{"type":"object","properties":{"name":{"type":"string","description":"The name of the package"}},"required":["name"]},"ListVersionsResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/PackageVersion"}}},"required":["package","versions"]},"McpEnvironmentConfig":{"type":"object","properties":{"created_at":{"type":"string","description":"When the config was created","format":"date-time"},"header_display_name":{"type":"string","description":"Custom display name for the variable in MCP headers"},"id":{"type":"string","description":"The ID of the environment config"},"provided_by":{"type":"string","description":"How the variable is provided: 'user', 'system', or 'none'"},"updated_at":{"type":"string","description":"When the config was last updated","format":"date-time"},"variable_name":{"type":"string","description":"The name of the environment variable"}},"description":"Represents an environment variable configured for an MCP server.","required":["id","variable_name","provided_by","created_at","updated_at"]},"McpEnvironmentConfigInput":{"type":"object","properties":{"header_display_name":{"type":"string","description":"Custom display name for the variable in MCP headers"},"provided_by":{"type":"string","description":"How the variable is provided: 'user', 'system', or 'none'"},"variable_name":{"type":"string","description":"The name of the environment variable"}},"description":"Input for configuring an environment variable for an MCP server.","required":["variable_name","provided_by"]},"McpExport":{"type":"object","properties":{"authentication":{"$ref":"#/components/schemas/McpExportAuthentication"},"description":{"type":"string","description":"Description of the MCP server"},"documentation_url":{"type":"string","description":"Link to external documentation"},"instructions":{"type":"string","description":"Server instructions for users"},"logo_url":{"type":"string","description":"URL to the server logo"},"name":{"type":"string","description":"The MCP server name"},"server_url":{"type":"string","description":"The MCP server URL"},"slug":{"type":"string","description":"The MCP server slug"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/McpExportTool"},"description":"Available tools on this MCP server"}},"description":"Complete MCP server export for documentation and integration","required":["name","slug","server_url","tools","authentication"]},"McpExportAuthHeader":{"type":"object","properties":{"display_name":{"type":"string","description":"User-friendly display name (e.g., API Key)"},"name":{"type":"string","description":"The HTTP header name (e.g., Authorization)"}},"description":"An authentication header required by the MCP server","required":["name","display_name"]},"McpExportAuthentication":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/McpExportAuthHeader"},"description":"Required authentication headers"},"required":{"type":"boolean","description":"Whether authentication is required"}},"description":"Authentication requirements for the MCP server","required":["required","headers"]},"McpExportTool":{"type":"object","properties":{"description":{"type":"string","description":"Description of what the tool does"},"input_schema":{"description":"JSON Schema for the tool's input parameters"},"name":{"type":"string","description":"The tool name"}},"description":"A tool definition in the MCP export","required":["name","description","input_schema"]},"McpMetadata":{"type":"object","properties":{"created_at":{"type":"string","description":"When the metadata entry was created","format":"date-time"},"default_environment_id":{"type":"string","description":"The default environment to load variables from","format":"uuid"},"environment_configs":{"type":"array","items":{"$ref":"#/components/schemas/McpEnvironmentConfig"},"description":"The list of environment variables configured for this MCP"},"external_documentation_text":{"type":"string","description":"A blob of text for the button on the MCP server page"},"external_documentation_url":{"type":"string","description":"A link to external documentation for the MCP install page","format":"uri"},"id":{"type":"string","description":"The ID of the metadata record"},"installation_override_url":{"type":"string","description":"URL to redirect to instead of showing the default installation page","format":"uri"},"instructions":{"type":"string","description":"Server instructions returned in the MCP initialize response"},"logo_asset_id":{"type":"string","description":"The asset ID for the MCP install page logo","format":"uuid"},"toolset_id":{"type":"string","description":"The toolset associated with this install page metadata","format":"uuid"},"updated_at":{"type":"string","description":"When the metadata entry was last updated","format":"date-time"}},"description":"Metadata used to configure the MCP install page.","required":["id","toolset_id","created_at","updated_at"]},"ModelUsage":{"type":"object","properties":{"count":{"type":"integer","description":"Number of times used","format":"int64"},"name":{"type":"string","description":"Model name"}},"description":"Model usage statistics","required":["name","count"]},"NotModified":{"type":"object","properties":{"location":{"type":"string"}},"required":["location"]},"OAuthEnablementMetadata":{"type":"object","properties":{"oauth2_security_count":{"type":"integer","description":"Count of security variables that are OAuth2 supported","format":"int64"}},"required":["oauth2_security_count"]},"OAuthProxyProvider":{"type":"object","properties":{"authorization_endpoint":{"type":"string","description":"The authorization endpoint URL"},"created_at":{"type":"string","description":"When the OAuth proxy provider was created.","format":"date-time"},"environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"grant_types_supported":{"type":"array","items":{"type":"string"},"description":"The grant types supported by this provider"},"id":{"type":"string","description":"The ID of the OAuth proxy provider"},"provider_type":{"type":"string","description":"The type of OAuth provider","enum":["custom","gram"]},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"The OAuth scopes supported by this provider"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"token_endpoint":{"type":"string","description":"The token endpoint URL"},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"The token endpoint auth methods supported by this provider"},"updated_at":{"type":"string","description":"When the OAuth proxy provider was last updated.","format":"date-time"}},"required":["id","slug","provider_type","authorization_endpoint","token_endpoint","created_at","updated_at"]},"OAuthProxyServer":{"type":"object","properties":{"audience":{"type":"string","description":"The audience parameter to send to the upstream OAuth provider"},"created_at":{"type":"string","description":"When the OAuth proxy server was created.","format":"date-time"},"id":{"type":"string","description":"The ID of the OAuth proxy server"},"oauth_proxy_providers":{"type":"array","items":{"$ref":"#/components/schemas/OAuthProxyProvider"},"description":"The OAuth proxy providers for this server"},"project_id":{"type":"string","description":"The project ID this OAuth proxy server belongs to"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"When the OAuth proxy server was last updated.","format":"date-time"}},"required":["id","project_id","slug","created_at","updated_at"]},"OAuthProxyServerForm":{"type":"object","properties":{"audience":{"type":"string","description":"The audience parameter to send to the upstream OAuth provider"},"authorization_endpoint":{"type":"string","description":"The authorization endpoint URL"},"environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"provider_type":{"type":"string","description":"The type of OAuth provider","enum":["custom","gram"]},"scopes_supported":{"type":"array","items":{"type":"string"},"description":"OAuth scopes to request"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"token_endpoint":{"type":"string","description":"The token endpoint URL"},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"},"description":"Auth methods (client_secret_basic or client_secret_post)"}},"required":["slug","provider_type"]},"ObservabilitySummary":{"type":"object","properties":{"avg_latency_ms":{"type":"number","description":"Average tool latency in milliseconds","format":"double"},"avg_resolution_time_ms":{"type":"number","description":"Average time to resolution in milliseconds","format":"double"},"avg_session_duration_ms":{"type":"number","description":"Average session duration in milliseconds","format":"double"},"failed_chats":{"type":"integer","description":"Number of failed chat sessions","format":"int64"},"failed_tool_calls":{"type":"integer","description":"Number of failed tool calls","format":"int64"},"resolved_chats":{"type":"integer","description":"Number of resolved chat sessions","format":"int64"},"total_chats":{"type":"integer","description":"Total number of chat sessions","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Aggregated summary metrics for a time period","required":["total_chats","resolved_chats","failed_chats","avg_session_duration_ms","avg_resolution_time_ms","total_tool_calls","failed_tool_calls","avg_latency_ms"]},"OpenAPIv3DeploymentAsset":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the uploaded asset."},"id":{"type":"string","description":"The ID of the deployment asset."},"name":{"type":"string","description":"The name to give the document as it will be displayed in UIs."},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","asset_id","name","slug"]},"OrganizationEntry":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projects":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEntry"}},"slug":{"type":"string"},"sso_connection_id":{"type":"string"},"user_workspace_slugs":{"type":"array","items":{"type":"string"}}},"required":["id","name","slug","projects"]},"Package":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the package","format":"date-time"},"deleted_at":{"type":"string","description":"The deletion date of the package","format":"date-time"},"description":{"type":"string","description":"The description of the package. This contains HTML content."},"description_raw":{"type":"string","description":"The unsanitized, user-supplied description of the package. Limited markdown syntax is supported."},"id":{"type":"string","description":"The ID of the package"},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package"},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package"},"latest_version":{"type":"string","description":"The latest version of the package"},"name":{"type":"string","description":"The name of the package"},"organization_id":{"type":"string","description":"The ID of the organization that owns the package"},"project_id":{"type":"string","description":"The ID of the project that owns the package"},"summary":{"type":"string","description":"The summary of the package"},"title":{"type":"string","description":"The title of the package"},"updated_at":{"type":"string","description":"The last update date of the package","format":"date-time"},"url":{"type":"string","description":"External URL for the package owner"}},"required":["id","name","project_id","organization_id","created_at","updated_at"]},"PackageVersion":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the package version","format":"date-time"},"deployment_id":{"type":"string","description":"The ID of the deployment that the version belongs to"},"id":{"type":"string","description":"The ID of the package version"},"package_id":{"type":"string","description":"The ID of the package that the version belongs to"},"semver":{"type":"string","description":"The semantic version value"},"visibility":{"type":"string","description":"The visibility of the package version"}},"required":["id","package_id","deployment_id","visibility","semver","created_at"]},"PeriodUsage":{"type":"object","properties":{"actual_enabled_server_count":{"type":"integer","description":"The number of servers enabled at the time of the request","format":"int64"},"credits":{"type":"integer","description":"The number of credits used","format":"int64"},"has_active_subscription":{"type":"boolean","description":"Whether the project has an active subscription"},"included_credits":{"type":"integer","description":"The number of credits included in the tier","format":"int64"},"included_servers":{"type":"integer","description":"The number of servers included in the tier","format":"int64"},"included_tool_calls":{"type":"integer","description":"The number of tool calls included in the tier","format":"int64"},"servers":{"type":"integer","description":"The number of servers used, according to the Polar meter","format":"int64"},"tool_calls":{"type":"integer","description":"The number of tool calls used","format":"int64"}},"required":["tool_calls","included_tool_calls","servers","included_servers","actual_enabled_server_count","credits","included_credits","has_active_subscription"]},"PostToolUseFailurePayload":{"type":"object","properties":{"tool_error":{"description":"The error from the tool"},"tool_input":{"description":"The input to the tool"},"tool_name":{"type":"string","description":"The name of the tool that failed"}},"required":["tool_name"]},"PostToolUsePayload":{"type":"object","properties":{"tool_input":{"description":"The input to the tool"},"tool_name":{"type":"string","description":"The name of the tool that was invoked"},"tool_response":{"description":"The response from the tool"}},"required":["tool_name"]},"PreToolUsePayload":{"type":"object","properties":{"tool_input":{"description":"The input to the tool"},"tool_name":{"type":"string","description":"The name of the tool being invoked"}},"required":["tool_name"]},"Project":{"type":"object","properties":{"created_at":{"type":"string","description":"The creation date of the project.","format":"date-time"},"id":{"type":"string","description":"The ID of the project"},"logo_asset_id":{"type":"string","description":"The ID of the logo asset for the project"},"name":{"type":"string","description":"The name of the project"},"organization_id":{"type":"string","description":"The ID of the organization that owns the project"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"updated_at":{"type":"string","description":"The last update date of the project.","format":"date-time"}},"required":["id","name","slug","organization_id","created_at","updated_at"]},"ProjectEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the project"},"name":{"type":"string","description":"The name of the project"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","name","slug"]},"ProjectSummary":{"type":"object","properties":{"avg_chat_duration_ms":{"type":"number","description":"Average chat request duration in milliseconds","format":"double"},"avg_chat_resolution_score":{"type":"number","description":"Average chat resolution score (0-100)","format":"double"},"avg_tokens_per_request":{"type":"number","description":"Average tokens per chat request","format":"double"},"avg_tool_duration_ms":{"type":"number","description":"Average tool call duration in milliseconds","format":"double"},"chat_resolution_abandoned":{"type":"integer","description":"Chats abandoned by user","format":"int64"},"chat_resolution_failure":{"type":"integer","description":"Chats that failed to resolve","format":"int64"},"chat_resolution_partial":{"type":"integer","description":"Chats partially resolved","format":"int64"},"chat_resolution_success":{"type":"integer","description":"Chats resolved successfully","format":"int64"},"distinct_models":{"type":"integer","description":"Number of distinct models used (project scope only)","format":"int64"},"distinct_providers":{"type":"integer","description":"Number of distinct providers used (project scope only)","format":"int64"},"finish_reason_stop":{"type":"integer","description":"Requests that completed naturally","format":"int64"},"finish_reason_tool_calls":{"type":"integer","description":"Requests that resulted in tool calls","format":"int64"},"first_seen_unix_nano":{"type":"string","description":"Earliest activity timestamp in Unix nanoseconds"},"last_seen_unix_nano":{"type":"string","description":"Latest activity timestamp in Unix nanoseconds"},"models":{"type":"array","items":{"$ref":"#/components/schemas/ModelUsage"},"description":"List of models used with call counts"},"tool_call_failure":{"type":"integer","description":"Failed tool calls (4xx/5xx status)","format":"int64"},"tool_call_success":{"type":"integer","description":"Successful tool calls (2xx status)","format":"int64"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolUsage"},"description":"List of tools used with success/failure counts"},"total_chat_requests":{"type":"integer","description":"Total number of chat requests","format":"int64"},"total_chats":{"type":"integer","description":"Number of unique chat sessions (project scope only)","format":"int64"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens used","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"}},"description":"Aggregated metrics","required":["first_seen_unix_nano","last_seen_unix_nano","total_input_tokens","total_output_tokens","total_tokens","avg_tokens_per_request","total_chat_requests","avg_chat_duration_ms","finish_reason_stop","finish_reason_tool_calls","total_tool_calls","tool_call_success","tool_call_failure","avg_tool_duration_ms","chat_resolution_success","chat_resolution_failure","chat_resolution_partial","chat_resolution_abandoned","avg_chat_resolution_score","total_chats","distinct_models","distinct_providers","models","tools"]},"PromptTemplate":{"type":"object","properties":{"annotations":{"$ref":"#/components/schemas/ToolAnnotations"},"canonical":{"$ref":"#/components/schemas/CanonicalToolAttributes"},"canonical_name":{"type":"string","description":"The canonical name of the tool. Will be the same as the name if there is no variation."},"confirm":{"type":"string","description":"Confirmation mode for the tool"},"confirm_prompt":{"type":"string","description":"Prompt for the confirmation"},"created_at":{"type":"string","description":"The creation date of the tool.","format":"date-time"},"description":{"type":"string","description":"Description of the tool"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"history_id":{"type":"string","description":"The revision tree ID for the prompt template"},"id":{"type":"string","description":"The ID of the tool"},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"The name of the tool"},"predecessor_id":{"type":"string","description":"The previous version of the prompt template to use as predecessor"},"project_id":{"type":"string","description":"The ID of the project"},"prompt":{"type":"string","description":"The template content"},"schema":{"type":"string","description":"JSON schema for the request"},"schema_version":{"type":"string","description":"Version of the schema"},"summarizer":{"type":"string","description":"Summarizer for the tool"},"tool_urn":{"type":"string","description":"The URN of this tool"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20},"updated_at":{"type":"string","description":"The last update date of the tool.","format":"date-time"},"variation":{"$ref":"#/components/schemas/ToolVariation"}},"description":"A prompt template","required":["id","history_id","name","prompt","engine","kind","tools_hint","tool_urn","created_at","updated_at","project_id","canonical_name","description","schema"]},"PromptTemplateEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the prompt template"},"kind":{"type":"string","description":"The kind of the prompt template"},"name":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["id","name"]},"PublishPackageForm":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The deployment ID to associate with the package version"},"name":{"type":"string","description":"The name of the package"},"version":{"type":"string","description":"The new semantic version of the package to publish"},"visibility":{"type":"string","description":"The visibility of the package version","enum":["public","private"]}},"required":["name","version","deployment_id","visibility"]},"PublishPackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"},"version":{"$ref":"#/components/schemas/PackageVersion"}},"required":["package","version"]},"RedeployRequestBody":{"type":"object","properties":{"deployment_id":{"type":"string","description":"The ID of the deployment to redeploy."}},"required":["deployment_id"]},"RedeployResult":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/Deployment"}}},"RegisterRequestBody":{"type":"object","properties":{"org_name":{"type":"string","description":"The name of the org to register"}},"required":["org_name"]},"RenderTemplateByIDRequestBody":{"type":"object","properties":{"arguments":{"type":"object","description":"The input data to render the template with","additionalProperties":true}},"required":["arguments"]},"RenderTemplateRequestBody":{"type":"object","properties":{"arguments":{"type":"object","description":"The input data to render the template with","additionalProperties":true},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"prompt":{"type":"string","description":"The template content to render"}},"required":["prompt","arguments","engine","kind"]},"RenderTemplateResult":{"type":"object","properties":{"prompt":{"type":"string","description":"The rendered prompt"}},"required":["prompt"]},"Resource":{"type":"object","properties":{"function_resource_definition":{"$ref":"#/components/schemas/FunctionResourceDefinition"}},"description":"A polymorphic resource - currently only function resources are supported"},"ResourceEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the resource"},"name":{"type":"string","description":"The name of the resource"},"resource_urn":{"type":"string","description":"The URN of the resource"},"type":{"type":"string","enum":["function"]},"uri":{"type":"string","description":"The uri of the resource"}},"required":["type","id","name","uri","resource_urn"]},"ResponseFilter":{"type":"object","properties":{"content_types":{"type":"array","items":{"type":"string"},"description":"Content types to filter for"},"status_codes":{"type":"array","items":{"type":"string"},"description":"Status codes to filter for"},"type":{"type":"string","description":"Response filter type for the tool"}},"description":"Response filter metadata for the tool","required":["type","status_codes","content_types"]},"SearchChatsFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"external_user_id":{"type":"string","description":"External user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"user_id":{"type":"string","description":"User ID filter"}},"description":"Filter criteria for searching chat sessions"},"SearchChatsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchChatsFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]}},"description":"Payload for searching chat session summaries"},"SearchChatsResult":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/ChatSummary"},"description":"List of chat session summaries"},"enabled":{"type":"boolean","description":"Whether tool metrics are enabled for the organization"},"next_cursor":{"type":"string","description":"Cursor for next page"}},"description":"Result of searching chat session summaries","required":["chats","enabled"]},"SearchLogsFilter":{"type":"object","properties":{"attribute_filters":{"type":"array","items":{"$ref":"#/components/schemas/AttributeFilter"},"description":"Filters on custom log attributes"},"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"external_user_id":{"type":"string","description":"External user ID filter"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_chat_id":{"type":"string","description":"Chat ID filter"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"gram_urns":{"type":"array","items":{"type":"string"},"description":"Gram URN filter (one or more URNs)"},"http_method":{"type":"string","description":"HTTP method filter","enum":["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]},"http_route":{"type":"string","description":"HTTP route filter"},"http_status_code":{"type":"integer","description":"HTTP status code filter","format":"int32"},"service_name":{"type":"string","description":"Service name filter"},"severity_text":{"type":"string","description":"Severity level filter","enum":["DEBUG","INFO","WARN","ERROR","FATAL"]},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"},"trace_id":{"type":"string","description":"Trace ID filter (32 hex characters)","pattern":"^[a-f0-9]{32}$"},"user_id":{"type":"string","description":"User ID filter"}},"description":"Filter criteria for searching logs"},"SearchLogsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchLogsFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]}},"description":"Payload for searching telemetry logs"},"SearchLogsResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether tool metrics are enabled for the organization"},"logs":{"type":"array","items":{"$ref":"#/components/schemas/TelemetryLogRecord"},"description":"List of telemetry log records"},"next_cursor":{"type":"string","description":"Cursor for next page"}},"description":"Result of searching telemetry logs","required":["logs","enabled"]},"SearchToolCallsFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Filter criteria for searching tool calls"},"SearchToolCallsPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination"},"filter":{"$ref":"#/components/schemas/SearchToolCallsFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]}},"description":"Payload for searching tool call summaries"},"SearchToolCallsResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether tool metrics are enabled for the organization"},"next_cursor":{"type":"string","description":"Cursor for next page"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ToolCallSummary"},"description":"List of tool call summaries"},"tool_io_logs_enabled":{"type":"boolean","description":"Whether tool input/output logging is enabled for the organization"}},"description":"Result of searching tool call summaries","required":["tool_calls","enabled","tool_io_logs_enabled"]},"SearchUsersFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Filter criteria for searching user usage summaries","required":["from","to"]},"SearchUsersPayload":{"type":"object","properties":{"cursor":{"type":"string","description":"Cursor for pagination (user identifier from last item)"},"filter":{"$ref":"#/components/schemas/SearchUsersFilter"},"limit":{"type":"integer","description":"Number of items to return (1-1000)","default":50,"format":"int64","minimum":1,"maximum":1000},"sort":{"type":"string","description":"Sort order","default":"desc","enum":["asc","desc"]},"user_type":{"type":"string","description":"Type of user identifier to group by","enum":["internal","external"]}},"description":"Payload for searching user usage summaries","required":["filter","user_type"]},"SearchUsersResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"next_cursor":{"type":"string","description":"Cursor for next page"},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserSummary"},"description":"List of user usage summaries"}},"description":"Result of searching user usage summaries","required":["users","enabled"]},"SecurityVariable":{"type":"object","properties":{"bearer_format":{"type":"string","description":"The bearer format"},"display_name":{"type":"string","description":"User-friendly display name for the security variable (defaults to name if not set)"},"env_variables":{"type":"array","items":{"type":"string"},"description":"The environment variables"},"id":{"type":"string","description":"The unique identifier of the security variable"},"in_placement":{"type":"string","description":"Where the security token is placed"},"name":{"type":"string","description":"The name of the security scheme (actual header/parameter name)"},"oauth_flows":{"type":"string","description":"The OAuth flows","format":"binary"},"oauth_types":{"type":"array","items":{"type":"string"},"description":"The OAuth types"},"scheme":{"type":"string","description":"The security scheme"},"type":{"type":"string","description":"The type of security"}},"required":["id","name","in_placement","scheme","env_variables"]},"ServeChatAttachmentForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"id":{"type":"string","description":"The ID of the attachment to serve"},"project_id":{"type":"string","description":"The project ID that the attachment belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeChatAttachmentResult":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeChatAttachmentSignedForm":{"type":"object","properties":{"token":{"type":"string","description":"The signed JWT token"}},"required":["token"]},"ServeChatAttachmentSignedResult":{"type":"object","properties":{"access_control_allow_origin":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeFunctionForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"id":{"type":"string","description":"The ID of the asset to serve"},"project_id":{"type":"string","description":"The procect ID that the asset belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeFunctionResult":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeImageForm":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the asset to serve"}},"required":["id"]},"ServeImageResult":{"type":"object","properties":{"access_control_allow_origin":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServeOpenAPIv3Form":{"type":"object","properties":{"apikey_token":{"type":"string"},"id":{"type":"string","description":"The ID of the asset to serve"},"project_id":{"type":"string","description":"The procect ID that the asset belongs to"},"session_token":{"type":"string"}},"required":["id","project_id"]},"ServeOpenAPIv3Result":{"type":"object","properties":{"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"last_modified":{"type":"string"}},"required":["content_type","content_length","last_modified"]},"ServerVariable":{"type":"object","properties":{"description":{"type":"string","description":"Description of the server variable"},"env_variables":{"type":"array","items":{"type":"string"},"description":"The environment variables"}},"required":["description","env_variables"]},"ServiceInfo":{"type":"object","properties":{"name":{"type":"string","description":"Service name"},"version":{"type":"string","description":"Service version"}},"description":"Service information","required":["name"]},"SetMcpMetadataRequestBody":{"type":"object","properties":{"default_environment_id":{"type":"string","description":"The default environment to load variables from","format":"uuid"},"environment_configs":{"type":"array","items":{"$ref":"#/components/schemas/McpEnvironmentConfigInput"},"description":"The list of environment variables to configure for this MCP"},"external_documentation_text":{"type":"string","description":"A blob of text for the button on the MCP server page"},"external_documentation_url":{"type":"string","description":"A link to external documentation for the MCP install page"},"installation_override_url":{"type":"string","description":"URL to redirect to instead of showing the default installation page","format":"uri"},"instructions":{"type":"string","description":"Server instructions returned in the MCP initialize response"},"logo_asset_id":{"type":"string","description":"The asset ID for the MCP install page logo"},"toolset_slug":{"type":"string","description":"The slug of the toolset associated with this install page metadata","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug"]},"SetProductFeatureRequestBody":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the feature should be enabled"},"feature_name":{"type":"string","description":"Name of the feature to update","enum":["logs","tool_io_logs"],"maxLength":60}},"required":["feature_name","enabled"]},"SetProjectLogoForm":{"type":"object","properties":{"asset_id":{"type":"string","description":"The ID of the asset"}},"required":["asset_id"]},"SetProjectLogoResult":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"SetSourceEnvironmentLinkRequestBody":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to link","format":"uuid"},"source_kind":{"type":"string","description":"The kind of source (http or function)","enum":["http","function"]},"source_slug":{"type":"string","description":"The slug of the source"}},"required":["source_kind","source_slug","environment_id"]},"SetToolsetEnvironmentLinkRequestBody":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment to link","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset","format":"uuid"}},"required":["toolset_id","environment_id"]},"SourceEnvironmentLink":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment","format":"uuid"},"id":{"type":"string","description":"The ID of the source environment link","format":"uuid"},"source_kind":{"type":"string","description":"The kind of source that can be linked to an environment","enum":["http","function"]},"source_slug":{"type":"string","description":"The slug of the source"}},"description":"A link between a source and an environment","required":["id","source_kind","source_slug","environment_id"]},"SubmitFeedbackRequestBody":{"type":"object","properties":{"feedback":{"type":"string","description":"User feedback: success or failure","enum":["success","failure"]},"id":{"type":"string","description":"The ID of the chat"}},"required":["id","feedback"]},"TelemetryFilter":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Deployment ID filter","format":"uuid"},"from":{"type":"string","description":"Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')","example":"2025-12-19T10:00:00Z","format":"date-time"},"function_id":{"type":"string","description":"Function ID filter","format":"uuid"},"gram_urn":{"type":"string","description":"Gram URN filter (single URN, use gram_urns for multiple)"},"to":{"type":"string","description":"End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')","example":"2025-12-19T11:00:00Z","format":"date-time"}},"description":"Filter criteria for telemetry queries"},"TelemetryLogRecord":{"type":"object","properties":{"attributes":{"description":"Log attributes as JSON object"},"body":{"type":"string","description":"The primary log message"},"id":{"type":"string","description":"Log record ID","format":"uuid"},"observed_time_unix_nano":{"type":"integer","description":"Unix time in nanoseconds when event was observed","format":"int64"},"resource_attributes":{"description":"Resource attributes as JSON object"},"service":{"$ref":"#/components/schemas/ServiceInfo"},"severity_text":{"type":"string","description":"Text representation of severity"},"span_id":{"type":"string","description":"W3C span ID (16 hex characters)"},"time_unix_nano":{"type":"integer","description":"Unix time in nanoseconds when event occurred","format":"int64"},"trace_id":{"type":"string","description":"W3C trace ID (32 hex characters)"}},"description":"OpenTelemetry log record","required":["id","time_unix_nano","observed_time_unix_nano","body","attributes","resource_attributes","service"]},"TierLimits":{"type":"object","properties":{"add_on_bullets":{"type":"array","items":{"type":"string"},"description":"Add-on items bullets of the tier (optional)"},"base_price":{"type":"number","description":"The base price for the tier","format":"double"},"feature_bullets":{"type":"array","items":{"type":"string"},"description":"Key feature bullets of the tier"},"included_bullets":{"type":"array","items":{"type":"string"},"description":"Included items bullets of the tier"},"included_credits":{"type":"integer","description":"The number of credits included in the tier for playground and other dashboard activities","format":"int64"},"included_servers":{"type":"integer","description":"The number of servers included in the tier","format":"int64"},"included_tool_calls":{"type":"integer","description":"The number of tool calls included in the tier","format":"int64"},"price_per_additional_server":{"type":"number","description":"The price per additional server","format":"double"},"price_per_additional_tool_call":{"type":"number","description":"The price per additional tool call","format":"double"}},"required":["base_price","included_tool_calls","included_servers","included_credits","price_per_additional_tool_call","price_per_additional_server","feature_bullets","included_bullets"]},"TimeSeriesBucket":{"type":"object","properties":{"abandoned_chats":{"type":"integer","description":"Abandoned chat sessions in this bucket","format":"int64"},"avg_session_duration_ms":{"type":"number","description":"Average session duration in milliseconds","format":"double"},"avg_tool_latency_ms":{"type":"number","description":"Average tool latency in milliseconds","format":"double"},"bucket_time_unix_nano":{"type":"string","description":"Bucket start time in Unix nanoseconds (string for JS precision)"},"failed_chats":{"type":"integer","description":"Failed chat sessions in this bucket","format":"int64"},"failed_tool_calls":{"type":"integer","description":"Failed tool calls in this bucket","format":"int64"},"partial_chats":{"type":"integer","description":"Partially resolved chat sessions in this bucket","format":"int64"},"resolved_chats":{"type":"integer","description":"Resolved chat sessions in this bucket","format":"int64"},"total_chats":{"type":"integer","description":"Total chat sessions in this bucket","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total tool calls in this bucket","format":"int64"}},"description":"A single time bucket for time series metrics","required":["bucket_time_unix_nano","total_chats","resolved_chats","failed_chats","partial_chats","abandoned_chats","total_tool_calls","failed_tool_calls","avg_tool_latency_ms","avg_session_duration_ms"]},"Tool":{"type":"object","properties":{"external_mcp_tool_definition":{"$ref":"#/components/schemas/ExternalMCPToolDefinition"},"function_tool_definition":{"$ref":"#/components/schemas/FunctionToolDefinition"},"http_tool_definition":{"$ref":"#/components/schemas/HTTPToolDefinition"},"prompt_template":{"$ref":"#/components/schemas/PromptTemplate"}},"description":"A polymorphic tool - can be an HTTP tool, function tool, prompt template, or external MCP proxy"},"ToolAnnotations":{"type":"object","properties":{"destructive_hint":{"type":"boolean","description":"If true, the tool may perform destructive updates (only meaningful when read_only_hint is false)"},"idempotent_hint":{"type":"boolean","description":"If true, repeated calls with same arguments have no additional effect (only meaningful when read_only_hint is false)"},"open_world_hint":{"type":"boolean","description":"If true, the tool interacts with external entities beyond its local environment"},"read_only_hint":{"type":"boolean","description":"If true, the tool does not modify its environment"},"title":{"type":"string","description":"Human-readable display name for the tool"}},"description":"Tool annotations providing behavioral hints about the tool"},"ToolCallSummary":{"type":"object","properties":{"event_source":{"type":"string","description":"Event source (from attributes.gram.event.source)"},"gram_urn":{"type":"string","description":"Gram URN associated with this tool call"},"http_status_code":{"type":"integer","description":"HTTP status code (if applicable)","format":"int32"},"log_count":{"type":"integer","description":"Total number of logs in this tool call","format":"int64"},"start_time_unix_nano":{"type":"integer","description":"Earliest log timestamp in Unix nanoseconds","format":"int64"},"tool_name":{"type":"string","description":"Tool name (from attributes.gram.tool.name)"},"tool_source":{"type":"string","description":"Tool call source (from attributes.gram.tool_call.source)"},"trace_id":{"type":"string","description":"Trace ID (32 hex characters)","pattern":"^[a-f0-9]{32}$"}},"description":"Summary information for a tool call","required":["trace_id","start_time_unix_nano","log_count","gram_urn"]},"ToolEntry":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool"},"name":{"type":"string","description":"The name of the tool"},"tool_urn":{"type":"string","description":"The URN of the tool"},"type":{"type":"string","enum":["http","prompt","function","externalmcp"]}},"required":["type","id","name","tool_urn"]},"ToolMetric":{"type":"object","properties":{"avg_latency_ms":{"type":"number","description":"Average latency in milliseconds","format":"double"},"call_count":{"type":"integer","description":"Total number of calls","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed calls","format":"int64"},"failure_rate":{"type":"number","description":"Failure rate (0.0 to 1.0)","format":"double"},"gram_urn":{"type":"string","description":"Tool URN"},"success_count":{"type":"integer","description":"Number of successful calls","format":"int64"}},"description":"Aggregated metrics for a single tool","required":["gram_urn","call_count","success_count","failure_count","avg_latency_ms","failure_rate"]},"ToolUsage":{"type":"object","properties":{"count":{"type":"integer","description":"Total call count","format":"int64"},"failure_count":{"type":"integer","description":"Failed calls (4xx/5xx status)","format":"int64"},"success_count":{"type":"integer","description":"Successful calls (2xx status)","format":"int64"},"urn":{"type":"string","description":"Tool URN"}},"description":"Tool usage statistics","required":["urn","count","success_count","failure_count"]},"ToolVariation":{"type":"object","properties":{"confirm":{"type":"string","description":"The confirmation mode for the tool variation"},"confirm_prompt":{"type":"string","description":"The confirmation prompt for the tool variation"},"created_at":{"type":"string","description":"The creation date of the tool variation"},"description":{"type":"string","description":"The description of the tool variation"},"destructive_hint":{"type":"boolean","description":"Override: if true, the tool may perform destructive updates"},"group_id":{"type":"string","description":"The ID of the tool variation group"},"id":{"type":"string","description":"The ID of the tool variation"},"idempotent_hint":{"type":"boolean","description":"Override: if true, repeated calls have no additional effect"},"name":{"type":"string","description":"The name of the tool variation"},"open_world_hint":{"type":"boolean","description":"Override: if true, the tool interacts with external entities"},"read_only_hint":{"type":"boolean","description":"Override: if true, the tool does not modify its environment"},"src_tool_name":{"type":"string","description":"The name of the source tool"},"src_tool_urn":{"type":"string","description":"The URN of the source tool"},"summarizer":{"type":"string","description":"The summarizer of the tool variation"},"title":{"type":"string","description":"Display name override for the tool"},"updated_at":{"type":"string","description":"The last update date of the tool variation"}},"required":["id","group_id","src_tool_name","src_tool_urn","created_at","updated_at"]},"Toolset":{"type":"object","properties":{"account_type":{"type":"string","description":"The account type of the organization"},"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"external_oauth_server":{"$ref":"#/components/schemas/ExternalOAuthServer"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"id":{"type":"string","description":"The ID of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The name of the toolset"},"oauth_enablement_metadata":{"$ref":"#/components/schemas/OAuthEnablementMetadata"},"oauth_proxy_server":{"$ref":"#/components/schemas/OAuthProxyServer"},"organization_id":{"type":"string","description":"The organization ID this toolset belongs to"},"project_id":{"type":"string","description":"The project ID this toolset belongs to"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplate"},"description":"The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"The resource URNs in this toolset"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resource"},"description":"The resources in this toolset"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"The tool URNs in this toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"description":"The tools in this toolset"},"toolset_version":{"type":"integer","description":"The version of the toolset (will be 0 if none exists)","format":"int64"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"}},"required":["id","project_id","organization_id","account_type","name","slug","tools","tool_selection_mode","toolset_version","prompt_templates","tool_urns","resources","resource_urns","oauth_enablement_metadata","created_at","updated_at"]},"ToolsetEntry":{"type":"object","properties":{"created_at":{"type":"string","description":"When the toolset was created.","format":"date-time"},"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"Description of the toolset"},"external_mcp_header_definitions":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPHeaderDefinition"},"description":"The external MCP header definitions that are relevant to the toolset"},"function_environment_variables":{"type":"array","items":{"$ref":"#/components/schemas/FunctionEnvironmentVariable"},"description":"The function environment variables that are relevant to the toolset"},"id":{"type":"string","description":"The ID of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The name of the toolset"},"organization_id":{"type":"string","description":"The organization ID this toolset belongs to"},"project_id":{"type":"string","description":"The project ID this toolset belongs to"},"prompt_templates":{"type":"array","items":{"$ref":"#/components/schemas/PromptTemplateEntry"},"description":"The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"The resource URNs in this toolset"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourceEntry"},"description":"The resources in this toolset"},"security_variables":{"type":"array","items":{"$ref":"#/components/schemas/SecurityVariable"},"description":"The security variables that are relevant to the toolset"},"server_variables":{"type":"array","items":{"$ref":"#/components/schemas/ServerVariable"},"description":"The server variables that are relevant to the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"The tool URNs in this toolset"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolEntry"},"description":"The tools in this toolset"},"updated_at":{"type":"string","description":"When the toolset was last updated.","format":"date-time"}},"required":["id","project_id","organization_id","name","slug","tools","tool_selection_mode","prompt_templates","tool_urns","resources","resource_urns","created_at","updated_at"]},"ToolsetEnvironmentLink":{"type":"object","properties":{"environment_id":{"type":"string","description":"The ID of the environment","format":"uuid"},"id":{"type":"string","description":"The ID of the toolset environment link","format":"uuid"},"toolset_id":{"type":"string","description":"The ID of the toolset","format":"uuid"}},"description":"A link between a toolset and an environment","required":["id","toolset_id","environment_id"]},"UpdateEnvironmentForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the environment"},"entries_to_remove":{"type":"array","items":{"type":"string"},"description":"List of environment entry names to remove"},"entries_to_update":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment entries to update or create"},"name":{"type":"string","description":"The name of the environment"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"description":"Form for updating an environment","required":["slug","entries_to_update","entries_to_remove"]},"UpdateEnvironmentRequestBody":{"type":"object","properties":{"description":{"type":"string","description":"The description of the environment"},"entries_to_remove":{"type":"array","items":{"type":"string"},"description":"List of environment entry names to remove"},"entries_to_update":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentEntryInput"},"description":"List of environment entries to update or create"},"name":{"type":"string","description":"The name of the environment"}},"required":["entries_to_update","entries_to_remove"]},"UpdatePackageForm":{"type":"object","properties":{"description":{"type":"string","description":"The description of the package. Limited markdown syntax is supported.","maxLength":10000},"id":{"type":"string","description":"The id of the package to update","maxLength":50},"image_asset_id":{"type":"string","description":"The asset ID of the image to show for this package","maxLength":50},"keywords":{"type":"array","items":{"type":"string"},"description":"The keywords of the package","maxItems":5},"summary":{"type":"string","description":"The summary of the package","maxLength":80},"title":{"type":"string","description":"The title of the package","maxLength":100},"url":{"type":"string","description":"External URL for the package owner","maxLength":100}},"required":["id"]},"UpdatePackageResult":{"type":"object","properties":{"package":{"$ref":"#/components/schemas/Package"}},"required":["package"]},"UpdatePromptTemplateForm":{"type":"object","properties":{"arguments":{"type":"string","description":"The JSON Schema defining the placeholders found in the prompt template","format":"json"},"description":{"type":"string","description":"The description of the prompt template"},"engine":{"type":"string","description":"The template engine","enum":["mustache"]},"id":{"type":"string","description":"The ID of the prompt template to update"},"kind":{"type":"string","description":"The kind of prompt the template is used for","enum":["prompt","higher_order_tool"]},"name":{"type":"string","description":"The name of the prompt template. Will be updated via variation"},"prompt":{"type":"string","description":"The template content"},"tool_urns_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool URNS associated with the prompt template","maxItems":20},"tools_hint":{"type":"array","items":{"type":"string"},"description":"The suggested tool names associated with the prompt template","maxItems":20}},"required":["id"]},"UpdatePromptTemplateResult":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PromptTemplate"}},"required":["template"]},"UpdateSecurityVariableDisplayNameForm":{"type":"object","properties":{"display_name":{"type":"string","description":"The user-friendly display name. Set to empty string to clear and use the original name.","maxLength":120},"project_slug_input":{"type":"string"},"security_key":{"type":"string","description":"The security scheme key (e.g., 'BearerAuth', 'ApiKeyAuth') from the OpenAPI spec","maxLength":60},"toolset_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40}},"required":["toolset_slug","security_key","display_name"]},"UpdateSlackConnectionRequestBody":{"type":"object","properties":{"default_toolset_slug":{"type":"string","description":"The default toolset slug for this Slack connection"}},"required":["default_toolset_slug"]},"UpdateToolsetForm":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"The new description of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The new name of the toolset"},"project_slug_input":{"type":"string"},"prompt_template_names":{"type":"array","items":{"type":"string"},"description":"List of prompt template names to include (note: for actual prompts, not tools)"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"slug":{"type":"string","description":"A short url-friendly label that uniquely identifies a resource.","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}},"required":["slug"]},"UpdateToolsetRequestBody":{"type":"object","properties":{"custom_domain_id":{"type":"string","description":"The ID of the custom domain to use for the toolset"},"default_environment_slug":{"type":"string","description":"The slug of the environment to use as the default for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"description":{"type":"string","description":"The new description of the toolset"},"mcp_enabled":{"type":"boolean","description":"Whether the toolset is enabled for MCP"},"mcp_is_public":{"type":"boolean","description":"Whether the toolset is public in MCP"},"mcp_slug":{"type":"string","description":"The slug of the MCP to use for the toolset","pattern":"^[a-z0-9_-]{1,128}$","maxLength":40},"name":{"type":"string","description":"The new name of the toolset"},"prompt_template_names":{"type":"array","items":{"type":"string"},"description":"List of prompt template names to include (note: for actual prompts, not tools)"},"resource_urns":{"type":"array","items":{"type":"string"},"description":"List of resource URNs to include in the toolset"},"tool_selection_mode":{"type":"string","description":"The mode to use for tool selection"},"tool_urns":{"type":"array","items":{"type":"string"},"description":"List of tool URNs to include in the toolset"}}},"UploadChatAttachmentForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"chat_sessions_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadChatAttachmentResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"url":{"type":"string","description":"The URL to serve the chat attachment"}},"required":["asset","url"]},"UploadFunctionsForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadFunctionsResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UploadImageForm":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadImageResult":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UploadOpenAPIv3Form":{"type":"object","properties":{"apikey_token":{"type":"string"},"content_length":{"type":"integer","format":"int64"},"content_type":{"type":"string"},"project_slug_input":{"type":"string"},"session_token":{"type":"string"}},"required":["content_type","content_length"]},"UploadOpenAPIv3Result":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"required":["asset"]},"UpsertAllowedOriginForm":{"type":"object","properties":{"origin":{"type":"string","description":"The origin URL to upsert","minLength":1,"maxLength":500},"status":{"type":"string","default":"pending","enum":["pending","approved","rejected"]}},"required":["origin"]},"UpsertAllowedOriginResult":{"type":"object","properties":{"allowed_origin":{"$ref":"#/components/schemas/AllowedOrigin"}},"required":["allowed_origin"]},"UpsertGlobalToolVariationForm":{"type":"object","properties":{"confirm":{"type":"string","description":"The confirmation mode for the tool variation","enum":["always","never","session"]},"confirm_prompt":{"type":"string","description":"The confirmation prompt for the tool variation"},"description":{"type":"string","description":"The description of the tool variation"},"destructive_hint":{"type":"boolean","description":"Override: if true, the tool may perform destructive updates"},"idempotent_hint":{"type":"boolean","description":"Override: if true, repeated calls have no additional effect"},"name":{"type":"string","description":"The name of the tool variation"},"open_world_hint":{"type":"boolean","description":"Override: if true, the tool interacts with external entities"},"read_only_hint":{"type":"boolean","description":"Override: if true, the tool does not modify its environment"},"src_tool_name":{"type":"string","description":"The name of the source tool"},"src_tool_urn":{"type":"string","description":"The URN of the source tool"},"summarizer":{"type":"string","description":"The summarizer of the tool variation"},"summary":{"type":"string","description":"The summary of the tool variation"},"tags":{"type":"array","items":{"type":"string"},"description":"The tags of the tool variation"},"title":{"type":"string","description":"Display name override for the tool"}},"required":["src_tool_name","src_tool_urn"]},"UpsertGlobalToolVariationResult":{"type":"object","properties":{"variation":{"$ref":"#/components/schemas/ToolVariation"}},"required":["variation"]},"UsageTiers":{"type":"object","properties":{"enterprise":{"$ref":"#/components/schemas/TierLimits"},"free":{"$ref":"#/components/schemas/TierLimits"},"pro":{"$ref":"#/components/schemas/TierLimits"}},"required":["free","pro","enterprise"]},"UserSummary":{"type":"object","properties":{"avg_tokens_per_request":{"type":"number","description":"Average tokens per chat request","format":"double"},"first_seen_unix_nano":{"type":"string","description":"Earliest activity timestamp in Unix nanoseconds"},"last_seen_unix_nano":{"type":"string","description":"Latest activity timestamp in Unix nanoseconds"},"tool_call_failure":{"type":"integer","description":"Failed tool calls (4xx/5xx status)","format":"int64"},"tool_call_success":{"type":"integer","description":"Successful tool calls (2xx status)","format":"int64"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolUsage"},"description":"Per-tool usage breakdown"},"total_chat_requests":{"type":"integer","description":"Total number of chat completion requests","format":"int64"},"total_chats":{"type":"integer","description":"Number of unique chat sessions","format":"int64"},"total_input_tokens":{"type":"integer","description":"Sum of input tokens used","format":"int64"},"total_output_tokens":{"type":"integer","description":"Sum of output tokens used","format":"int64"},"total_tokens":{"type":"integer","description":"Sum of all tokens used","format":"int64"},"total_tool_calls":{"type":"integer","description":"Total number of tool calls","format":"int64"},"user_id":{"type":"string","description":"User identifier (user_id or external_user_id depending on group_by)"}},"description":"Aggregated usage summary for a single user","required":["user_id","first_seen_unix_nano","last_seen_unix_nano","total_chats","total_chat_requests","total_input_tokens","total_output_tokens","total_tokens","avg_tokens_per_request","total_tool_calls","tool_call_success","tool_call_failure","tools"]},"ValidateKeyOrganization":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the organization"},"name":{"type":"string","description":"The name of the organization"},"slug":{"type":"string","description":"The slug of the organization"}},"required":["id","name","slug"]},"ValidateKeyProject":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the project"},"name":{"type":"string","description":"The name of the project"},"slug":{"type":"string","description":"The slug of the project"}},"required":["id","name","slug"]},"ValidateKeyResult":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/ValidateKeyOrganization"},"projects":{"type":"array","items":{"$ref":"#/components/schemas/ValidateKeyProject"},"description":"The projects accessible with this key"},"scopes":{"type":"array","items":{"type":"string"},"description":"List of permission scopes for this key"}},"required":["organization","projects","scopes"]},"WorkflowAgentRequest":{"type":"object","properties":{"async":{"type":"boolean","description":"If true, returns immediately with a response ID for polling"},"input":{"description":"The input to the agent - can be a string or array of messages"},"instructions":{"type":"string","description":"System instructions for the agent"},"model":{"type":"string","description":"The model to use for the agent (e.g., openai/gpt-4o)"},"previous_response_id":{"type":"string","description":"ID of a previous response to continue from"},"store":{"type":"boolean","description":"If true, stores the response defaults to true"},"sub_agents":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowSubAgent"},"description":"Sub-agents available for delegation"},"temperature":{"type":"number","description":"Temperature for model responses","format":"double"},"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowAgentToolset"},"description":"Toolsets available to the agent"}},"description":"Request payload for creating an agent response","required":["model","input"]},"WorkflowAgentResponseOutput":{"type":"object","properties":{"created_at":{"type":"integer","description":"Unix timestamp when the response was created","format":"int64"},"error":{"type":"string","description":"Error message if the response failed"},"id":{"type":"string","description":"Unique identifier for this response"},"instructions":{"type":"string","description":"The instructions that were used"},"model":{"type":"string","description":"The model that was used"},"object":{"type":"string","description":"Object type, always 'response'"},"output":{"type":"array","items":{},"description":"Array of output items (messages, tool calls)"},"previous_response_id":{"type":"string","description":"ID of the previous response if continuing"},"result":{"type":"string","description":"The final text result from the agent"},"status":{"type":"string","description":"Status of the response","enum":["in_progress","completed","failed"]},"temperature":{"type":"number","description":"Temperature that was used","format":"double"},"text":{"$ref":"#/components/schemas/WorkflowAgentResponseText"}},"description":"Response output from an agent workflow","required":["id","object","created_at","status","model","output","temperature","text","result"]},"WorkflowAgentResponseText":{"type":"object","properties":{"format":{"$ref":"#/components/schemas/WorkflowAgentTextFormat"}},"description":"Text format configuration for the response","required":["format"]},"WorkflowAgentTextFormat":{"type":"object","properties":{"type":{"type":"string","description":"The type of text format (e.g., 'text')"}},"description":"Text format type","required":["type"]},"WorkflowAgentToolset":{"type":"object","properties":{"environment_slug":{"type":"string","description":"The slug of the environment for auth"},"toolset_slug":{"type":"string","description":"The slug of the toolset to use"}},"description":"A toolset reference for agent execution","required":["toolset_slug","environment_slug"]},"WorkflowSubAgent":{"type":"object","properties":{"description":{"type":"string","description":"Description of what this sub-agent does"},"environment_slug":{"type":"string","description":"The environment slug for auth"},"instructions":{"type":"string","description":"Instructions for this sub-agent"},"name":{"type":"string","description":"The name of this sub-agent"},"tools":{"type":"array","items":{"type":"string"},"description":"Tool URNs available to this sub-agent"},"toolsets":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowAgentToolset"},"description":"Toolsets available to this sub-agent"}},"description":"A sub-agent definition for the agent workflow","required":["name","description"]}},"securitySchemes":{"apikey_header_Authorization":{"type":"apiKey","description":"key based auth.","name":"Authorization","in":"header"},"apikey_header_Gram-Key":{"type":"apiKey","description":"key based auth.","name":"Gram-Key","in":"header"},"chat_sessions_token_header_Gram-Chat-Session":{"type":"http","description":"Gram Chat Sessions token based auth.","scheme":"bearer"},"function_token_header_Authorization":{"type":"http","description":"Gram Functions token based auth.","scheme":"bearer"},"project_slug_header_Gram-Project":{"type":"apiKey","description":"project slug header auth.","name":"Gram-Project","in":"header"},"project_slug_query_project_slug":{"type":"apiKey","description":"project slug header auth.","name":"project_slug","in":"query"},"session_header_Gram-Session":{"type":"apiKey","description":"Session based auth. By cookie or header.","name":"Gram-Session","in":"header"}}},"tags":[{"name":"agentworkflows","description":"OpenAI Responses API compatible endpoint for running agent workflows."},{"name":"assets","description":"Manages assets used by Gram projects."},{"name":"auth","description":"Managed auth for gram producers and dashboard."},{"name":"chat","description":"Managed chats for gram AI consumers."},{"name":"chatSessions","description":"Manages chat session tokens for client-side authentication"},{"name":"deployments","description":"Manages deployments of tools from upstream sources."},{"name":"domains","description":"Manage custom domains for gram."},{"name":"environments","description":"Managing toolset environments."},{"name":"mcpRegistries","description":"External MCP registry operations"},{"name":"functions","description":"Endpoints for working with functions."},{"name":"instances","description":"Consumer APIs for interacting with all relevant data for an instance of a toolset and environment."},{"name":"integrations","description":"Explore third-party tools in Gram."},{"name":"keys","description":"Managing system api keys."},{"name":"mcpMetadata","description":"Manages metadata for the MCP install page shown to users."},{"name":"packages","description":"Manages packages in Gram."},{"name":"features","description":"Manage product level feature controls."},{"name":"projects","description":"Manages projects in Gram."},{"name":"resources","description":"Dashboard API for interacting with resources."},{"name":"slack","description":"Auth and interactions for the Gram Slack App."},{"name":"telemetry","description":"Fetch telemetry data for tools in Gram."},{"name":"templates","description":"Manages re-usable prompt templates and higher-order tools for a project."},{"name":"tools","description":"Dashboard API for interacting with tools."},{"name":"toolsets","description":"Managed toolsets for gram AI consumers."},{"name":"usage","description":"Read usage for gram."},{"name":"variations","description":"Manage variations of tools."}]}
\ No newline at end of file
diff --git a/server/gen/http/openapi3.yaml b/server/gen/http/openapi3.yaml
index dba9518bb..8609127e7 100644
--- a/server/gen/http/openapi3.yaml
+++ b/server/gen/http/openapi3.yaml
@@ -14274,6 +14274,14 @@ components:
- tool_urn
- created_at
- updated_at
+ HookResult:
+ type: object
+ properties:
+ ok:
+ type: boolean
+ description: Whether the hook was received successfully
+ required:
+ - ok
InfoResponseBody:
type: object
properties:
@@ -15309,6 +15317,40 @@ components:
- credits
- included_credits
- has_active_subscription
+ PostToolUseFailurePayload:
+ type: object
+ properties:
+ tool_error:
+ description: The error from the tool
+ tool_input:
+ description: The input to the tool
+ tool_name:
+ type: string
+ description: The name of the tool that failed
+ required:
+ - tool_name
+ PostToolUsePayload:
+ type: object
+ properties:
+ tool_input:
+ description: The input to the tool
+ tool_name:
+ type: string
+ description: The name of the tool that was invoked
+ tool_response:
+ description: The response from the tool
+ required:
+ - tool_name
+ PreToolUsePayload:
+ type: object
+ properties:
+ tool_input:
+ description: The input to the tool
+ tool_name:
+ type: string
+ description: The name of the tool being invoked
+ required:
+ - tool_name
Project:
type: object
properties:
@@ -16636,6 +16678,9 @@ components:
ToolCallSummary:
type: object
properties:
+ event_source:
+ type: string
+ description: Event source (from attributes.gram.event.source)
gram_urn:
type: string
description: Gram URN associated with this tool call
@@ -16651,6 +16696,12 @@ components:
type: integer
description: Earliest log timestamp in Unix nanoseconds
format: int64
+ tool_name:
+ type: string
+ description: Tool name (from attributes.gram.tool.name)
+ tool_source:
+ type: string
+ description: Tool call source (from attributes.gram.tool_call.source)
trace_id:
type: string
description: Trace ID (32 hex characters)
diff --git a/server/gen/http/telemetry/client/encode_decode.go b/server/gen/http/telemetry/client/encode_decode.go
index 4ad9d6a4c..fd39d9610 100644
--- a/server/gen/http/telemetry/client/encode_decode.go
+++ b/server/gen/http/telemetry/client/encode_decode.go
@@ -2652,6 +2652,9 @@ func unmarshalToolCallSummaryResponseBodyToTelemetryToolCallSummary(v *ToolCallS
LogCount: *v.LogCount,
HTTPStatusCode: v.HTTPStatusCode,
GramUrn: *v.GramUrn,
+ ToolName: v.ToolName,
+ ToolSource: v.ToolSource,
+ EventSource: v.EventSource,
}
return res
diff --git a/server/gen/http/telemetry/client/types.go b/server/gen/http/telemetry/client/types.go
index bf6fb19b8..2617304bd 100644
--- a/server/gen/http/telemetry/client/types.go
+++ b/server/gen/http/telemetry/client/types.go
@@ -2208,6 +2208,12 @@ type ToolCallSummaryResponseBody struct {
HTTPStatusCode *int32 `form:"http_status_code,omitempty" json:"http_status_code,omitempty" xml:"http_status_code,omitempty"`
// Gram URN associated with this tool call
GramUrn *string `form:"gram_urn,omitempty" json:"gram_urn,omitempty" xml:"gram_urn,omitempty"`
+ // Tool name (from attributes.gram.tool.name)
+ ToolName *string `form:"tool_name,omitempty" json:"tool_name,omitempty" xml:"tool_name,omitempty"`
+ // Tool call source (from attributes.gram.tool_call.source)
+ ToolSource *string `form:"tool_source,omitempty" json:"tool_source,omitempty" xml:"tool_source,omitempty"`
+ // Event source (from attributes.gram.event.source)
+ EventSource *string `form:"event_source,omitempty" json:"event_source,omitempty" xml:"event_source,omitempty"`
}
// SearchChatsFilterRequestBody is used to define fields on request body types.
diff --git a/server/gen/http/telemetry/server/encode_decode.go b/server/gen/http/telemetry/server/encode_decode.go
index 6a84852b9..65b6853df 100644
--- a/server/gen/http/telemetry/server/encode_decode.go
+++ b/server/gen/http/telemetry/server/encode_decode.go
@@ -2526,6 +2526,9 @@ func marshalTelemetryToolCallSummaryToToolCallSummaryResponseBody(v *telemetry.T
LogCount: v.LogCount,
HTTPStatusCode: v.HTTPStatusCode,
GramUrn: v.GramUrn,
+ ToolName: v.ToolName,
+ ToolSource: v.ToolSource,
+ EventSource: v.EventSource,
}
return res
diff --git a/server/gen/http/telemetry/server/types.go b/server/gen/http/telemetry/server/types.go
index e59741566..9edada5c0 100644
--- a/server/gen/http/telemetry/server/types.go
+++ b/server/gen/http/telemetry/server/types.go
@@ -2146,6 +2146,12 @@ type ToolCallSummaryResponseBody struct {
HTTPStatusCode *int32 `form:"http_status_code,omitempty" json:"http_status_code,omitempty" xml:"http_status_code,omitempty"`
// Gram URN associated with this tool call
GramUrn string `form:"gram_urn" json:"gram_urn" xml:"gram_urn"`
+ // Tool name (from attributes.gram.tool.name)
+ ToolName *string `form:"tool_name,omitempty" json:"tool_name,omitempty" xml:"tool_name,omitempty"`
+ // Tool call source (from attributes.gram.tool_call.source)
+ ToolSource *string `form:"tool_source,omitempty" json:"tool_source,omitempty" xml:"tool_source,omitempty"`
+ // Event source (from attributes.gram.event.source)
+ EventSource *string `form:"event_source,omitempty" json:"event_source,omitempty" xml:"event_source,omitempty"`
}
// ChatSummaryResponseBody is used to define fields on response body types.
diff --git a/server/gen/telemetry/service.go b/server/gen/telemetry/service.go
index de0ca1f95..f82b73a88 100644
--- a/server/gen/telemetry/service.go
+++ b/server/gen/telemetry/service.go
@@ -601,6 +601,12 @@ type ToolCallSummary struct {
HTTPStatusCode *int32
// Gram URN associated with this tool call
GramUrn string
+ // Tool name (from attributes.gram.tool.name)
+ ToolName *string
+ // Tool call source (from attributes.gram.tool_call.source)
+ ToolSource *string
+ // Event source (from attributes.gram.event.source)
+ EventSource *string
}
// Aggregated metrics for a single tool
diff --git a/server/internal/attr/conventions.go b/server/internal/attr/conventions.go
index 0d2ae347e..652517438 100644
--- a/server/internal/attr/conventions.go
+++ b/server/internal/attr/conventions.go
@@ -185,6 +185,10 @@ const (
ToolsetSlugKey = attribute.Key("gram.toolset.slug")
VisibilityKey = attribute.Key("gram.visibility")
+ // Hooks
+ HookEventKey = attribute.Key("gram.hook.event")
+ HookErrorKey = attribute.Key("gram.hook.error")
+
PaginationTsStartKey = attribute.Key("gram.pagination.ts_start")
PaginationTsEndKey = attribute.Key("gram.pagination.ts_end")
PaginationCursorKey = attribute.Key("gram.pagination.cursor")
diff --git a/server/internal/hooks/impl.go b/server/internal/hooks/impl.go
new file mode 100644
index 000000000..c209147f8
--- /dev/null
+++ b/server/internal/hooks/impl.go
@@ -0,0 +1,223 @@
+package hooks
+
+import (
+ "context"
+ "crypto/rand"
+ "encoding/hex"
+ "fmt"
+ "log/slog"
+ "strings"
+ "time"
+
+ "github.com/google/uuid"
+ "github.com/jackc/pgx/v5/pgxpool"
+ "go.opentelemetry.io/otel/trace"
+ goahttp "goa.design/goa/v3/http"
+ "goa.design/goa/v3/security"
+
+ "github.com/speakeasy-api/gram/server/internal/attr"
+ "github.com/speakeasy-api/gram/server/internal/auth"
+ "github.com/speakeasy-api/gram/server/internal/auth/sessions"
+ "github.com/speakeasy-api/gram/server/internal/contextvalues"
+ "github.com/speakeasy-api/gram/server/internal/middleware"
+ "github.com/speakeasy-api/gram/server/internal/telemetry"
+
+ gen "github.com/speakeasy-api/gram/server/gen/hooks"
+ srv "github.com/speakeasy-api/gram/server/gen/http/hooks/server"
+)
+
+type Service struct {
+ tracer trace.Tracer
+ logger *slog.Logger
+ db *pgxpool.Pool
+ telemetryService *telemetry.Service
+ auth *auth.Auth
+}
+
+var _ gen.Service = (*Service)(nil)
+
+func NewService(logger *slog.Logger, db *pgxpool.Pool, tracerProvider trace.TracerProvider, telemetryService *telemetry.Service, sessions *sessions.Manager) *Service {
+ return &Service{
+ tracer: tracerProvider.Tracer("github.com/speakeasy-api/gram/server/internal/hooks"),
+ logger: logger.With(attr.SlogComponent("hooks")),
+ db: db,
+ telemetryService: telemetryService,
+ auth: auth.New(logger, db, sessions),
+ }
+}
+
+// APIKeyAuth implements the API key authentication for the hooks service
+func (s *Service) APIKeyAuth(ctx context.Context, key string, schema *security.APIKeyScheme) (context.Context, error) {
+ return s.auth.Authorize(ctx, key, schema)
+}
+
+func Attach(mux goahttp.Muxer, service *Service) {
+ endpoints := gen.NewEndpoints(service)
+ endpoints.Use(middleware.MapErrors())
+ endpoints.Use(middleware.TraceMethods(service.tracer))
+ srv.Mount(
+ mux,
+ srv.New(endpoints, mux, goahttp.RequestDecoder, goahttp.ResponseEncoder, nil, nil),
+ )
+}
+
+func (s *Service) PreToolUse(ctx context.Context, payload *gen.PreToolUsePayload) (*gen.HookResult, error) {
+ // Extract auth context for project and organization IDs
+ authCtx, ok := contextvalues.GetAuthContext(ctx)
+ if !ok || authCtx == nil || authCtx.ProjectID == nil {
+ s.logger.ErrorContext(ctx, "PreToolUse called without valid auth context")
+ return &gen.HookResult{OK: true}, nil // TODO different failure modes
+ }
+
+ s.logger.InfoContext(ctx, fmt.Sprintf("🪝 HOOK PreToolUse: %s", payload.ToolName),
+ attr.SlogEvent("pre_tool_use"),
+ attr.SlogToolName(payload.ToolName),
+ attr.SlogValueAny(payload.ToolInput),
+ )
+
+ // Generate unique trace and span IDs for this hook event
+ traceID := generateTraceID()
+ spanID := generateSpanID()
+
+ // Write to ClickHouse
+ attrs := s.buildBaseAttributes(payload.ToolName, payload.ToolInput)
+ attrs[attr.HookEventKey] = "pre_tool_use"
+ attrs[attr.LogBodyKey] = fmt.Sprintf("Pre-tool use hook: %s", payload.ToolName)
+ attrs[attr.TraceIDKey] = traceID
+ attrs[attr.SpanIDKey] = spanID
+
+ s.writeToClickHouse(authCtx.ProjectID, authCtx.ActiveOrganizationID, payload.ToolName, attrs)
+
+ return &gen.HookResult{OK: true}, nil
+}
+
+func (s *Service) PostToolUse(ctx context.Context, payload *gen.PostToolUsePayload) (*gen.HookResult, error) {
+ // Extract auth context for project and organization IDs
+ authCtx, ok := contextvalues.GetAuthContext(ctx)
+ if !ok || authCtx == nil || authCtx.ProjectID == nil {
+ s.logger.ErrorContext(ctx, "PostToolUse called without valid auth context")
+ return &gen.HookResult{OK: true}, nil // TODO different failure modes
+ }
+
+ s.logger.InfoContext(ctx, fmt.Sprintf("🪝 HOOK PostToolUse: %s", payload.ToolName),
+ attr.SlogEvent("post_tool_use"),
+ attr.SlogToolName(payload.ToolName),
+ attr.SlogValueAny(payload.ToolInput),
+ )
+
+ // Generate unique trace and span IDs for this hook event
+ traceID := generateTraceID()
+ spanID := generateSpanID()
+
+ // Write to ClickHouse
+ attrs := s.buildBaseAttributes(payload.ToolName, payload.ToolInput)
+ attrs[attr.HookEventKey] = "post_tool_use"
+ attrs[attr.LogBodyKey] = fmt.Sprintf("Post-tool use hook: %s", payload.ToolName)
+ if payload.ToolResponse != nil {
+ attrs[attr.GenAIToolCallResultKey] = payload.ToolResponse
+ }
+ attrs[attr.TraceIDKey] = traceID
+ attrs[attr.SpanIDKey] = spanID
+
+ s.writeToClickHouse(authCtx.ProjectID, authCtx.ActiveOrganizationID, payload.ToolName, attrs)
+
+ return &gen.HookResult{OK: true}, nil
+}
+
+func (s *Service) PostToolUseFailure(ctx context.Context, payload *gen.PostToolUseFailurePayload) (*gen.HookResult, error) {
+ // Extract auth context for project and organization IDs
+ authCtx, ok := contextvalues.GetAuthContext(ctx)
+ if !ok || authCtx == nil || authCtx.ProjectID == nil {
+ s.logger.ErrorContext(ctx, "PostToolUseFailure called without valid auth context")
+ return &gen.HookResult{OK: true}, nil // TODO different failure modes
+ }
+
+ s.logger.WarnContext(ctx, fmt.Sprintf("🪝 HOOK PostToolUseFailure: %s", payload.ToolName),
+ attr.SlogEvent("post_tool_use_failure"),
+ attr.SlogToolName(payload.ToolName),
+ attr.SlogValueAny(payload.ToolInput),
+ )
+
+ // Generate unique trace and span IDs for this hook event
+ traceID := generateTraceID()
+ spanID := generateSpanID()
+
+ // Write to ClickHouse
+ attrs := s.buildBaseAttributes(payload.ToolName, payload.ToolInput)
+ attrs[attr.HookEventKey] = "post_tool_use_failure"
+ attrs[attr.LogBodyKey] = fmt.Sprintf("Post-tool use failure hook: %s", payload.ToolName)
+ if payload.ToolError != nil {
+ attrs[attr.HookErrorKey] = payload.ToolError
+ }
+ attrs[attr.TraceIDKey] = traceID
+ attrs[attr.SpanIDKey] = spanID
+
+ s.writeToClickHouse(authCtx.ProjectID, authCtx.ActiveOrganizationID, payload.ToolName, attrs)
+
+ return &gen.HookResult{OK: true}, nil
+}
+
+// generateTraceID generates a W3C-compliant trace ID (32 hex characters)
+func generateTraceID() string {
+ b := make([]byte, 16)
+ _, _ = rand.Read(b)
+ return hex.EncodeToString(b)
+}
+
+// generateSpanID generates a W3C-compliant span ID (16 hex characters)
+func generateSpanID() string {
+ b := make([]byte, 8)
+ _, _ = rand.Read(b)
+ return hex.EncodeToString(b)
+}
+
+// buildBaseAttributes creates the base set of attributes for a hook event
+func (s *Service) buildBaseAttributes(toolName string, toolInput any) map[attr.Key]any {
+ attrs := map[attr.Key]any{
+ attr.EventSourceKey: string(telemetry.EventSourceHook),
+ attr.ToolNameKey: toolName,
+ }
+
+ if toolInput != nil {
+ attrs[attr.GenAIToolCallArgumentsKey] = toolInput
+ }
+
+ // Parse MCP tool names (format: mcp____)
+ if strings.HasPrefix(toolName, "mcp__") {
+ parts := strings.SplitN(toolName, "__", 3)
+ if len(parts) == 3 {
+ attrs[attr.ToolCallSourceKey] = parts[1]
+ attrs[attr.ToolNameKey] = parts[2]
+ }
+ }
+
+ return attrs
+}
+
+// writeToClickHouse writes the hook event to ClickHouse telemetry
+func (s *Service) writeToClickHouse(projectID *uuid.UUID, organizationID string, toolName string, attrs map[attr.Key]any) {
+ // Make sure we don't discard any tool name information
+ if actualToolName, ok := attrs[attr.ToolNameKey]; ok {
+ tn, ok := actualToolName.(string)
+ if ok {
+ toolName = tn
+ }
+ }
+
+ // Build ToolInfo with project/org context from auth
+ toolInfo := telemetry.ToolInfo{
+ Name: toolName,
+ OrganizationID: organizationID,
+ ProjectID: projectID.String(),
+ ID: "",
+ URN: "", // These tools have no real URN
+ DeploymentID: "",
+ FunctionID: nil,
+ }
+
+ s.telemetryService.CreateLog(telemetry.LogParams{
+ Timestamp: time.Now(),
+ ToolInfo: toolInfo,
+ Attributes: attrs,
+ })
+}
diff --git a/server/internal/telemetry/crud.go b/server/internal/telemetry/crud.go
index 59ac07b5f..f21ecd583 100644
--- a/server/internal/telemetry/crud.go
+++ b/server/internal/telemetry/crud.go
@@ -78,8 +78,6 @@ func buildTelemetryLogParams(params LogParams) (*repo.InsertTelemetryLogParams,
observedTimeUnixNano := time.Now().UnixNano()
allAttrs[attr.ObservedTimeUnixNanoKey] = observedTimeUnixNano
allAttrs[attr.TimeUnixNanoKey] = params.Timestamp.UnixNano()
-
- // Manually add service name, as it's always going to be gram server
allAttrs[attr.ServiceNameKey] = serviceName
spanAttrs, resourceAttrs, err := parseAttributes(allAttrs)
diff --git a/server/internal/telemetry/impl.go b/server/internal/telemetry/impl.go
index 5f5e72119..3aa5510ec 100644
--- a/server/internal/telemetry/impl.go
+++ b/server/internal/telemetry/impl.go
@@ -246,7 +246,7 @@ func (s *Service) SearchToolCalls(ctx context.Context, payload *telem_gen.Search
}
// Query with limit+1 to detect if there are more results
- items, err := s.chRepo.ListTraces(ctx, repo.ListTracesParams{
+ items, err := s.chRepo.ListToolTraces(ctx, repo.ListToolTracesParams{
GramProjectID: params.projectID,
TimeStart: params.timeStart,
TimeEnd: params.timeEnd,
@@ -258,6 +258,7 @@ func (s *Service) SearchToolCalls(ctx context.Context, payload *telem_gen.Search
Limit: params.limit + 1,
})
if err != nil {
+ s.logger.ErrorContext(ctx, "error listing tool traces", attr.SlogError(err))
return nil, oops.E(oops.CodeUnexpected, err, "error listing traces")
}
@@ -277,6 +278,9 @@ func (s *Service) SearchToolCalls(ctx context.Context, payload *telem_gen.Search
LogCount: item.LogCount,
HTTPStatusCode: item.HTTPStatusCode,
GramUrn: item.GramURN,
+ ToolName: item.ToolName,
+ ToolSource: item.ToolSource,
+ EventSource: item.EventSource,
}
}
diff --git a/server/internal/telemetry/repo/models.go b/server/internal/telemetry/repo/models.go
index cc769075e..812e9ff4f 100644
--- a/server/internal/telemetry/repo/models.go
+++ b/server/internal/telemetry/repo/models.go
@@ -69,11 +69,14 @@ type TelemetryLog struct {
// TraceSummary represents an aggregated view of a trace (one row per trace).
// Used for displaying a list of logs grouped by trace in the UI.
type TraceSummary struct {
- TraceID string `ch:"trace_id"` // FixedString(32)
- StartTimeUnixNano int64 `ch:"start_time_unix_nano"` // Int64 - earliest log timestamp
- LogCount uint64 `ch:"log_count"` // UInt64 - total logs in trace
- HTTPStatusCode *int32 `ch:"http_status_code"` // Nullable(Int32) - any HTTP status code
- GramURN string `ch:"gram_urn"` // String - any gram_urn from the trace
+ TraceID string `ch:"trace_id"` // FixedString(32)
+ StartTimeUnixNano int64 `ch:"start_time_unix_nano"` // Int64 - earliest log timestamp
+ LogCount uint64 `ch:"log_count"` // UInt64 - total logs in trace
+ HTTPStatusCode *int32 `ch:"http_status_code"` // Nullable(Int32) - any HTTP status code
+ GramURN string `ch:"gram_urn"` // String - any gram_urn from the trace
+ ToolName *string `ch:"tool_name"` // String - tool name from attributes
+ ToolSource *string `ch:"tool_source"` // String - tool call source
+ EventSource *string `ch:"event_source"` // String - event source
}
// ChatSummary represents an aggregated view of a chat session (one row per gram_chat_id).
diff --git a/server/internal/telemetry/repo/queries.sql.go b/server/internal/telemetry/repo/queries.sql.go
index 35e900e5a..f7161b987 100644
--- a/server/internal/telemetry/repo/queries.sql.go
+++ b/server/internal/telemetry/repo/queries.sql.go
@@ -263,8 +263,8 @@ func (q *Queries) ListTelemetryLogs(ctx context.Context, arg ListTelemetryLogsPa
return items, nil
}
-// ListTracesParams contains the parameters for listing traces.
-type ListTracesParams struct {
+// ListToolTracesParams contains the parameters for listing tool call traces.
+type ListToolTracesParams struct {
GramProjectID string
TimeStart int64
TimeEnd int64
@@ -276,7 +276,7 @@ type ListTracesParams struct {
Limit int
}
-// ListTraces retrieves aggregated trace summaries grouped by trace_id.
+// ListToolTraces retrieves aggregated trace summaries for tool calls (filtered to only include traces with tool_name set).
//
// Original SQL reference:
// SELECT trace_id, min(time_unix_nano), count(*), ... FROM telemetry_logs
@@ -284,13 +284,16 @@ type ListTracesParams struct {
// [+ optional filters] GROUP BY trace_id ORDER BY start_time_unix_nano LIMIT ?
//
//nolint:errcheck,wrapcheck // Replicating SQLC syntax which doesn't comply to this lint rule
-func (q *Queries) ListTraces(ctx context.Context, arg ListTracesParams) ([]TraceSummary, error) {
+func (q *Queries) ListToolTraces(ctx context.Context, arg ListToolTracesParams) ([]TraceSummary, error) {
sb := sq.Select(
"trace_id",
"min(start_time_unix_nano) as start_time_unix_nano",
"sum(log_count) as log_count",
"anyIfMerge(http_status_code) as http_status_code",
"any(gram_urn) as gram_urn",
+ "any(tool_name) as tool_name",
+ "any(tool_source) as tool_source",
+ "any(event_source) as event_source",
).
From("trace_summaries").
Where("gram_project_id = ?", arg.GramProjectID).
@@ -305,11 +308,14 @@ func (q *Queries) ListTraces(ctx context.Context, arg ListTracesParams) ([]Trace
sb = sb.Where("gram_function_id = toUUIDOrNull(?)", arg.GramFunctionID)
}
- // URN filter must use HAVING because gram_urn in SELECT is aliased to any(gram_urn),
+ // URN and tool_name filters must use HAVING because they are aggregate functions in SELECT,
// and ClickHouse resolves aliases in WHERE, which would create an invalid aggregate-in-WHERE.
if arg.GramURN != "" {
sb = sb.Having("position(gram_urn, ?) > 0", arg.GramURN)
}
+ // Only include traces with tool_name set OR gram_urn starting with "tools:"
+ // The urn check is mainly for backwards compatibility with old data.
+ sb = sb.Having("(tool_name IS NOT NULL AND tool_name != '') OR startsWith(gram_urn, 'tools:')")
// Exclude chat completion logs (urn:uuid:...) which are not tool calls.
// The trace_summaries_mv filters these at insert time via a WHERE clause,
@@ -337,7 +343,7 @@ func (q *Queries) ListTraces(ctx context.Context, arg ListTracesParams) ([]Trace
query, args, err := sb.ToSql()
if err != nil {
- return nil, fmt.Errorf("building list traces query: %w", err)
+ return nil, fmt.Errorf("building list tool traces query: %w", err)
}
rows, err := q.conn.Query(ctx, query, args...)
diff --git a/server/internal/telemetry/search_logs_test.go b/server/internal/telemetry/search_logs_test.go
index 34474a6ff..2f493d22b 100644
--- a/server/internal/telemetry/search_logs_test.go
+++ b/server/internal/telemetry/search_logs_test.go
@@ -1311,3 +1311,10 @@ func insertTelemetryLogWithParams(t *testing.T, ctx context.Context, params test
params.serviceName, nil)
require.NoError(t, err)
}
+
+// ptr returns a pointer to the given value
+//
+//go:fix inline
+func ptr[T any](v T) *T {
+ return new(v)
+}
diff --git a/server/internal/telemetry/stub.go b/server/internal/telemetry/stub.go
index bb04c5c70..ceebfa68a 100644
--- a/server/internal/telemetry/stub.go
+++ b/server/internal/telemetry/stub.go
@@ -12,7 +12,7 @@ func (n *StubToolMetricsClient) ListTelemetryLogs(_ context.Context, _ repo.List
return nil, nil
}
-func (n *StubToolMetricsClient) ListTraces(_ context.Context, _ repo.ListTracesParams) ([]repo.TraceSummary, error) {
+func (n *StubToolMetricsClient) ListToolTraces(_ context.Context, _ repo.ListToolTracesParams) ([]repo.TraceSummary, error) {
return nil, nil
}
diff --git a/server/internal/telemetry/telemetry.go b/server/internal/telemetry/telemetry.go
index 13944e0d7..a4c83bc3e 100644
--- a/server/internal/telemetry/telemetry.go
+++ b/server/internal/telemetry/telemetry.go
@@ -4,6 +4,7 @@ import (
"context"
"github.com/speakeasy-api/gram/server/internal/attr"
+ "github.com/speakeasy-api/gram/server/internal/urn"
)
// EventSource identifies the type of event that generated a telemetry log.
@@ -14,6 +15,7 @@ const (
EventSourceChatCompletion EventSource = "chat_completion"
EventSourceEvaluation EventSource = "evaluation"
EventSourceResourceRead EventSource = "resource_read"
+ EventSourceHook EventSource = "hook"
)
// PosthogClient defines the interface for capturing events in PostHog.
@@ -39,10 +41,16 @@ func (t ToolInfo) AsAttributes() map[attr.Key]any {
attrs := map[attr.Key]any{
attr.ToolURNKey: t.URN,
attr.NameKey: t.Name,
+ attr.ToolNameKey: t.Name,
attr.ProjectIDKey: t.ProjectID,
attr.OrganizationIDKey: t.OrganizationID,
}
+ parsedURN, err := urn.ParseTool(t.URN)
+ if err == nil {
+ attrs[attr.ToolCallSourceKey] = parsedURN.Source
+ }
+
if t.DeploymentID != "" {
attrs[attr.DeploymentIDKey] = t.DeploymentID
}
diff --git a/server/internal/thirdparty/openrouter/unified_client_test.go b/server/internal/thirdparty/openrouter/unified_client_test.go
index d64c28005..c3aefcf1c 100644
--- a/server/internal/thirdparty/openrouter/unified_client_test.go
+++ b/server/internal/thirdparty/openrouter/unified_client_test.go
@@ -626,7 +626,7 @@ func TestChatClient_MultipleCompletions_TitleAndResolutionScheduling(t *testing.
}
// Make multiple completions
- for i := 0; i < 3; i++ {
+ for range 3 {
_, err := client.GetCompletion(context.Background(), req)
require.NoError(t, err)
}
@@ -648,9 +648,9 @@ func TestChatClient_MultipleCompletions_TitleAndResolutionScheduling(t *testing.
// trackingTitleGenerator records every ScheduleChatTitleGeneration call with its chatID.
type trackingTitleGenerator struct {
- mu sync.Mutex
- calls []string // chatIDs for each call
- err error
+ mu sync.Mutex
+ calls []string // chatIDs for each call
+ err error
}
func (m *trackingTitleGenerator) ScheduleChatTitleGeneration(ctx context.Context, chatID, orgID, projectID string) error {
@@ -816,7 +816,7 @@ func TestChatClient_TitleGeneration_ScheduledPerCompletionWithValidChatID(t *tes
projectID := uuid.New()
// Three completions with a valid ChatID
- for i := 0; i < 3; i++ {
+ for range 3 {
_, err := client.GetCompletion(context.Background(), CompletionRequest{
OrgID: "test-org",
ProjectID: projectID.String(),
@@ -903,9 +903,9 @@ func TestChatClient_ReloadChat_NoDuplicateMessages(t *testing.T) {
OrgID: "test-org",
ProjectID: projectID.String(),
Messages: []or.Message{
- CreateMessageUser("Hello"), // from history
- CreateMessageAssistant("Response 1"), // from history
- CreateMessageUser("How are you?"), // new user message
+ CreateMessageUser("Hello"), // from history
+ CreateMessageAssistant("Response 1"), // from history
+ CreateMessageUser("How are you?"), // new user message
},
ChatID: chatID,
UsageSource: billing.ModelUsageSourcePlayground,
@@ -933,10 +933,10 @@ func TestChatClient_ReloadChat_NoDuplicateMessages(t *testing.T) {
"assistant messages should never be re-stored by StartOrResumeChat on reload")
// Verify the exact sequence of stored messages
- require.Equal(t, "user", tracker.storedMessages[0].role) // round 1: user
- require.Equal(t, "assistant", tracker.storedMessages[1].role) // round 1: assistant response
- require.Equal(t, "user", tracker.storedMessages[2].role) // round 2: new user message only
- require.Equal(t, "assistant", tracker.storedMessages[3].role) // round 2: assistant response
+ require.Equal(t, "user", tracker.storedMessages[0].role) // round 1: user
+ require.Equal(t, "assistant", tracker.storedMessages[1].role) // round 1: assistant response
+ require.Equal(t, "user", tracker.storedMessages[2].role) // round 2: new user message only
+ require.Equal(t, "assistant", tracker.storedMessages[3].role) // round 2: assistant response
}
// testTransport is a custom http.RoundTripper that redirects all requests to the test server
diff --git a/server/internal/thirdparty/openrouter/utils.go b/server/internal/thirdparty/openrouter/utils.go
index 812028ed7..4e371320a 100644
--- a/server/internal/thirdparty/openrouter/utils.go
+++ b/server/internal/thirdparty/openrouter/utils.go
@@ -12,9 +12,9 @@ func CreateMessageUser(content string) or.Message {
Content: or.CreateUserMessageContentStr(content),
Name: nil,
},
- SystemMessage: nil,
- MessageDeveloper: nil,
- AssistantMessage: nil,
+ SystemMessage: nil,
+ MessageDeveloper: nil,
+ AssistantMessage: nil,
ToolResponseMessage: nil,
}
}
@@ -39,9 +39,9 @@ func CreateMessageSystem(content string) or.Message {
Content: or.CreateSystemMessageContentStr(content),
Name: nil,
},
- UserMessage: nil,
- MessageDeveloper: nil,
- AssistantMessage: nil,
+ UserMessage: nil,
+ MessageDeveloper: nil,
+ AssistantMessage: nil,
ToolResponseMessage: nil,
}
}