From fccdbf417908bab8026669f5047bfed5f4f8aca4 Mon Sep 17 00:00:00 2001 From: Sagar Batchu Date: Sat, 7 Mar 2026 18:32:21 -0800 Subject: [PATCH 1/2] feat: two-layer rate limiting for MCP servers Add platform-level and customer-configurable rate limiting for MCP endpoints. Layer 1 (platform): HTTP middleware returns 429 for all MCP POST requests, keyed on MCP slug extracted from URL path. Uses Redis fixed-window counter with configurable per-slug overrides cached from platform_rate_limits table. Layer 2 (customer): Per-MCP-server rate limit via rate_limit_rpm column on toolsets table. Returns JSON-RPC error -32029 (not HTTP 429) to maintain MCP protocol compatibility. Reads from already-loaded toolset data (no extra DB query). Both layers fail open when Redis is unavailable. Includes OTel counters for observability and standard rate limit response headers. Co-Authored-By: Claude Opus 4.6 --- server/cmd/gram/start.go | 7 +- server/database/schema.sql | 14 ++ server/database/sqlc.yaml | 10 + server/design/shared/toolset.go | 8 + server/design/toolsets/design.go | 4 + server/gen/http/cli/gram/cli.go | 2 +- server/gen/http/openapi3.json | 2 +- server/gen/http/openapi3.yaml | 24 +++ server/gen/http/toolsets/client/cli.go | 13 +- .../gen/http/toolsets/client/encode_decode.go | 1 + server/gen/http/toolsets/client/types.go | 115 +++++++++++ .../gen/http/toolsets/server/encode_decode.go | 1 + server/gen/http/toolsets/server/types.go | 45 +++++ server/gen/toolsets/service.go | 5 +- server/gen/types/toolset.go | 3 + server/gen/types/toolset_entry.go | 3 + server/internal/attr/conventions.go | 5 + server/internal/database/models.go | 10 + server/internal/mcp/impl.go | 20 ++ server/internal/mcp/metrics.go | 37 +++- server/internal/mcp/ratelimit.go | 100 ++++++++++ server/internal/mcp/rpc.go | 15 +- server/internal/mcp/setup_test.go | 4 +- server/internal/middleware/ratelimit.go | 178 ++++++++++++++++++ server/internal/middleware/ratelimit_test.go | 52 +++++ server/internal/ratelimit/config.go | 98 ++++++++++ server/internal/ratelimit/headers.go | 21 +++ server/internal/ratelimit/queries.sql | 26 +++ server/internal/ratelimit/ratelimit.go | 80 ++++++++ server/internal/ratelimit/repo/db.go | 32 ++++ server/internal/ratelimit/repo/models.go | 19 ++ server/internal/ratelimit/repo/queries.sql.go | 117 ++++++++++++ server/internal/toolsets/queries.sql | 1 + server/internal/toolsets/repo/models.go | 1 + server/internal/toolsets/repo/queries.sql.go | 48 +++-- .../20260307032453_rate-limiting.sql | 15 ++ server/migrations/atlas.sum | 3 +- 37 files changed, 1106 insertions(+), 33 deletions(-) create mode 100644 server/internal/mcp/ratelimit.go create mode 100644 server/internal/middleware/ratelimit.go create mode 100644 server/internal/middleware/ratelimit_test.go create mode 100644 server/internal/ratelimit/config.go create mode 100644 server/internal/ratelimit/headers.go create mode 100644 server/internal/ratelimit/queries.sql create mode 100644 server/internal/ratelimit/ratelimit.go create mode 100644 server/internal/ratelimit/repo/db.go create mode 100644 server/internal/ratelimit/repo/models.go create mode 100644 server/internal/ratelimit/repo/queries.sql.go create mode 100644 server/migrations/20260307032453_rate-limiting.sql diff --git a/server/cmd/gram/start.go b/server/cmd/gram/start.go index 034e13797e..d69e36e4bb 100644 --- a/server/cmd/gram/start.go +++ b/server/cmd/gram/start.go @@ -25,6 +25,7 @@ import ( "github.com/speakeasy-api/gram/server/internal/productfeatures" "github.com/speakeasy-api/gram/server/internal/rag" + "github.com/speakeasy-api/gram/server/internal/ratelimit" "github.com/speakeasy-api/gram/server/internal/about" "github.com/speakeasy-api/gram/server/internal/agentworkflows" @@ -652,10 +653,14 @@ func newStartCommand() *cli.Command { return fmt.Errorf("failed to create mcp registry client: %w", err) } + rateLimiter := ratelimit.New(redisClient, logger) + rateLimitConfigLoader := ratelimit.NewConfigLoader(logger, db, cache.NewRedisCacheAdapter(redisClient)) + mux := goahttp.NewMuxer() mux.Use(func(h http.Handler) http.Handler { return otelhttp.NewHandler(h, "http", otelhttp.WithServerName("gram")) }) + mux.Use(middleware.RateLimitMiddleware(rateLimiter, rateLimitConfigLoader, logger)) mux.Use(middleware.CORSMiddleware(c.String("environment"), c.String("server-url"), chatSessionsManager)) mux.Use(middleware.NewHTTPLoggingMiddleware(logger)) mux.Use(customdomains.Middleware(logger, db, c.String("environment"), serverURL)) @@ -700,7 +705,7 @@ func newStartCommand() *cli.Command { mcpMetadataService := mcpmetadata.NewService(logger, db, sessionManager, serverURL, siteURL, cache.NewRedisCacheAdapter(redisClient)) mcpmetadata.Attach(mux, mcpMetadataService) externalmcp.Attach(mux, externalmcp.NewService(logger, tracerProvider, db, sessionManager, mcpRegistryClient)) - mcp.Attach(mux, mcp.NewService(logger, tracerProvider, meterProvider, db, sessionManager, chatSessionsManager, env, posthogClient, serverURL, encryptionClient, cache.NewRedisCacheAdapter(redisClient), guardianPolicy, functionsOrchestrator, oauthService, billingTracker, billingRepo, telemSvc, productFeatures, ragService, temporalEnv), mcpMetadataService) + mcp.Attach(mux, mcp.NewService(logger, tracerProvider, meterProvider, db, sessionManager, chatSessionsManager, env, posthogClient, serverURL, encryptionClient, cache.NewRedisCacheAdapter(redisClient), guardianPolicy, functionsOrchestrator, oauthService, billingTracker, billingRepo, telemSvc, productFeatures, ragService, temporalEnv, rateLimiter), mcpMetadataService) chat.Attach(mux, chat.NewService(logger, db, sessionManager, chatSessionsManager, openRouter, chatClient, posthogClient, telemSvc, assetStorage)) variations.Attach(mux, variations.NewService(logger, db, sessionManager)) customdomains.Attach(mux, customdomains.NewService(logger, db, sessionManager, &background.CustomDomainRegistrationClient{TemporalEnv: temporalEnv})) diff --git a/server/database/schema.sql b/server/database/schema.sql index d1ce389333..c5e981c187 100644 --- a/server/database/schema.sql +++ b/server/database/schema.sql @@ -634,6 +634,7 @@ CREATE TABLE IF NOT EXISTS toolsets ( ), mcp_is_public BOOLEAN NOT NULL DEFAULT FALSE, mcp_enabled BOOLEAN NOT NULL DEFAULT FALSE, + rate_limit_rpm integer, tool_selection_mode TEXT NOT NULL DEFAULT 'static', custom_domain_id uuid, @@ -1477,3 +1478,16 @@ WHERE deleted IS FALSE AND status = 'pending'; -- Index for looking up invites by token (unconditional to prevent token reuse) CREATE UNIQUE INDEX IF NOT EXISTS team_invites_token_key ON team_invites (token); + +-- Platform-level rate limit overrides for Gram operators +CREATE TABLE IF NOT EXISTS platform_rate_limits ( + id uuid PRIMARY KEY DEFAULT gen_random_uuid(), + attribute_type text NOT NULL, + attribute_value text NOT NULL, + requests_per_minute integer NOT NULL, + created_at timestamptz NOT NULL DEFAULT clock_timestamp(), + updated_at timestamptz NOT NULL DEFAULT clock_timestamp(), + CONSTRAINT platform_rate_limits_attribute_type_value_key UNIQUE (attribute_type, attribute_value), + CONSTRAINT platform_rate_limits_attribute_type_check CHECK (attribute_type IN ('mcp_slug', 'project', 'organization')), + CONSTRAINT platform_rate_limits_requests_per_minute_check CHECK (requests_per_minute > 0) +); diff --git a/server/database/sqlc.yaml b/server/database/sqlc.yaml index 872a526a6a..8072054ffe 100644 --- a/server/database/sqlc.yaml +++ b/server/database/sqlc.yaml @@ -385,3 +385,13 @@ sql: out: "../internal/externalmcp/repo" sql_package: "pgx/v5" omit_unused_structs: true + + - schema: schema.sql + queries: ../internal/ratelimit/queries.sql + engine: postgresql + gen: + go: + package: "repo" + out: "../internal/ratelimit/repo" + sql_package: "pgx/v5" + omit_unused_structs: true diff --git a/server/design/shared/toolset.go b/server/design/shared/toolset.go index ea68d578d9..684ab3f169 100644 --- a/server/design/shared/toolset.go +++ b/server/design/shared/toolset.go @@ -84,6 +84,10 @@ var Toolset = Type("Toolset", func() { Attribute("mcp_enabled", Boolean, "Whether the toolset is enabled for MCP") Attribute("tool_selection_mode", String, "The mode to use for tool selection") Attribute("custom_domain_id", String, "The ID of the custom domain to use for the toolset") + Attribute("rate_limit_rpm", Int, "Maximum requests per minute for this MCP server. When set, requests exceeding this limit receive a rate limit error.", func() { + Minimum(1) + Maximum(10000) + }) Attribute("external_oauth_server", ExternalOAuthServer, "The external OAuth server details") Attribute("oauth_proxy_server", OAuthProxyServer, "The OAuth proxy server details") Attribute("created_at", String, func() { @@ -122,6 +126,10 @@ var ToolsetEntry = Type("ToolsetEntry", func() { Attribute("mcp_enabled", Boolean, "Whether the toolset is enabled for MCP") Attribute("tool_selection_mode", String, "The mode to use for tool selection") Attribute("custom_domain_id", String, "The ID of the custom domain to use for the toolset") + Attribute("rate_limit_rpm", Int, "Maximum requests per minute for this MCP server. When set, requests exceeding this limit receive a rate limit error.", func() { + Minimum(1) + Maximum(10000) + }) Attribute("created_at", String, func() { Description("When the toolset was created.") Format(FormatDateTime) diff --git a/server/design/toolsets/design.go b/server/design/toolsets/design.go index 87cf44f419..7725d07b17 100644 --- a/server/design/toolsets/design.go +++ b/server/design/toolsets/design.go @@ -301,6 +301,10 @@ var UpdateToolsetForm = Type("UpdateToolsetForm", func() { Attribute("mcp_is_public", Boolean, "Whether the toolset is public in MCP") Attribute("custom_domain_id", String, "The ID of the custom domain to use for the toolset") Attribute("tool_selection_mode", String, "The mode to use for tool selection") + Attribute("rate_limit_rpm", Int, "Maximum requests per minute for this MCP server. When set, requests exceeding this limit receive a rate limit error.", func() { + Minimum(1) + Maximum(10000) + }) security.ProjectPayload() Required("slug") }) diff --git a/server/gen/http/cli/gram/cli.go b/server/gen/http/cli/gram/cli.go index 5d91b71a9e..9c6332b71a 100644 --- a/server/gen/http/cli/gram/cli.go +++ b/server/gen/http/cli/gram/cli.go @@ -4932,7 +4932,7 @@ func toolsetsUpdateToolsetUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "toolsets update-toolset --body '{\n \"custom_domain_id\": \"abc123\",\n \"default_environment_slug\": \"aaa\",\n \"description\": \"abc123\",\n \"mcp_enabled\": false,\n \"mcp_is_public\": false,\n \"mcp_slug\": \"aaa\",\n \"name\": \"abc123\",\n \"prompt_template_names\": [\n \"abc123\"\n ],\n \"resource_urns\": [\n \"abc123\"\n ],\n \"tool_selection_mode\": \"abc123\",\n \"tool_urns\": [\n \"abc123\"\n ]\n }' --slug \"aaa\" --session-token \"abc123\" --apikey-token \"abc123\" --project-slug-input \"abc123\"") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "toolsets update-toolset --body '{\n \"custom_domain_id\": \"abc123\",\n \"default_environment_slug\": \"aaa\",\n \"description\": \"abc123\",\n \"mcp_enabled\": false,\n \"mcp_is_public\": false,\n \"mcp_slug\": \"aaa\",\n \"name\": \"abc123\",\n \"prompt_template_names\": [\n \"abc123\"\n ],\n \"rate_limit_rpm\": 2,\n \"resource_urns\": [\n \"abc123\"\n ],\n \"tool_selection_mode\": \"abc123\",\n \"tool_urns\": [\n \"abc123\"\n ]\n }' --slug \"aaa\" --session-token \"abc123\" --apikey-token \"abc123\" --project-slug-input \"abc123\"") } func toolsetsDeleteToolsetUsage() { diff --git a/server/gen/http/openapi3.json b/server/gen/http/openapi3.json index f05a404ec2..229c994905 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":"https://app.getgram.ai"}],"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.getServerDetails":{"get":{"description":"Get detailed information about an MCP server including remotes","operationId":"getMCPServerDetails","parameters":[{"allowEmptyValue":true,"description":"ID of the registry","in":"query","name":"registry_id","required":true,"schema":{"description":"ID of the registry","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Server specifier (e.g., 'io.github.user/server')","in":"query","name":"server_specifier","required":true,"schema":{"description":"Server specifier (e.g., 'io.github.user/server')","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/ExternalMCPServer"}}},"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":"getServerDetails mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"getServerDetails"}},"/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.get":{"get":{"description":"Get the current state of all product feature flags.","operationId":"getProductFeatures","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/GramProductFeatures"}}},"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":"getProductFeatures features","tags":["features"],"x-speakeasy-name-override":"get"}},"/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-apps.configure":{"post":{"description":"Store Slack credentials (client ID, client secret, signing secret) for an app.","operationId":"configureSlackApp","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/ConfigureSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppResult"}}},"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":"configureSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"configureSlackApp","x-speakeasy-react-hook":{"name":"configureSlackApp"}}},"/rpc/slack-apps.create":{"post":{"description":"Create a new Slack app and generate its manifest.","operationId":"createSlackApp","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/CreateSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSlackAppResult"}}},"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":"createSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"createSlackApp","x-speakeasy-react-hook":{"name":"createSlackApp"}}},"/rpc/slack-apps.delete":{"delete":{"description":"Soft-delete a Slack app.","operationId":"deleteSlackApp","parameters":[{"allowEmptyValue":true,"description":"The Slack app ID","in":"query","name":"id","required":true,"schema":{"description":"The Slack app ID","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":{"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":"deleteSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"deleteSlackApp","x-speakeasy-react-hook":{"name":"deleteSlackApp"}}},"/rpc/slack-apps.get":{"get":{"description":"Get details of a specific Slack app.","operationId":"getSlackApp","parameters":[{"allowEmptyValue":true,"description":"The Slack app ID","in":"query","name":"id","required":true,"schema":{"description":"The Slack app ID","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/SlackAppResult"}}},"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":"getSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"getSlackApp","x-speakeasy-react-hook":{"name":"getSlackApp"}}},"/rpc/slack-apps.list":{"get":{"description":"List Slack apps for a project.","operationId":"listSlackApps","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/ListSlackAppsResult"}}},"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":"listSlackApps slack","tags":["slack"],"x-speakeasy-name-override":"listSlackApps","x-speakeasy-react-hook":{"name":"listSlackApps"}}},"/rpc/slack-apps.update":{"put":{"description":"Update a Slack app's settings.","operationId":"updateSlackApp","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/UpdateSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppResult"}}},"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":"updateSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"updateSlackApp","x-speakeasy-react-hook":{"name":"updateSlackApp"}}},"/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.getHooksSummary":{"post":{"description":"Get aggregated hooks metrics grouped by server","operationId":"getHooksSummary","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/GetHooksSummaryResult"}}},"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":"getHooksSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getHooksSummary","x-speakeasy-react-hook":{"name":"GetHooksSummary","type":"query"}}},"/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":[]}]}}},"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"},"selected_remotes":{"type":"array","items":{"type":"string"},"description":"URLs of the remotes to use for this MCP server. If not provided, the backend will auto-select based on transport type preference.","example":["https://mcp.example.com/sse"]},"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":"string","description":"Latest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"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":"string","description":"Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"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"]},"ClaudeHookPayload":{"type":"object","properties":{"additional_data":{"type":"object","description":"Additional hook-specific data","additionalProperties":true},"hook_event_name":{"type":"string","description":"The type of hook event","enum":["SessionStart","PreToolUse","PostToolUse","PostToolUseFailure"]},"session_id":{"type":"string","description":"The Claude Code session ID"},"tool_error":{"description":"The error from the tool (PostToolUseFailure only)"},"tool_input":{"description":"The input to the tool"},"tool_name":{"type":"string","description":"The name of the tool (for tool-related events)"},"tool_response":{"description":"The response from the tool (PostToolUse only)"},"tool_use_id":{"type":"string","description":"The unique ID for this tool use"}},"description":"Unified payload for all Claude Code hook events","required":["hook_event_name"]},"ClaudeHookResult":{"type":"object","properties":{"continue":{"type":"boolean","description":"Whether to continue (SessionStart only)"},"hookSpecificOutput":{"description":"Hook-specific output as JSON object"},"stopReason":{"type":"string","description":"Reason if blocked (SessionStart only)"}},"description":"Unified result for all Claude Code hook events with proper response structure"},"ConfigureSlackAppRequestBody":{"type":"object","properties":{"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"slack_client_id":{"type":"string","description":"Slack app Client ID"},"slack_client_secret":{"type":"string","description":"Slack app Client Secret"},"slack_signing_secret":{"type":"string","description":"Slack app Signing Secret"}},"required":["id","slack_client_id","slack_client_secret","slack_signing_secret"]},"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"]},"CreateSlackAppRequestBody":{"type":"object","properties":{"icon_asset_id":{"type":"string","description":"Asset ID for the app icon","format":"uuid"},"name":{"type":"string","description":"Display name for the Slack app","minLength":1,"maxLength":36},"system_prompt":{"type":"string","description":"System prompt for the Slack app"},"toolset_ids":{"type":"array","items":{"type":"string"},"description":"Toolset IDs to attach to this app"}},"required":["name","toolset_ids"]},"CreateSlackAppResult":{"type":"object","properties":{"app":{"$ref":"#/components/schemas/SlackAppResult"}},"required":["app"]},"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"]},"ExternalMCPRemote":{"type":"object","properties":{"transport_type":{"type":"string","description":"Transport type (sse or streamable-http)","enum":["sse","streamable-http"]},"url":{"type":"string","description":"URL of the remote endpoint","format":"uri"}},"description":"A remote endpoint for an MCP server","required":["url","transport_type"]},"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"},"remotes":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPRemote"},"description":"Available remote endpoints for the server"},"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"]},"GetHooksSummaryPayload":{"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 aggregated hooks metrics","required":["from","to"]},"GetHooksSummaryResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/HooksServerSummary"},"description":"Aggregated metrics grouped by server"},"total_events":{"type":"integer","description":"Total number of hook events","format":"int64"},"total_sessions":{"type":"integer","description":"Total number of unique sessions","format":"int64"}},"description":"Result of hooks summary query","required":["servers","total_events","total_sessions","enabled"]},"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"]},"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"]},"GramProductFeatures":{"type":"object","properties":{"logs_enabled":{"type":"boolean","description":"Whether logging is enabled"},"tool_io_logs_enabled":{"type":"boolean","description":"Whether tool I/O logging is enabled"}},"description":"Current state of product feature flags","required":["logs_enabled","tool_io_logs_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"]},"HooksServerSummary":{"type":"object","properties":{"event_count":{"type":"integer","description":"Total number of hook events for this server","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed tool completions (PostToolUseFailure events)","format":"int64"},"failure_rate":{"type":"number","description":"Failure rate as a decimal (0.0 to 1.0)","format":"double"},"server_name":{"type":"string","description":"Server name (extracted from tool name, or 'local' for non-MCP tools)"},"success_count":{"type":"integer","description":"Number of successful tool completions (PostToolUse events)","format":"int64"},"unique_tools":{"type":"integer","description":"Number of unique tools used for this server","format":"int64"}},"description":"Aggregated hooks metrics for a single server","required":["server_name","event_count","unique_tools","success_count","failure_count","failure_rate"]},"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"]},"ListSlackAppsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SlackAppResult"},"description":"List of Slack apps"}},"required":["items"]},"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"},"event_source":{"type":"string","description":"Event source filter (e.g., 'hook', 'tool_call', 'chat_completion')"},"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"},"event_source":{"type":"string","description":"Event source filter (e.g., 'hook', 'tool_call', 'chat_completion')"},"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"]},"SlackAppResult":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"icon_asset_id":{"type":"string","description":"Asset ID for the app icon"},"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"name":{"type":"string","description":"Display name of the Slack app"},"redirect_url":{"type":"string","description":"OAuth callback URL for this app"},"request_url":{"type":"string","description":"Event subscription URL for this app"},"slack_client_id":{"type":"string","description":"The Slack app Client ID"},"slack_team_id":{"type":"string","description":"The connected Slack workspace ID"},"slack_team_name":{"type":"string","description":"The connected Slack workspace name"},"status":{"type":"string","description":"Current status: unconfigured, active"},"system_prompt":{"type":"string","description":"System prompt for the Slack app"},"toolset_ids":{"type":"array","items":{"type":"string"},"description":"Attached toolset IDs"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","status","toolset_ids","created_at","updated_at"]},"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":"string","description":"Unix time in nanoseconds when event was observed (string for JS int64 precision)"},"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":"string","description":"Unix time in nanoseconds when event occurred (string for JS int64 precision)"},"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":"string","description":"Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"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"]},"UpdateSlackAppRequestBody":{"type":"object","properties":{"icon_asset_id":{"type":"string","description":"Asset ID for the app icon","format":"uuid"},"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"name":{"type":"string","description":"New display name for the Slack app","minLength":1,"maxLength":36},"system_prompt":{"type":"string","description":"System prompt for the Slack app"}},"required":["id"]},"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"},"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":"https://app.getgram.ai"}],"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.getServerDetails":{"get":{"description":"Get detailed information about an MCP server including remotes","operationId":"getMCPServerDetails","parameters":[{"allowEmptyValue":true,"description":"ID of the registry","in":"query","name":"registry_id","required":true,"schema":{"description":"ID of the registry","format":"uuid","type":"string"}},{"allowEmptyValue":true,"description":"Server specifier (e.g., 'io.github.user/server')","in":"query","name":"server_specifier","required":true,"schema":{"description":"Server specifier (e.g., 'io.github.user/server')","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/ExternalMCPServer"}}},"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":"getServerDetails mcpRegistries","tags":["mcpRegistries"],"x-speakeasy-name-override":"getServerDetails"}},"/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.get":{"get":{"description":"Get the current state of all product feature flags.","operationId":"getProductFeatures","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/GramProductFeatures"}}},"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":"getProductFeatures features","tags":["features"],"x-speakeasy-name-override":"get"}},"/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-apps.configure":{"post":{"description":"Store Slack credentials (client ID, client secret, signing secret) for an app.","operationId":"configureSlackApp","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/ConfigureSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppResult"}}},"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":"configureSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"configureSlackApp","x-speakeasy-react-hook":{"name":"configureSlackApp"}}},"/rpc/slack-apps.create":{"post":{"description":"Create a new Slack app and generate its manifest.","operationId":"createSlackApp","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/CreateSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSlackAppResult"}}},"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":"createSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"createSlackApp","x-speakeasy-react-hook":{"name":"createSlackApp"}}},"/rpc/slack-apps.delete":{"delete":{"description":"Soft-delete a Slack app.","operationId":"deleteSlackApp","parameters":[{"allowEmptyValue":true,"description":"The Slack app ID","in":"query","name":"id","required":true,"schema":{"description":"The Slack app ID","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":{"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":"deleteSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"deleteSlackApp","x-speakeasy-react-hook":{"name":"deleteSlackApp"}}},"/rpc/slack-apps.get":{"get":{"description":"Get details of a specific Slack app.","operationId":"getSlackApp","parameters":[{"allowEmptyValue":true,"description":"The Slack app ID","in":"query","name":"id","required":true,"schema":{"description":"The Slack app ID","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/SlackAppResult"}}},"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":"getSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"getSlackApp","x-speakeasy-react-hook":{"name":"getSlackApp"}}},"/rpc/slack-apps.list":{"get":{"description":"List Slack apps for a project.","operationId":"listSlackApps","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/ListSlackAppsResult"}}},"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":"listSlackApps slack","tags":["slack"],"x-speakeasy-name-override":"listSlackApps","x-speakeasy-react-hook":{"name":"listSlackApps"}}},"/rpc/slack-apps.update":{"put":{"description":"Update a Slack app's settings.","operationId":"updateSlackApp","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/UpdateSlackAppRequestBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAppResult"}}},"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":"updateSlackApp slack","tags":["slack"],"x-speakeasy-name-override":"updateSlackApp","x-speakeasy-react-hook":{"name":"updateSlackApp"}}},"/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.getHooksSummary":{"post":{"description":"Get aggregated hooks metrics grouped by server","operationId":"getHooksSummary","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/GetHooksSummaryResult"}}},"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":"getHooksSummary telemetry","tags":["telemetry"],"x-speakeasy-name-override":"getHooksSummary","x-speakeasy-react-hook":{"name":"GetHooksSummary","type":"query"}}},"/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":[]}]}}},"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"},"selected_remotes":{"type":"array","items":{"type":"string"},"description":"URLs of the remotes to use for this MCP server. If not provided, the backend will auto-select based on transport type preference.","example":["https://mcp.example.com/sse"]},"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":"string","description":"Latest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"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":"string","description":"Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"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"]},"ClaudeHookPayload":{"type":"object","properties":{"additional_data":{"type":"object","description":"Additional hook-specific data","additionalProperties":true},"hook_event_name":{"type":"string","description":"The type of hook event","enum":["SessionStart","PreToolUse","PostToolUse","PostToolUseFailure"]},"session_id":{"type":"string","description":"The Claude Code session ID"},"tool_error":{"description":"The error from the tool (PostToolUseFailure only)"},"tool_input":{"description":"The input to the tool"},"tool_name":{"type":"string","description":"The name of the tool (for tool-related events)"},"tool_response":{"description":"The response from the tool (PostToolUse only)"},"tool_use_id":{"type":"string","description":"The unique ID for this tool use"}},"description":"Unified payload for all Claude Code hook events","required":["hook_event_name"]},"ClaudeHookResult":{"type":"object","properties":{"continue":{"type":"boolean","description":"Whether to continue (SessionStart only)"},"hookSpecificOutput":{"description":"Hook-specific output as JSON object"},"stopReason":{"type":"string","description":"Reason if blocked (SessionStart only)"}},"description":"Unified result for all Claude Code hook events with proper response structure"},"ConfigureSlackAppRequestBody":{"type":"object","properties":{"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"slack_client_id":{"type":"string","description":"Slack app Client ID"},"slack_client_secret":{"type":"string","description":"Slack app Client Secret"},"slack_signing_secret":{"type":"string","description":"Slack app Signing Secret"}},"required":["id","slack_client_id","slack_client_secret","slack_signing_secret"]},"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"]},"CreateSlackAppRequestBody":{"type":"object","properties":{"icon_asset_id":{"type":"string","description":"Asset ID for the app icon","format":"uuid"},"name":{"type":"string","description":"Display name for the Slack app","minLength":1,"maxLength":36},"system_prompt":{"type":"string","description":"System prompt for the Slack app"},"toolset_ids":{"type":"array","items":{"type":"string"},"description":"Toolset IDs to attach to this app"}},"required":["name","toolset_ids"]},"CreateSlackAppResult":{"type":"object","properties":{"app":{"$ref":"#/components/schemas/SlackAppResult"}},"required":["app"]},"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"]},"ExternalMCPRemote":{"type":"object","properties":{"transport_type":{"type":"string","description":"Transport type (sse or streamable-http)","enum":["sse","streamable-http"]},"url":{"type":"string","description":"URL of the remote endpoint","format":"uri"}},"description":"A remote endpoint for an MCP server","required":["url","transport_type"]},"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"},"remotes":{"type":"array","items":{"$ref":"#/components/schemas/ExternalMCPRemote"},"description":"Available remote endpoints for the server"},"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"]},"GetHooksSummaryPayload":{"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 aggregated hooks metrics","required":["from","to"]},"GetHooksSummaryResult":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether telemetry is enabled for the organization"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/HooksServerSummary"},"description":"Aggregated metrics grouped by server"},"total_events":{"type":"integer","description":"Total number of hook events","format":"int64"},"total_sessions":{"type":"integer","description":"Total number of unique sessions","format":"int64"}},"description":"Result of hooks summary query","required":["servers","total_events","total_sessions","enabled"]},"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"]},"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"]},"GramProductFeatures":{"type":"object","properties":{"logs_enabled":{"type":"boolean","description":"Whether logging is enabled"},"tool_io_logs_enabled":{"type":"boolean","description":"Whether tool I/O logging is enabled"}},"description":"Current state of product feature flags","required":["logs_enabled","tool_io_logs_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"]},"HooksServerSummary":{"type":"object","properties":{"event_count":{"type":"integer","description":"Total number of hook events for this server","format":"int64"},"failure_count":{"type":"integer","description":"Number of failed tool completions (PostToolUseFailure events)","format":"int64"},"failure_rate":{"type":"number","description":"Failure rate as a decimal (0.0 to 1.0)","format":"double"},"server_name":{"type":"string","description":"Server name (extracted from tool name, or 'local' for non-MCP tools)"},"success_count":{"type":"integer","description":"Number of successful tool completions (PostToolUse events)","format":"int64"},"unique_tools":{"type":"integer","description":"Number of unique tools used for this server","format":"int64"}},"description":"Aggregated hooks metrics for a single server","required":["server_name","event_count","unique_tools","success_count","failure_count","failure_rate"]},"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"]},"ListSlackAppsResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SlackAppResult"},"description":"List of Slack apps"}},"required":["items"]},"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"},"event_source":{"type":"string","description":"Event source filter (e.g., 'hook', 'tool_call', 'chat_completion')"},"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"},"event_source":{"type":"string","description":"Event source filter (e.g., 'hook', 'tool_call', 'chat_completion')"},"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"]},"SlackAppResult":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"icon_asset_id":{"type":"string","description":"Asset ID for the app icon"},"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"name":{"type":"string","description":"Display name of the Slack app"},"redirect_url":{"type":"string","description":"OAuth callback URL for this app"},"request_url":{"type":"string","description":"Event subscription URL for this app"},"slack_client_id":{"type":"string","description":"The Slack app Client ID"},"slack_team_id":{"type":"string","description":"The connected Slack workspace ID"},"slack_team_name":{"type":"string","description":"The connected Slack workspace name"},"status":{"type":"string","description":"Current status: unconfigured, active"},"system_prompt":{"type":"string","description":"System prompt for the Slack app"},"toolset_ids":{"type":"array","items":{"type":"string"},"description":"Attached toolset IDs"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","status","toolset_ids","created_at","updated_at"]},"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":"string","description":"Unix time in nanoseconds when event was observed (string for JS int64 precision)"},"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":"string","description":"Unix time in nanoseconds when event occurred (string for JS int64 precision)"},"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":"string","description":"Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)"},"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"},"rate_limit_rpm":{"type":"integer","description":"Maximum requests per minute for this MCP server. When set, requests exceeding this limit receive a rate limit error.","format":"int64","minimum":1,"maximum":10000},"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"},"rate_limit_rpm":{"type":"integer","description":"Maximum requests per minute for this MCP server. When set, requests exceeding this limit receive a rate limit error.","format":"int64","minimum":1,"maximum":10000},"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"]},"UpdateSlackAppRequestBody":{"type":"object","properties":{"icon_asset_id":{"type":"string","description":"Asset ID for the app icon","format":"uuid"},"id":{"type":"string","description":"The Slack app ID","format":"uuid"},"name":{"type":"string","description":"New display name for the Slack app","minLength":1,"maxLength":36},"system_prompt":{"type":"string","description":"System prompt for the Slack app"}},"required":["id"]},"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)"},"rate_limit_rpm":{"type":"integer","description":"Maximum requests per minute for this MCP server. When set, requests exceeding this limit receive a rate limit error.","format":"int64","minimum":1,"maximum":10000},"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)"},"rate_limit_rpm":{"type":"integer","description":"Maximum requests per minute for this MCP server. When set, requests exceeding this limit receive a rate limit error.","format":"int64","minimum":1,"maximum":10000},"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"},"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 47929e7db6..0ffd30b0f7 100644 --- a/server/gen/http/openapi3.yaml +++ b/server/gen/http/openapi3.yaml @@ -17541,6 +17541,12 @@ components: items: $ref: '#/components/schemas/PromptTemplate' description: 'The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts' + rate_limit_rpm: + type: integer + description: Maximum requests per minute for this MCP server. When set, requests exceeding this limit receive a rate limit error. + format: int64 + minimum: 1 + maximum: 10000 resource_urns: type: array items: @@ -17660,6 +17666,12 @@ components: items: $ref: '#/components/schemas/PromptTemplateEntry' description: 'The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts' + rate_limit_rpm: + type: integer + description: Maximum requests per minute for this MCP server. When set, requests exceeding this limit receive a rate limit error. + format: int64 + minimum: 1 + maximum: 10000 resource_urns: type: array items: @@ -17958,6 +17970,12 @@ components: items: type: string description: 'List of prompt template names to include (note: for actual prompts, not tools)' + rate_limit_rpm: + type: integer + description: Maximum requests per minute for this MCP server. When set, requests exceeding this limit receive a rate limit error. + format: int64 + minimum: 1 + maximum: 10000 resource_urns: type: array items: @@ -18011,6 +18029,12 @@ components: items: type: string description: 'List of prompt template names to include (note: for actual prompts, not tools)' + rate_limit_rpm: + type: integer + description: Maximum requests per minute for this MCP server. When set, requests exceeding this limit receive a rate limit error. + format: int64 + minimum: 1 + maximum: 10000 resource_urns: type: array items: diff --git a/server/gen/http/toolsets/client/cli.go b/server/gen/http/toolsets/client/cli.go index 2a3671082d..a4ecd3098f 100644 --- a/server/gen/http/toolsets/client/cli.go +++ b/server/gen/http/toolsets/client/cli.go @@ -121,7 +121,7 @@ func BuildUpdateToolsetPayload(toolsetsUpdateToolsetBody string, toolsetsUpdateT { err = json.Unmarshal([]byte(toolsetsUpdateToolsetBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"custom_domain_id\": \"abc123\",\n \"default_environment_slug\": \"aaa\",\n \"description\": \"abc123\",\n \"mcp_enabled\": false,\n \"mcp_is_public\": false,\n \"mcp_slug\": \"aaa\",\n \"name\": \"abc123\",\n \"prompt_template_names\": [\n \"abc123\"\n ],\n \"resource_urns\": [\n \"abc123\"\n ],\n \"tool_selection_mode\": \"abc123\",\n \"tool_urns\": [\n \"abc123\"\n ]\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"custom_domain_id\": \"abc123\",\n \"default_environment_slug\": \"aaa\",\n \"description\": \"abc123\",\n \"mcp_enabled\": false,\n \"mcp_is_public\": false,\n \"mcp_slug\": \"aaa\",\n \"name\": \"abc123\",\n \"prompt_template_names\": [\n \"abc123\"\n ],\n \"rate_limit_rpm\": 2,\n \"resource_urns\": [\n \"abc123\"\n ],\n \"tool_selection_mode\": \"abc123\",\n \"tool_urns\": [\n \"abc123\"\n ]\n }'") } if body.DefaultEnvironmentSlug != nil { err = goa.MergeErrors(err, goa.ValidatePattern("body.default_environment_slug", *body.DefaultEnvironmentSlug, "^[a-z0-9_-]{1,128}$")) @@ -139,6 +139,16 @@ func BuildUpdateToolsetPayload(toolsetsUpdateToolsetBody string, toolsetsUpdateT err = goa.MergeErrors(err, goa.InvalidLengthError("body.mcp_slug", *body.McpSlug, utf8.RuneCountInString(*body.McpSlug), 40, false)) } } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 1, true)) + } + } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm > 10000 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 10000, false)) + } + } if err != nil { return nil, err } @@ -179,6 +189,7 @@ func BuildUpdateToolsetPayload(toolsetsUpdateToolsetBody string, toolsetsUpdateT McpIsPublic: body.McpIsPublic, CustomDomainID: body.CustomDomainID, ToolSelectionMode: body.ToolSelectionMode, + RateLimitRpm: body.RateLimitRpm, } if body.DefaultEnvironmentSlug != nil { defaultEnvironmentSlug := types.Slug(*body.DefaultEnvironmentSlug) diff --git a/server/gen/http/toolsets/client/encode_decode.go b/server/gen/http/toolsets/client/encode_decode.go index 0407ba4c24..6fcce7954c 100644 --- a/server/gen/http/toolsets/client/encode_decode.go +++ b/server/gen/http/toolsets/client/encode_decode.go @@ -2978,6 +2978,7 @@ func unmarshalToolsetEntryResponseBodyToTypesToolsetEntry(v *ToolsetEntryRespons McpEnabled: v.McpEnabled, ToolSelectionMode: *v.ToolSelectionMode, CustomDomainID: v.CustomDomainID, + RateLimitRpm: v.RateLimitRpm, CreatedAt: *v.CreatedAt, UpdatedAt: *v.UpdatedAt, } diff --git a/server/gen/http/toolsets/client/types.go b/server/gen/http/toolsets/client/types.go index b9501057a6..94dae2b88b 100644 --- a/server/gen/http/toolsets/client/types.go +++ b/server/gen/http/toolsets/client/types.go @@ -56,6 +56,9 @@ type UpdateToolsetRequestBody struct { CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` // The mode to use for tool selection ToolSelectionMode *string `form:"tool_selection_mode,omitempty" json:"tool_selection_mode,omitempty" xml:"tool_selection_mode,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` } // AddExternalOAuthServerRequestBody is the type of the "toolsets" service @@ -124,6 +127,9 @@ type CreateToolsetResponseBody struct { ToolSelectionMode *string `form:"tool_selection_mode,omitempty" json:"tool_selection_mode,omitempty" xml:"tool_selection_mode,omitempty"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -193,6 +199,9 @@ type UpdateToolsetResponseBody struct { ToolSelectionMode *string `form:"tool_selection_mode,omitempty" json:"tool_selection_mode,omitempty" xml:"tool_selection_mode,omitempty"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -255,6 +264,9 @@ type GetToolsetResponseBody struct { ToolSelectionMode *string `form:"tool_selection_mode,omitempty" json:"tool_selection_mode,omitempty" xml:"tool_selection_mode,omitempty"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -317,6 +329,9 @@ type CloneToolsetResponseBody struct { ToolSelectionMode *string `form:"tool_selection_mode,omitempty" json:"tool_selection_mode,omitempty" xml:"tool_selection_mode,omitempty"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -379,6 +394,9 @@ type AddExternalOAuthServerResponseBody struct { ToolSelectionMode *string `form:"tool_selection_mode,omitempty" json:"tool_selection_mode,omitempty" xml:"tool_selection_mode,omitempty"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -441,6 +459,9 @@ type RemoveOAuthServerResponseBody struct { ToolSelectionMode *string `form:"tool_selection_mode,omitempty" json:"tool_selection_mode,omitempty" xml:"tool_selection_mode,omitempty"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -503,6 +524,9 @@ type AddOAuthProxyServerResponseBody struct { ToolSelectionMode *string `form:"tool_selection_mode,omitempty" json:"tool_selection_mode,omitempty" xml:"tool_selection_mode,omitempty"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -2899,6 +2923,9 @@ type ToolsetEntryResponseBody struct { ToolSelectionMode *string `form:"tool_selection_mode,omitempty" json:"tool_selection_mode,omitempty" xml:"tool_selection_mode,omitempty"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // When the toolset was created. CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` // When the toolset was last updated. @@ -3006,6 +3033,7 @@ func NewUpdateToolsetRequestBody(p *toolsets.UpdateToolsetPayload) *UpdateToolse McpIsPublic: p.McpIsPublic, CustomDomainID: p.CustomDomainID, ToolSelectionMode: p.ToolSelectionMode, + RateLimitRpm: p.RateLimitRpm, } if p.DefaultEnvironmentSlug != nil { defaultEnvironmentSlug := string(*p.DefaultEnvironmentSlug) @@ -3072,6 +3100,7 @@ func NewCreateToolsetToolsetOK(body *CreateToolsetResponseBody) *types.Toolset { McpEnabled: body.McpEnabled, ToolSelectionMode: *body.ToolSelectionMode, CustomDomainID: body.CustomDomainID, + RateLimitRpm: body.RateLimitRpm, CreatedAt: *body.CreatedAt, UpdatedAt: *body.UpdatedAt, } @@ -3498,6 +3527,7 @@ func NewUpdateToolsetToolsetOK(body *UpdateToolsetResponseBody) *types.Toolset { McpEnabled: body.McpEnabled, ToolSelectionMode: *body.ToolSelectionMode, CustomDomainID: body.CustomDomainID, + RateLimitRpm: body.RateLimitRpm, CreatedAt: *body.CreatedAt, UpdatedAt: *body.UpdatedAt, } @@ -3908,6 +3938,7 @@ func NewGetToolsetToolsetOK(body *GetToolsetResponseBody) *types.Toolset { McpEnabled: body.McpEnabled, ToolSelectionMode: *body.ToolSelectionMode, CustomDomainID: body.CustomDomainID, + RateLimitRpm: body.RateLimitRpm, CreatedAt: *body.CreatedAt, UpdatedAt: *body.UpdatedAt, } @@ -4318,6 +4349,7 @@ func NewCloneToolsetToolsetOK(body *CloneToolsetResponseBody) *types.Toolset { McpEnabled: body.McpEnabled, ToolSelectionMode: *body.ToolSelectionMode, CustomDomainID: body.CustomDomainID, + RateLimitRpm: body.RateLimitRpm, CreatedAt: *body.CreatedAt, UpdatedAt: *body.UpdatedAt, } @@ -4578,6 +4610,7 @@ func NewAddExternalOAuthServerToolsetOK(body *AddExternalOAuthServerResponseBody McpEnabled: body.McpEnabled, ToolSelectionMode: *body.ToolSelectionMode, CustomDomainID: body.CustomDomainID, + RateLimitRpm: body.RateLimitRpm, CreatedAt: *body.CreatedAt, UpdatedAt: *body.UpdatedAt, } @@ -4838,6 +4871,7 @@ func NewRemoveOAuthServerToolsetOK(body *RemoveOAuthServerResponseBody) *types.T McpEnabled: body.McpEnabled, ToolSelectionMode: *body.ToolSelectionMode, CustomDomainID: body.CustomDomainID, + RateLimitRpm: body.RateLimitRpm, CreatedAt: *body.CreatedAt, UpdatedAt: *body.UpdatedAt, } @@ -5098,6 +5132,7 @@ func NewAddOAuthProxyServerToolsetOK(body *AddOAuthProxyServerResponseBody) *typ McpEnabled: body.McpEnabled, ToolSelectionMode: *body.ToolSelectionMode, CustomDomainID: body.CustomDomainID, + RateLimitRpm: body.RateLimitRpm, CreatedAt: *body.CreatedAt, UpdatedAt: *body.UpdatedAt, } @@ -5471,6 +5506,16 @@ func ValidateCreateToolsetResponseBody(body *CreateToolsetResponseBody) (err err err = goa.MergeErrors(err, goa.InvalidLengthError("body.mcp_slug", *body.McpSlug, utf8.RuneCountInString(*body.McpSlug), 40, false)) } } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 1, true)) + } + } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm > 10000 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 10000, false)) + } + } if body.ExternalOauthServer != nil { if err2 := ValidateExternalOAuthServerResponseBody(body.ExternalOauthServer); err2 != nil { err = goa.MergeErrors(err, err2) @@ -5635,6 +5680,16 @@ func ValidateUpdateToolsetResponseBody(body *UpdateToolsetResponseBody) (err err err = goa.MergeErrors(err, goa.InvalidLengthError("body.mcp_slug", *body.McpSlug, utf8.RuneCountInString(*body.McpSlug), 40, false)) } } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 1, true)) + } + } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm > 10000 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 10000, false)) + } + } if body.ExternalOauthServer != nil { if err2 := ValidateExternalOAuthServerResponseBody(body.ExternalOauthServer); err2 != nil { err = goa.MergeErrors(err, err2) @@ -5783,6 +5838,16 @@ func ValidateGetToolsetResponseBody(body *GetToolsetResponseBody) (err error) { err = goa.MergeErrors(err, goa.InvalidLengthError("body.mcp_slug", *body.McpSlug, utf8.RuneCountInString(*body.McpSlug), 40, false)) } } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 1, true)) + } + } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm > 10000 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 10000, false)) + } + } if body.ExternalOauthServer != nil { if err2 := ValidateExternalOAuthServerResponseBody(body.ExternalOauthServer); err2 != nil { err = goa.MergeErrors(err, err2) @@ -5931,6 +5996,16 @@ func ValidateCloneToolsetResponseBody(body *CloneToolsetResponseBody) (err error err = goa.MergeErrors(err, goa.InvalidLengthError("body.mcp_slug", *body.McpSlug, utf8.RuneCountInString(*body.McpSlug), 40, false)) } } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 1, true)) + } + } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm > 10000 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 10000, false)) + } + } if body.ExternalOauthServer != nil { if err2 := ValidateExternalOAuthServerResponseBody(body.ExternalOauthServer); err2 != nil { err = goa.MergeErrors(err, err2) @@ -6079,6 +6154,16 @@ func ValidateAddExternalOAuthServerResponseBody(body *AddExternalOAuthServerResp err = goa.MergeErrors(err, goa.InvalidLengthError("body.mcp_slug", *body.McpSlug, utf8.RuneCountInString(*body.McpSlug), 40, false)) } } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 1, true)) + } + } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm > 10000 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 10000, false)) + } + } if body.ExternalOauthServer != nil { if err2 := ValidateExternalOAuthServerResponseBody(body.ExternalOauthServer); err2 != nil { err = goa.MergeErrors(err, err2) @@ -6227,6 +6312,16 @@ func ValidateRemoveOAuthServerResponseBody(body *RemoveOAuthServerResponseBody) err = goa.MergeErrors(err, goa.InvalidLengthError("body.mcp_slug", *body.McpSlug, utf8.RuneCountInString(*body.McpSlug), 40, false)) } } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 1, true)) + } + } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm > 10000 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 10000, false)) + } + } if body.ExternalOauthServer != nil { if err2 := ValidateExternalOAuthServerResponseBody(body.ExternalOauthServer); err2 != nil { err = goa.MergeErrors(err, err2) @@ -6375,6 +6470,16 @@ func ValidateAddOAuthProxyServerResponseBody(body *AddOAuthProxyServerResponseBo err = goa.MergeErrors(err, goa.InvalidLengthError("body.mcp_slug", *body.McpSlug, utf8.RuneCountInString(*body.McpSlug), 40, false)) } } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 1, true)) + } + } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm > 10000 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 10000, false)) + } + } if body.ExternalOauthServer != nil { if err2 := ValidateExternalOAuthServerResponseBody(body.ExternalOauthServer); err2 != nil { err = goa.MergeErrors(err, err2) @@ -9547,6 +9652,16 @@ func ValidateToolsetEntryResponseBody(body *ToolsetEntryResponseBody) (err error err = goa.MergeErrors(err, goa.InvalidLengthError("body.mcp_slug", *body.McpSlug, utf8.RuneCountInString(*body.McpSlug), 40, false)) } } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 1, true)) + } + } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm > 10000 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 10000, false)) + } + } if body.CreatedAt != nil { err = goa.MergeErrors(err, goa.ValidateFormat("body.created_at", *body.CreatedAt, goa.FormatDateTime)) } diff --git a/server/gen/http/toolsets/server/encode_decode.go b/server/gen/http/toolsets/server/encode_decode.go index 5c4140c7fc..4bddb1f855 100644 --- a/server/gen/http/toolsets/server/encode_decode.go +++ b/server/gen/http/toolsets/server/encode_decode.go @@ -2947,6 +2947,7 @@ func marshalTypesToolsetEntryToToolsetEntryResponseBody(v *types.ToolsetEntry) * McpEnabled: v.McpEnabled, ToolSelectionMode: v.ToolSelectionMode, CustomDomainID: v.CustomDomainID, + RateLimitRpm: v.RateLimitRpm, CreatedAt: v.CreatedAt, UpdatedAt: v.UpdatedAt, } diff --git a/server/gen/http/toolsets/server/types.go b/server/gen/http/toolsets/server/types.go index 23797974b8..a6a1f15667 100644 --- a/server/gen/http/toolsets/server/types.go +++ b/server/gen/http/toolsets/server/types.go @@ -56,6 +56,9 @@ type UpdateToolsetRequestBody struct { CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` // The mode to use for tool selection ToolSelectionMode *string `form:"tool_selection_mode,omitempty" json:"tool_selection_mode,omitempty" xml:"tool_selection_mode,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` } // AddExternalOAuthServerRequestBody is the type of the "toolsets" service @@ -124,6 +127,9 @@ type CreateToolsetResponseBody struct { ToolSelectionMode string `form:"tool_selection_mode" json:"tool_selection_mode" xml:"tool_selection_mode"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -193,6 +199,9 @@ type UpdateToolsetResponseBody struct { ToolSelectionMode string `form:"tool_selection_mode" json:"tool_selection_mode" xml:"tool_selection_mode"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -255,6 +264,9 @@ type GetToolsetResponseBody struct { ToolSelectionMode string `form:"tool_selection_mode" json:"tool_selection_mode" xml:"tool_selection_mode"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -317,6 +329,9 @@ type CloneToolsetResponseBody struct { ToolSelectionMode string `form:"tool_selection_mode" json:"tool_selection_mode" xml:"tool_selection_mode"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -379,6 +394,9 @@ type AddExternalOAuthServerResponseBody struct { ToolSelectionMode string `form:"tool_selection_mode" json:"tool_selection_mode" xml:"tool_selection_mode"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -441,6 +459,9 @@ type RemoveOAuthServerResponseBody struct { ToolSelectionMode string `form:"tool_selection_mode" json:"tool_selection_mode" xml:"tool_selection_mode"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -503,6 +524,9 @@ type AddOAuthProxyServerResponseBody struct { ToolSelectionMode string `form:"tool_selection_mode" json:"tool_selection_mode" xml:"tool_selection_mode"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // The external OAuth server details ExternalOauthServer *ExternalOAuthServerResponseBody `form:"external_oauth_server,omitempty" json:"external_oauth_server,omitempty" xml:"external_oauth_server,omitempty"` // The OAuth proxy server details @@ -2899,6 +2923,9 @@ type ToolsetEntryResponseBody struct { ToolSelectionMode string `form:"tool_selection_mode" json:"tool_selection_mode" xml:"tool_selection_mode"` // The ID of the custom domain to use for the toolset CustomDomainID *string `form:"custom_domain_id,omitempty" json:"custom_domain_id,omitempty" xml:"custom_domain_id,omitempty"` + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int `form:"rate_limit_rpm,omitempty" json:"rate_limit_rpm,omitempty" xml:"rate_limit_rpm,omitempty"` // When the toolset was created. CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` // When the toolset was last updated. @@ -2986,6 +3013,7 @@ func NewCreateToolsetResponseBody(res *types.Toolset) *CreateToolsetResponseBody McpEnabled: res.McpEnabled, ToolSelectionMode: res.ToolSelectionMode, CustomDomainID: res.CustomDomainID, + RateLimitRpm: res.RateLimitRpm, CreatedAt: res.CreatedAt, UpdatedAt: res.UpdatedAt, } @@ -3136,6 +3164,7 @@ func NewUpdateToolsetResponseBody(res *types.Toolset) *UpdateToolsetResponseBody McpEnabled: res.McpEnabled, ToolSelectionMode: res.ToolSelectionMode, CustomDomainID: res.CustomDomainID, + RateLimitRpm: res.RateLimitRpm, CreatedAt: res.CreatedAt, UpdatedAt: res.UpdatedAt, } @@ -3267,6 +3296,7 @@ func NewGetToolsetResponseBody(res *types.Toolset) *GetToolsetResponseBody { McpEnabled: res.McpEnabled, ToolSelectionMode: res.ToolSelectionMode, CustomDomainID: res.CustomDomainID, + RateLimitRpm: res.RateLimitRpm, CreatedAt: res.CreatedAt, UpdatedAt: res.UpdatedAt, } @@ -3398,6 +3428,7 @@ func NewCloneToolsetResponseBody(res *types.Toolset) *CloneToolsetResponseBody { McpEnabled: res.McpEnabled, ToolSelectionMode: res.ToolSelectionMode, CustomDomainID: res.CustomDomainID, + RateLimitRpm: res.RateLimitRpm, CreatedAt: res.CreatedAt, UpdatedAt: res.UpdatedAt, } @@ -3529,6 +3560,7 @@ func NewAddExternalOAuthServerResponseBody(res *types.Toolset) *AddExternalOAuth McpEnabled: res.McpEnabled, ToolSelectionMode: res.ToolSelectionMode, CustomDomainID: res.CustomDomainID, + RateLimitRpm: res.RateLimitRpm, CreatedAt: res.CreatedAt, UpdatedAt: res.UpdatedAt, } @@ -3660,6 +3692,7 @@ func NewRemoveOAuthServerResponseBody(res *types.Toolset) *RemoveOAuthServerResp McpEnabled: res.McpEnabled, ToolSelectionMode: res.ToolSelectionMode, CustomDomainID: res.CustomDomainID, + RateLimitRpm: res.RateLimitRpm, CreatedAt: res.CreatedAt, UpdatedAt: res.UpdatedAt, } @@ -3791,6 +3824,7 @@ func NewAddOAuthProxyServerResponseBody(res *types.Toolset) *AddOAuthProxyServer McpEnabled: res.McpEnabled, ToolSelectionMode: res.ToolSelectionMode, CustomDomainID: res.CustomDomainID, + RateLimitRpm: res.RateLimitRpm, CreatedAt: res.CreatedAt, UpdatedAt: res.UpdatedAt, } @@ -5392,6 +5426,7 @@ func NewUpdateToolsetPayload(body *UpdateToolsetRequestBody, slug string, sessio McpIsPublic: body.McpIsPublic, CustomDomainID: body.CustomDomainID, ToolSelectionMode: body.ToolSelectionMode, + RateLimitRpm: body.RateLimitRpm, } if body.DefaultEnvironmentSlug != nil { defaultEnvironmentSlug := types.Slug(*body.DefaultEnvironmentSlug) @@ -5548,6 +5583,16 @@ func ValidateUpdateToolsetRequestBody(body *UpdateToolsetRequestBody) (err error err = goa.MergeErrors(err, goa.InvalidLengthError("body.mcp_slug", *body.McpSlug, utf8.RuneCountInString(*body.McpSlug), 40, false)) } } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 1, true)) + } + } + if body.RateLimitRpm != nil { + if *body.RateLimitRpm > 10000 { + err = goa.MergeErrors(err, goa.InvalidRangeError("body.rate_limit_rpm", *body.RateLimitRpm, 10000, false)) + } + } return } diff --git a/server/gen/toolsets/service.go b/server/gen/toolsets/service.go index 75516fcdf0..1fccdf9968 100644 --- a/server/gen/toolsets/service.go +++ b/server/gen/toolsets/service.go @@ -198,7 +198,10 @@ type UpdateToolsetPayload struct { CustomDomainID *string // The mode to use for tool selection ToolSelectionMode *string - ProjectSlugInput *string + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int + ProjectSlugInput *string } // MakeUnauthorized builds a goa.ServiceError from an error. diff --git a/server/gen/types/toolset.go b/server/gen/types/toolset.go index a072a48647..2b548ea0a0 100644 --- a/server/gen/types/toolset.go +++ b/server/gen/types/toolset.go @@ -58,6 +58,9 @@ type Toolset struct { ToolSelectionMode string // The ID of the custom domain to use for the toolset CustomDomainID *string + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int // The external OAuth server details ExternalOauthServer *ExternalOAuthServer // The OAuth proxy server details diff --git a/server/gen/types/toolset_entry.go b/server/gen/types/toolset_entry.go index a1e5203817..6ed4f739ba 100644 --- a/server/gen/types/toolset_entry.go +++ b/server/gen/types/toolset_entry.go @@ -51,6 +51,9 @@ type ToolsetEntry struct { ToolSelectionMode string // The ID of the custom domain to use for the toolset CustomDomainID *string + // Maximum requests per minute for this MCP server. When set, requests + // exceeding this limit receive a rate limit error. + RateLimitRpm *int // When the toolset was created. CreatedAt string // When the toolset was last updated. diff --git a/server/internal/attr/conventions.go b/server/internal/attr/conventions.go index 4e5dd912ef..700293251f 100644 --- a/server/internal/attr/conventions.go +++ b/server/internal/attr/conventions.go @@ -129,6 +129,8 @@ const ( IngressNameKey = attribute.Key("gram.ingress.name") McpMethodKey = attribute.Key("gram.mcp.method") McpURLKey = attribute.Key("gram.mcp.url") + RateLimitLayerKey = attribute.Key("gram.ratelimit.layer") + RateLimitKeyKey = attribute.Key("gram.ratelimit.key") MetricNameKey = attribute.Key("gram.metric.name") MimeTypeKey = attribute.Key("mime.type") OAuthAuthorizationEndpointKey = attribute.Key("gram.oauth.authorization_endpoint") @@ -789,6 +791,9 @@ func SlogToolsetSlug(v string) slog.Attr { return slog.String(string(Toolse func McpURL(v string) attribute.KeyValue { return McpURLKey.String(v) } func SlogMcpURL(v string) slog.Attr { return slog.String(string(McpURLKey), v) } +func RateLimitLayer(v string) attribute.KeyValue { return RateLimitLayerKey.String(v) } +func RateLimitKey(v string) attribute.KeyValue { return RateLimitKeyKey.String(v) } + func McpMethod(v string) attribute.KeyValue { return McpMethodKey.String(v) } func SlogMcpMethod(v string) slog.Attr { return slog.String(string(McpMethodKey), v) } diff --git a/server/internal/database/models.go b/server/internal/database/models.go index 4f8adaabb4..83ce174717 100644 --- a/server/internal/database/models.go +++ b/server/internal/database/models.go @@ -613,6 +613,15 @@ type PackageVersion struct { Deleted bool } +type PlatformRateLimit struct { + ID uuid.UUID + AttributeType string + AttributeValue string + RequestsPerMinute int32 + CreatedAt pgtype.Timestamptz + UpdatedAt pgtype.Timestamptz +} + type Project struct { ID uuid.UUID Name string @@ -771,6 +780,7 @@ type Toolset struct { McpSlug pgtype.Text McpIsPublic bool McpEnabled bool + RateLimitRpm pgtype.Int4 ToolSelectionMode string CustomDomainID uuid.NullUUID ExternalOauthServerID uuid.NullUUID diff --git a/server/internal/mcp/impl.go b/server/internal/mcp/impl.go index 9f823304bd..96d0d3b558 100644 --- a/server/internal/mcp/impl.go +++ b/server/internal/mcp/impl.go @@ -57,6 +57,7 @@ import ( "github.com/speakeasy-api/gram/server/internal/oauth/wellknown" "github.com/speakeasy-api/gram/server/internal/oops" organizations_repo "github.com/speakeasy-api/gram/server/internal/organizations/repo" + "github.com/speakeasy-api/gram/server/internal/ratelimit" "github.com/speakeasy-api/gram/server/internal/thirdparty/posthog" "github.com/speakeasy-api/gram/server/internal/toolconfig" toolsets_repo "github.com/speakeasy-api/gram/server/internal/toolsets/repo" @@ -90,6 +91,7 @@ type Service struct { externalmcpRepo *externalmcp_repo.Queries deploymentsRepo *deployments_repo.Queries enc *encryption.Client + rateLimiter *ratelimit.RateLimiter } type oauthTokenInputs struct { @@ -140,6 +142,7 @@ func NewService( features *productfeatures.Client, vectorToolStore *rag.ToolsetVectorStore, temporal *temporal.Environment, + rateLimiter *ratelimit.RateLimiter, ) *Service { tracer := tracerProvider.Tracer("github.com/speakeasy-api/gram/server/internal/mcp") meter := meterProvider.Meter("github.com/speakeasy-api/gram/server/internal/mcp") @@ -182,6 +185,7 @@ func NewService( sessions: sessions, chatSessionsManager: chatSessionsManager, enc: enc, + rateLimiter: rateLimiter, } } @@ -384,6 +388,14 @@ func (s *Service) ServePublic(w http.ResponseWriter, r *http.Request) error { return oops.E(oops.CodeNotFound, err, "mcp server not found").Log(ctx, s.logger) } + // Layer 2: customer-configured rate limit check + if limited, rlErr := s.checkCustomerRateLimit(ctx, w, toolset.RateLimitRpm, mcpSlug); limited { + if rlErr != nil { + return oops.E(oops.CodeUnexpected, rlErr, "rate limit response write failed").Log(ctx, s.logger) + } + return nil + } + baseURL := s.serverURL.String() if customDomainCtx != nil { baseURL = fmt.Sprintf("https://%s", customDomainCtx.Domain) @@ -761,6 +773,14 @@ func (s *Service) ServeAuthenticated(w http.ResponseWriter, r *http.Request) err return oops.E(oops.CodeNotFound, err, "toolset not found").Log(ctx, s.logger) } + // Layer 2: customer-configured rate limit check (use toolset ID to avoid cross-org collisions) + if limited, rlErr := s.checkCustomerRateLimit(ctx, w, toolset.RateLimitRpm, toolset.ID.String()); limited { + if rlErr != nil { + return oops.E(oops.CodeUnexpected, rlErr, "rate limit response write failed").Log(ctx, s.logger) + } + return nil + } + // Load header display names for remapping headerDisplayNames := s.loadHeaderDisplayNames(ctx, toolset.ID) diff --git a/server/internal/mcp/metrics.go b/server/internal/mcp/metrics.go index 77b562489a..fe3244b5bc 100644 --- a/server/internal/mcp/metrics.go +++ b/server/internal/mcp/metrics.go @@ -12,8 +12,9 @@ import ( ) type metrics struct { - mcpToolCallCounter metric.Int64Counter - mcpRequestDuration metric.Float64Histogram + mcpToolCallCounter metric.Int64Counter + mcpRequestDuration metric.Float64Histogram + rateLimitCheckCounter metric.Int64Counter } func newMetrics(meter metric.Meter, logger *slog.Logger) *metrics { @@ -36,9 +37,19 @@ func newMetrics(meter metric.Meter, logger *slog.Logger) *metrics { logger.ErrorContext(context.Background(), "failed to create mcp request duration", attr.SlogError(err)) } + rateLimitCheckCounter, err := meter.Int64Counter( + "mcp.ratelimit.check", + metric.WithDescription("Rate limit checks on MCP requests"), + metric.WithUnit("{check}"), + ) + if err != nil { + logger.ErrorContext(context.Background(), "failed to create rate limit check counter", attr.SlogError(err)) + } + return &metrics{ - mcpToolCallCounter: mcpToolCallCounter, - mcpRequestDuration: mcpRequestDuration, + mcpToolCallCounter: mcpToolCallCounter, + mcpRequestDuration: mcpRequestDuration, + rateLimitCheckCounter: rateLimitCheckCounter, } } @@ -55,6 +66,24 @@ func (m *metrics) RecordMCPToolCall(ctx context.Context, orgID string, mcpURL st m.mcpToolCallCounter.Add(ctx, 1, metric.WithAttributes(kv...)) } +func (m *metrics) RecordRateLimitCheck(ctx context.Context, layer string, key string, allowed bool) { + if m.rateLimitCheckCounter == nil { + return + } + + outcome := "allowed" + if !allowed { + outcome = "limited" + } + + kv := []attribute.KeyValue{ + attr.RateLimitLayer(layer), + attr.RateLimitKey(key), + attr.Outcome(outcome), + } + m.rateLimitCheckCounter.Add(ctx, 1, metric.WithAttributes(kv...)) +} + func (m *metrics) RecordMCPRequestDuration(ctx context.Context, mcpMethod string, mcpURL string, duration time.Duration) { if m.mcpRequestDuration == nil { return diff --git a/server/internal/mcp/ratelimit.go b/server/internal/mcp/ratelimit.go new file mode 100644 index 0000000000..f123490de9 --- /dev/null +++ b/server/internal/mcp/ratelimit.go @@ -0,0 +1,100 @@ +package mcp + +import ( + "context" + "encoding/json" + "fmt" + "log/slog" + "net/http" + "time" + + "github.com/jackc/pgx/v5/pgtype" + "github.com/speakeasy-api/gram/server/internal/attr" + "github.com/speakeasy-api/gram/server/internal/ratelimit" +) + +// checkCustomerRateLimit checks the customer-configured rate limit for a toolset. +// It reads the rate_limit_rpm from the already-loaded toolset struct (no extra DB query). +// On rate limiter errors, it fails open (logs warning and allows the request). +// +// Returns (true, nil) when the rate limit is exceeded and the JSON-RPC error +// response has already been written to w. The caller should return nil to stop +// further processing without triggering the oops error handler. +// Returns (false, nil) when the request is allowed to proceed. +// Returns (false, error) only on unexpected write failures. +func (s *Service) checkCustomerRateLimit(ctx context.Context, w http.ResponseWriter, rateLimitRPM pgtype.Int4, key string) (bool, error) { + if s.rateLimiter == nil { + return false, nil + } + + if !rateLimitRPM.Valid || rateLimitRPM.Int32 <= 0 { + return false, nil + } + + rpm := int(rateLimitRPM.Int32) + + result, err := s.rateLimiter.Allow(ctx, "customer:"+key, rpm) + if err != nil { + // Fail open: log warning but allow the request through. + s.logger.WarnContext(ctx, "customer rate limit check failed", + attr.SlogError(err), + slog.String("mcp_key", key), + ) + return false, nil + } + + ratelimit.SetHeaders(w, result) + + s.metrics.RecordRateLimitCheck(ctx, "customer", key, result.Allowed) + + if !result.Allowed { + if writeErr := writeJSONRPCRateLimitError(w, rpm, result); writeErr != nil { + return true, writeErr + } + return true, nil + } + + return false, nil +} + +// rateLimitErrorData is the structured data attached to a JSON-RPC rate limit error. +type rateLimitErrorData struct { + RetryAfterMs int64 `json:"retryAfterMs"` + Limit int `json:"limit"` + Window string `json:"window"` +} + +// writeJSONRPCRateLimitError writes a JSON-RPC error response for a rate-limited +// request. The response uses HTTP 200 (not 429) to maintain MCP protocol +// compatibility, since this is a JSON-RPC-level error, not an HTTP-level error. +func writeJSONRPCRateLimitError(w http.ResponseWriter, limit int, result ratelimit.Result) error { + retryAfterMs := max(time.Until(result.ResetAt).Milliseconds(), 1000) + + payload := map[string]any{ + "jsonrpc": "2.0", + "id": nil, + "error": map[string]any{ + "code": rateLimitExceeded, + "message": fmt.Sprintf("Rate limit exceeded. This MCP server is limited to %d requests per minute.", limit), + "data": rateLimitErrorData{ + RetryAfterMs: retryAfterMs, + Limit: limit, + Window: "1m", + }, + }, + } + + body, err := json.Marshal(payload) + if err != nil { + return fmt.Errorf("marshal rate limit error: %w", err) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, writeErr := w.Write(body) + if writeErr != nil { + return fmt.Errorf("write rate limit error response: %w", writeErr) + } + + return nil +} diff --git a/server/internal/mcp/rpc.go b/server/internal/mcp/rpc.go index 3a3725266d..01bb4dbd4c 100644 --- a/server/internal/mcp/rpc.go +++ b/server/internal/mcp/rpc.go @@ -18,18 +18,21 @@ const ( type errorCode int const ( - methodNotAllowed errorCode = -32000 - parseError errorCode = -32700 - invalidRequest errorCode = -32600 - methodNotFound errorCode = -32601 - invalidParams errorCode = -32602 - internalError errorCode = -32603 + methodNotAllowed errorCode = -32000 + rateLimitExceeded errorCode = -32029 + parseError errorCode = -32700 + invalidRequest errorCode = -32600 + methodNotFound errorCode = -32601 + invalidParams errorCode = -32602 + internalError errorCode = -32603 ) func (e errorCode) UserMessage() string { switch e { case methodNotAllowed: return "method not allowed" + case rateLimitExceeded: + return "rate limit exceeded" case parseError: return "invalid json was received by the server" case invalidRequest: diff --git a/server/internal/mcp/setup_test.go b/server/internal/mcp/setup_test.go index 586d1bc5da..d254da45d3 100644 --- a/server/internal/mcp/setup_test.go +++ b/server/internal/mcp/setup_test.go @@ -136,7 +136,7 @@ func newTestMCPService(t *testing.T) (context.Context, *testInstance) { redisClient, err2 := infra.NewRedisClient(t, 0) require.NoError(t, err2) chatSessionsManager := chatsessions.NewManager(logger, redisClient, "test-jwt-secret") - svc := mcp.NewService(logger, tracerProvider, meterProvider, conn, sessionManager, chatSessionsManager, env, posthog, serverURL, enc, cacheAdapter, guardianPolicy, funcs, oauthService, billingStub, billingStub, telemService, featClient, vectorToolStore, temporalEnv) + svc := mcp.NewService(logger, tracerProvider, meterProvider, conn, sessionManager, chatSessionsManager, env, posthog, serverURL, enc, cacheAdapter, guardianPolicy, funcs, oauthService, billingStub, billingStub, telemService, featClient, vectorToolStore, temporalEnv, nil) return ctx, &testInstance{ service: svc, @@ -235,7 +235,7 @@ func newTestMCPServiceWithOAuth(t *testing.T, oauthSvc mcp.OAuthService) (contex toolIOLogsEnabled, posthog, ) - svc := mcp.NewService(logger, tracerProvider, meterProvider, conn, sessionManager, chatSessionsManager, env, posthog, serverURL, enc, cacheAdapter, guardianPolicy, funcs, oauthSvc, billingStub, billingStub, telemService, featClient, vectorToolStore, temporalEnv) + svc := mcp.NewService(logger, tracerProvider, meterProvider, conn, sessionManager, chatSessionsManager, env, posthog, serverURL, enc, cacheAdapter, guardianPolicy, funcs, oauthSvc, billingStub, billingStub, telemService, featClient, vectorToolStore, temporalEnv, nil) return ctx, &testInstance{ service: svc, diff --git a/server/internal/middleware/ratelimit.go b/server/internal/middleware/ratelimit.go new file mode 100644 index 0000000000..19a87d2e1e --- /dev/null +++ b/server/internal/middleware/ratelimit.go @@ -0,0 +1,178 @@ +package middleware + +import ( + "context" + "encoding/json" + "fmt" + "log/slog" + "net/http" + "strconv" + "strings" + "time" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/metric" + + "github.com/speakeasy-api/gram/server/internal/attr" + "github.com/speakeasy-api/gram/server/internal/ratelimit" +) + +const defaultPlatformRateLimit = 600 + +// RateLimitConfigLoader loads rate limit configuration for a given attribute. +// It allows the middleware to look up per-slug overrides from the platform_rate_limits +// table (cached in Redis). If no override is found, the middleware falls back to the +// default limit of 600 requests per minute. +type RateLimitConfigLoader interface { + // GetLimit returns the rate limit for the given attribute type and value. + // Returns 0 and a nil error if no override exists, in which case the + // default limit should be used. + GetLimit(ctx context.Context, attributeType, attributeValue string) (int, error) +} + +type rateLimitErrorResponse struct { + Error string `json:"error"` + RetryAfter int `json:"retryAfter"` +} + +// RateLimitMiddleware returns middleware that enforces platform rate limits on MCP routes. +// It extracts the MCP slug from the URL path and checks against the rate limiter. +// Only applies to POST requests to /mcp/{slug} and /mcp/{project}/{toolset}/{environment} paths. +// Non-MCP requests and non-POST methods pass through unchanged. +func RateLimitMiddleware(limiter *ratelimit.RateLimiter, configLoader RateLimitConfigLoader, logger *slog.Logger) func(http.Handler) http.Handler { + logger = logger.With(attr.SlogComponent("ratelimit")) + + meter := otel.GetMeterProvider().Meter("github.com/speakeasy-api/gram/server/internal/middleware") + checkCounter, err := meter.Int64Counter( + "mcp.ratelimit.platform.check", + metric.WithDescription("Platform rate limit checks on MCP requests"), + metric.WithUnit("{check}"), + ) + if err != nil { + logger.ErrorContext(context.Background(), "failed to create platform rate limit counter", attr.SlogError(err)) + } + + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + next.ServeHTTP(w, r) + return + } + + key, ok := extractMCPKey(r.URL.Path) + if !ok { + next.ServeHTTP(w, r) + return + } + + ctx := r.Context() + + limit, err := resolveLimit(ctx, configLoader, key) + if err != nil { + logger.WarnContext(ctx, "rate limit config lookup failed, using default", + attr.SlogError(err), + slog.String("mcp_key", key), + ) + limit = defaultPlatformRateLimit + } + + result, err := limiter.Allow(ctx, "platform:"+key, limit) + if err != nil { + // On rate limiter failure, allow the request through to avoid + // blocking traffic when Redis is unavailable. + logger.ErrorContext(ctx, "rate limiter check failed", + attr.SlogError(err), + slog.String("mcp_key", key), + ) + next.ServeHTTP(w, r) + return + } + + ratelimit.SetHeaders(w, result) + + if checkCounter != nil { + outcome := "allowed" + if !result.Allowed { + outcome = "limited" + } + checkCounter.Add(ctx, 1, metric.WithAttributes( + attr.RateLimitLayer("platform"), + attr.RateLimitKey(key), + attr.Outcome(outcome), + )) + } + + if !result.Allowed { + retryAfter := max(int(time.Until(result.ResetAt).Seconds())+1, 1) + + w.Header().Set("Retry-After", strconv.Itoa(retryAfter)) + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusTooManyRequests) + + resp := rateLimitErrorResponse{ + Error: "rate limit exceeded", + RetryAfter: retryAfter, + } + if encErr := json.NewEncoder(w).Encode(resp); encErr != nil { + logger.ErrorContext(ctx, "encode rate limit response", + attr.SlogError(encErr), + ) + } + return + } + + next.ServeHTTP(w, r) + }) + } +} + +// extractMCPKey parses the URL path and returns a rate-limiting key for MCP routes. +// Returns ("", false) for non-MCP paths. +// +// IMPORTANT: This function must be updated whenever MCP POST routes change. +// See route registration in server/internal/mcp/impl.go (ServePublic, ServeAuthenticated). +// +// Supported patterns: +// - /mcp/{mcpSlug} -> key = "{mcpSlug}" +// - /mcp/{project}/{toolset}/{environment} -> key = "{project}:{toolset}" +func extractMCPKey(path string) (string, bool) { + if !strings.HasPrefix(path, "/mcp/") { + return "", false + } + + // Trim the "/mcp/" prefix and any trailing slash. + trimmed := strings.TrimPrefix(path, "/mcp/") + trimmed = strings.TrimRight(trimmed, "/") + if trimmed == "" { + return "", false + } + + segments := strings.Split(trimmed, "/") + switch len(segments) { + case 1: + // /mcp/{mcpSlug} + return segments[0], true + case 3: + // /mcp/{project}/{toolset}/{environment} + return segments[0] + ":" + segments[1], true + default: + return "", false + } +} + +// resolveLimit returns the rate limit for the given key, checking for overrides first. +func resolveLimit(ctx context.Context, configLoader RateLimitConfigLoader, key string) (int, error) { + if configLoader == nil { + return defaultPlatformRateLimit, nil + } + + limit, err := configLoader.GetLimit(ctx, "mcp_slug", key) + if err != nil { + return 0, fmt.Errorf("get rate limit for %q: %w", key, err) + } + if limit > 0 { + return limit, nil + } + + return defaultPlatformRateLimit, nil +} diff --git a/server/internal/middleware/ratelimit_test.go b/server/internal/middleware/ratelimit_test.go new file mode 100644 index 0000000000..259e4d43e8 --- /dev/null +++ b/server/internal/middleware/ratelimit_test.go @@ -0,0 +1,52 @@ +package middleware + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestExtractMCPKeyPublicRoute(t *testing.T) { + key, ok := extractMCPKey("/mcp/my-server") + require.True(t, ok) + require.Equal(t, "my-server", key) +} + +func TestExtractMCPKeyPublicRouteTrailingSlash(t *testing.T) { + key, ok := extractMCPKey("/mcp/my-server/") + require.True(t, ok) + require.Equal(t, "my-server", key) +} + +func TestExtractMCPKeyAuthenticatedRoute(t *testing.T) { + key, ok := extractMCPKey("/mcp/my-project/my-toolset/production") + require.True(t, ok) + require.Equal(t, "my-project:my-toolset", key) +} + +func TestExtractMCPKeyNonMCPPath(t *testing.T) { + _, ok := extractMCPKey("/api/v1/tools") + require.False(t, ok) +} + +func TestExtractMCPKeyEmptySlug(t *testing.T) { + _, ok := extractMCPKey("/mcp/") + require.False(t, ok) +} + +func TestExtractMCPKeyTwoSegments(t *testing.T) { + // Two segments don't match either pattern. + _, ok := extractMCPKey("/mcp/project/toolset") + require.False(t, ok) +} + +func TestExtractMCPKeyFourSegments(t *testing.T) { + // Four segments don't match either pattern. + _, ok := extractMCPKey("/mcp/a/b/c/d") + require.False(t, ok) +} + +func TestExtractMCPKeyRootPath(t *testing.T) { + _, ok := extractMCPKey("/") + require.False(t, ok) +} diff --git a/server/internal/ratelimit/config.go b/server/internal/ratelimit/config.go new file mode 100644 index 0000000000..60321dab91 --- /dev/null +++ b/server/internal/ratelimit/config.go @@ -0,0 +1,98 @@ +package ratelimit + +import ( + "context" + "errors" + "fmt" + "log/slog" + "time" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgxpool" + "github.com/speakeasy-api/gram/server/internal/attr" + "github.com/speakeasy-api/gram/server/internal/cache" + "github.com/speakeasy-api/gram/server/internal/ratelimit/repo" +) + +// rateLimitEntry is a cached rate limit override value. +// A RequestsPerMinute of 0 means no override exists (cached negative result). +type rateLimitEntry struct { + AttributeType string `json:"attribute_type"` + AttributeValue string `json:"attribute_value"` + RequestsPerMinute int `json:"requests_per_minute"` +} + +var _ cache.CacheableObject[rateLimitEntry] = (*rateLimitEntry)(nil) + +func (r rateLimitEntry) CacheKey() string { + return rateLimitCacheKey(r.AttributeType, r.AttributeValue) +} + +func rateLimitCacheKey(attributeType, attributeValue string) string { + return fmt.Sprintf("platform_rate_limit:%s:%s", attributeType, attributeValue) +} + +func (r rateLimitEntry) TTL() time.Duration { + return 1 * time.Minute +} + +func (r rateLimitEntry) AdditionalCacheKeys() []string { + return []string{} +} + +// ConfigLoader loads rate limit overrides from the platform_rate_limits table, +// caching results in Redis to avoid repeated database lookups. +type ConfigLoader struct { + logger *slog.Logger + repo *repo.Queries + cache cache.TypedCacheObject[rateLimitEntry] +} + +// NewConfigLoader creates a ConfigLoader backed by the given database pool and cache. +func NewConfigLoader(logger *slog.Logger, db *pgxpool.Pool, cacheImpl cache.Cache) *ConfigLoader { + return &ConfigLoader{ + logger: logger.With(attr.SlogComponent("ratelimit-config")), + repo: repo.New(db), + cache: cache.NewTypedObjectCache[rateLimitEntry](logger.With(attr.SlogCacheNamespace("ratelimit")), cacheImpl, cache.SuffixNone), + } +} + +// GetLimit returns the rate limit override for the given attribute type and value. +// Returns 0 with a nil error if no override exists, signaling the caller to use the default. +func (cl *ConfigLoader) GetLimit(ctx context.Context, attributeType, attributeValue string) (int, error) { + cacheKey := rateLimitCacheKey(attributeType, attributeValue) + + // Check cache first. + cached, err := cl.cache.Get(ctx, cacheKey) + if err == nil { + return cached.RequestsPerMinute, nil + } + + // Cache miss — query the database. + row, err := cl.repo.GetPlatformRateLimit(ctx, repo.GetPlatformRateLimitParams{ + AttributeType: attributeType, + AttributeValue: attributeValue, + }) + if err != nil && !errors.Is(err, pgx.ErrNoRows) { + return 0, fmt.Errorf("query platform_rate_limits for %s/%s: %w", attributeType, attributeValue, err) + } + + // Build the cache entry. A zero value means "no override" (cached negative). + entry := rateLimitEntry{ + AttributeType: attributeType, + AttributeValue: attributeValue, + RequestsPerMinute: 0, + } + if err == nil { + entry.RequestsPerMinute = int(row.RequestsPerMinute) + } + + // Store in cache (best-effort). + if storeErr := cl.cache.Store(ctx, entry); storeErr != nil { + cl.logger.WarnContext(ctx, "cache store rate limit entry", + attr.SlogError(storeErr), + ) + } + + return entry.RequestsPerMinute, nil +} diff --git a/server/internal/ratelimit/headers.go b/server/internal/ratelimit/headers.go new file mode 100644 index 0000000000..8327e91854 --- /dev/null +++ b/server/internal/ratelimit/headers.go @@ -0,0 +1,21 @@ +package ratelimit + +import ( + "net/http" + "strconv" +) + +// Header names for rate limit response headers. +const ( + HeaderRateLimitLimit = "X-RateLimit-Limit" + HeaderRateLimitRemaining = "X-RateLimit-Remaining" + HeaderRateLimitReset = "X-RateLimit-Reset" +) + +// SetHeaders sets rate limit headers on the HTTP response. +func SetHeaders(w http.ResponseWriter, result Result) { + h := w.Header() + h.Set(HeaderRateLimitLimit, strconv.Itoa(result.Limit)) + h.Set(HeaderRateLimitRemaining, strconv.Itoa(result.Remaining)) + h.Set(HeaderRateLimitReset, strconv.FormatInt(result.ResetAt.Unix(), 10)) +} diff --git a/server/internal/ratelimit/queries.sql b/server/internal/ratelimit/queries.sql new file mode 100644 index 0000000000..14e71d843b --- /dev/null +++ b/server/internal/ratelimit/queries.sql @@ -0,0 +1,26 @@ +-- name: GetPlatformRateLimit :one +-- Get a platform rate limit override by attribute type and value +SELECT * FROM platform_rate_limits +WHERE attribute_type = @attribute_type +AND attribute_value = @attribute_value; + +-- name: UpsertPlatformRateLimit :one +-- Create or update a platform rate limit override +INSERT INTO platform_rate_limits (attribute_type, attribute_value, requests_per_minute) +VALUES (@attribute_type, @attribute_value, @requests_per_minute) +ON CONFLICT (attribute_type, attribute_value) +DO UPDATE SET + requests_per_minute = @requests_per_minute, + updated_at = clock_timestamp() +RETURNING *; + +-- name: DeletePlatformRateLimit :exec +-- Delete a platform rate limit override +DELETE FROM platform_rate_limits +WHERE attribute_type = @attribute_type +AND attribute_value = @attribute_value; + +-- name: ListPlatformRateLimits :many +-- List all platform rate limit overrides +SELECT * FROM platform_rate_limits +ORDER BY attribute_type, attribute_value; diff --git a/server/internal/ratelimit/ratelimit.go b/server/internal/ratelimit/ratelimit.go new file mode 100644 index 0000000000..3beb0da144 --- /dev/null +++ b/server/internal/ratelimit/ratelimit.go @@ -0,0 +1,80 @@ +// Package ratelimit provides a fixed-window rate limiter backed by Redis. +package ratelimit + +import ( + "context" + "fmt" + "log/slog" + "time" + + "github.com/redis/go-redis/v9" + "github.com/speakeasy-api/gram/server/internal/attr" +) + +const ( + // windowDuration is the fixed-window duration. The counter resets at each + // minute boundary. Up to 2x the limit can be served in bursts that straddle + // a window boundary. + windowDuration = 1 * time.Minute +) + +// Result contains the outcome of a rate limit check. +type Result struct { + // Allowed indicates whether the request is within the rate limit. + Allowed bool + // Limit is the maximum number of requests allowed in the window. + Limit int + // Remaining is the number of requests remaining in the current window. + Remaining int + // ResetAt is the time when the current window resets. + ResetAt time.Time +} + +// RateLimiter performs rate limit checks against Redis using a fixed-window counter. +type RateLimiter struct { + client *redis.Client + logger *slog.Logger +} + +// New creates a new RateLimiter backed by the given Redis client. +func New(client *redis.Client, logger *slog.Logger) *RateLimiter { + return &RateLimiter{ + client: client, + logger: logger.With(attr.SlogComponent("ratelimit")), + } +} + +// Allow checks whether a request identified by key is within the rate limit. +// The limit parameter specifies the maximum number of requests per minute. +// It uses a fixed-window counter in Redis with automatic expiration. +func (rl *RateLimiter) Allow(ctx context.Context, key string, limit int) (Result, error) { + now := time.Now() + // Compute the window key based on the current minute boundary. + windowStart := now.Truncate(windowDuration) + windowKey := fmt.Sprintf("rl:%s:%d", key, windowStart.Unix()) + resetAt := windowStart.Add(windowDuration) + + // INCR + conditional EXPIRE in a pipeline to minimize round trips. + pipe := rl.client.Pipeline() + incrCmd := pipe.Incr(ctx, windowKey) + pipe.ExpireNX(ctx, windowKey, windowDuration+10*time.Second) // TTL slightly beyond window to handle clock skew + _, err := pipe.Exec(ctx) + if err != nil { + return Result{ + Allowed: false, + Limit: limit, + Remaining: 0, + ResetAt: resetAt, + }, fmt.Errorf("redis pipeline exec: %w", err) + } + + count := int(incrCmd.Val()) + remaining := max(limit-count, 0) + + return Result{ + Allowed: count <= limit, + Limit: limit, + Remaining: remaining, + ResetAt: resetAt, + }, nil +} diff --git a/server/internal/ratelimit/repo/db.go b/server/internal/ratelimit/repo/db.go new file mode 100644 index 0000000000..3e41db37f8 --- /dev/null +++ b/server/internal/ratelimit/repo/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.29.0 + +package repo + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/server/internal/ratelimit/repo/models.go b/server/internal/ratelimit/repo/models.go new file mode 100644 index 0000000000..440cdeb6aa --- /dev/null +++ b/server/internal/ratelimit/repo/models.go @@ -0,0 +1,19 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.29.0 + +package repo + +import ( + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" +) + +type PlatformRateLimit struct { + ID uuid.UUID + AttributeType string + AttributeValue string + RequestsPerMinute int32 + CreatedAt pgtype.Timestamptz + UpdatedAt pgtype.Timestamptz +} diff --git a/server/internal/ratelimit/repo/queries.sql.go b/server/internal/ratelimit/repo/queries.sql.go new file mode 100644 index 0000000000..3ffab6acc3 --- /dev/null +++ b/server/internal/ratelimit/repo/queries.sql.go @@ -0,0 +1,117 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.29.0 +// source: queries.sql + +package repo + +import ( + "context" +) + +const deletePlatformRateLimit = `-- name: DeletePlatformRateLimit :exec +DELETE FROM platform_rate_limits +WHERE attribute_type = $1 +AND attribute_value = $2 +` + +type DeletePlatformRateLimitParams struct { + AttributeType string + AttributeValue string +} + +// Delete a platform rate limit override +func (q *Queries) DeletePlatformRateLimit(ctx context.Context, arg DeletePlatformRateLimitParams) error { + _, err := q.db.Exec(ctx, deletePlatformRateLimit, arg.AttributeType, arg.AttributeValue) + return err +} + +const getPlatformRateLimit = `-- name: GetPlatformRateLimit :one +SELECT id, attribute_type, attribute_value, requests_per_minute, created_at, updated_at FROM platform_rate_limits +WHERE attribute_type = $1 +AND attribute_value = $2 +` + +type GetPlatformRateLimitParams struct { + AttributeType string + AttributeValue string +} + +// Get a platform rate limit override by attribute type and value +func (q *Queries) GetPlatformRateLimit(ctx context.Context, arg GetPlatformRateLimitParams) (PlatformRateLimit, error) { + row := q.db.QueryRow(ctx, getPlatformRateLimit, arg.AttributeType, arg.AttributeValue) + var i PlatformRateLimit + err := row.Scan( + &i.ID, + &i.AttributeType, + &i.AttributeValue, + &i.RequestsPerMinute, + &i.CreatedAt, + &i.UpdatedAt, + ) + return i, err +} + +const listPlatformRateLimits = `-- name: ListPlatformRateLimits :many +SELECT id, attribute_type, attribute_value, requests_per_minute, created_at, updated_at FROM platform_rate_limits +ORDER BY attribute_type, attribute_value +` + +// List all platform rate limit overrides +func (q *Queries) ListPlatformRateLimits(ctx context.Context) ([]PlatformRateLimit, error) { + rows, err := q.db.Query(ctx, listPlatformRateLimits) + if err != nil { + return nil, err + } + defer rows.Close() + var items []PlatformRateLimit + for rows.Next() { + var i PlatformRateLimit + if err := rows.Scan( + &i.ID, + &i.AttributeType, + &i.AttributeValue, + &i.RequestsPerMinute, + &i.CreatedAt, + &i.UpdatedAt, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const upsertPlatformRateLimit = `-- name: UpsertPlatformRateLimit :one +INSERT INTO platform_rate_limits (attribute_type, attribute_value, requests_per_minute) +VALUES ($1, $2, $3) +ON CONFLICT (attribute_type, attribute_value) +DO UPDATE SET + requests_per_minute = $3, + updated_at = clock_timestamp() +RETURNING id, attribute_type, attribute_value, requests_per_minute, created_at, updated_at +` + +type UpsertPlatformRateLimitParams struct { + AttributeType string + AttributeValue string + RequestsPerMinute int32 +} + +// Create or update a platform rate limit override +func (q *Queries) UpsertPlatformRateLimit(ctx context.Context, arg UpsertPlatformRateLimitParams) (PlatformRateLimit, error) { + row := q.db.QueryRow(ctx, upsertPlatformRateLimit, arg.AttributeType, arg.AttributeValue, arg.RequestsPerMinute) + var i PlatformRateLimit + err := row.Scan( + &i.ID, + &i.AttributeType, + &i.AttributeValue, + &i.RequestsPerMinute, + &i.CreatedAt, + &i.UpdatedAt, + ) + return i, err +} diff --git a/server/internal/toolsets/queries.sql b/server/internal/toolsets/queries.sql index de486f8ed4..9a28e94e31 100644 --- a/server/internal/toolsets/queries.sql +++ b/server/internal/toolsets/queries.sql @@ -54,6 +54,7 @@ SET , custom_domain_id = COALESCE(@custom_domain_id, custom_domain_id) , mcp_enabled = COALESCE(@mcp_enabled, mcp_enabled) , tool_selection_mode = COALESCE(@tool_selection_mode, tool_selection_mode) + , rate_limit_rpm = COALESCE(@rate_limit_rpm, rate_limit_rpm) , updated_at = clock_timestamp() WHERE slug = @slug AND project_id = @project_id RETURNING *; diff --git a/server/internal/toolsets/repo/models.go b/server/internal/toolsets/repo/models.go index 790f5ff1b0..1c54f1e170 100644 --- a/server/internal/toolsets/repo/models.go +++ b/server/internal/toolsets/repo/models.go @@ -41,6 +41,7 @@ type Toolset struct { McpSlug pgtype.Text McpIsPublic bool McpEnabled bool + RateLimitRpm pgtype.Int4 ToolSelectionMode string CustomDomainID uuid.NullUUID ExternalOauthServerID uuid.NullUUID diff --git a/server/internal/toolsets/repo/queries.sql.go b/server/internal/toolsets/repo/queries.sql.go index 720d6ee9b7..b3977d6e24 100644 --- a/server/internal/toolsets/repo/queries.sql.go +++ b/server/internal/toolsets/repo/queries.sql.go @@ -44,7 +44,7 @@ SET , oauth_proxy_server_id = NULL , updated_at = clock_timestamp() WHERE slug = $1 AND project_id = $2 -RETURNING id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +RETURNING id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted ` type ClearToolsetOAuthServersParams struct { @@ -66,6 +66,7 @@ func (q *Queries) ClearToolsetOAuthServers(ctx context.Context, arg ClearToolset &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -114,7 +115,7 @@ INSERT INTO toolsets ( , $7 , $8 ) -RETURNING id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +RETURNING id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted ` type CreateToolsetParams struct { @@ -151,6 +152,7 @@ func (q *Queries) CreateToolset(ctx context.Context, arg CreateToolsetParams) (T &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -429,7 +431,7 @@ func (q *Queries) GetPromptTemplatesForToolset(ctx context.Context, arg GetPromp } const getToolset = `-- name: GetToolset :one -SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted FROM toolsets WHERE slug = $1 AND project_id = $2 AND deleted IS FALSE ` @@ -453,6 +455,7 @@ func (q *Queries) GetToolset(ctx context.Context, arg GetToolsetParams) (Toolset &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -466,7 +469,7 @@ func (q *Queries) GetToolset(ctx context.Context, arg GetToolsetParams) (Toolset } const getToolsetByID = `-- name: GetToolsetByID :one -SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted FROM toolsets WHERE id = $1 AND deleted IS FALSE ` @@ -485,6 +488,7 @@ func (q *Queries) GetToolsetByID(ctx context.Context, id uuid.UUID) (Toolset, er &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -498,7 +502,7 @@ func (q *Queries) GetToolsetByID(ctx context.Context, id uuid.UUID) (Toolset, er } const getToolsetByMCPSlug = `-- name: GetToolsetByMCPSlug :one -SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted FROM toolsets WHERE mcp_slug = $1 AND project_id = $2 AND deleted IS FALSE ` @@ -523,6 +527,7 @@ func (q *Queries) GetToolsetByMCPSlug(ctx context.Context, arg GetToolsetByMCPSl &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -536,7 +541,7 @@ func (q *Queries) GetToolsetByMCPSlug(ctx context.Context, arg GetToolsetByMCPSl } const getToolsetByMcpSlug = `-- name: GetToolsetByMcpSlug :one -SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted FROM toolsets WHERE mcp_slug = $1 AND custom_domain_id IS NULL @@ -557,6 +562,7 @@ func (q *Queries) GetToolsetByMcpSlug(ctx context.Context, mcpSlug pgtype.Text) &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -570,7 +576,7 @@ func (q *Queries) GetToolsetByMcpSlug(ctx context.Context, mcpSlug pgtype.Text) } const getToolsetByMcpSlugAndCustomDomain = `-- name: GetToolsetByMcpSlugAndCustomDomain :one -SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted FROM toolsets WHERE mcp_slug = $1 AND custom_domain_id = $2 @@ -596,6 +602,7 @@ func (q *Queries) GetToolsetByMcpSlugAndCustomDomain(ctx context.Context, arg Ge &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -609,7 +616,7 @@ func (q *Queries) GetToolsetByMcpSlugAndCustomDomain(ctx context.Context, arg Ge } const getToolsetByMcpSlugAndProject = `-- name: GetToolsetByMcpSlugAndProject :one -SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted FROM toolsets WHERE mcp_slug = $1 AND project_id = $2 @@ -635,6 +642,7 @@ func (q *Queries) GetToolsetByMcpSlugAndProject(ctx context.Context, arg GetTool &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -682,7 +690,7 @@ func (q *Queries) GetToolsetPromptTemplateNames(ctx context.Context, arg GetTool const getToolsetsByToolURN = `-- name: GetToolsetsByToolURN :many SELECT - t.id, t.organization_id, t.project_id, t.name, t.slug, t.description, t.default_environment_slug, t.mcp_slug, t.mcp_is_public, t.mcp_enabled, t.tool_selection_mode, t.custom_domain_id, t.external_oauth_server_id, t.oauth_proxy_server_id, t.created_at, t.updated_at, t.deleted_at, t.deleted, + t.id, t.organization_id, t.project_id, t.name, t.slug, t.description, t.default_environment_slug, t.mcp_slug, t.mcp_is_public, t.mcp_enabled, t.rate_limit_rpm, t.tool_selection_mode, t.custom_domain_id, t.external_oauth_server_id, t.oauth_proxy_server_id, t.created_at, t.updated_at, t.deleted_at, t.deleted, tv.version as latest_version FROM toolsets t JOIN toolset_versions tv ON t.id = tv.toolset_id @@ -714,6 +722,7 @@ type GetToolsetsByToolURNRow struct { McpSlug pgtype.Text McpIsPublic bool McpEnabled bool + RateLimitRpm pgtype.Int4 ToolSelectionMode string CustomDomainID uuid.NullUUID ExternalOauthServerID uuid.NullUUID @@ -745,6 +754,7 @@ func (q *Queries) GetToolsetsByToolURN(ctx context.Context, arg GetToolsetsByToo &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -766,7 +776,7 @@ func (q *Queries) GetToolsetsByToolURN(ctx context.Context, arg GetToolsetsByToo } const listEnabledToolsetsByOrganization = `-- name: ListEnabledToolsetsByOrganization :many -SELECT t.id, t.organization_id, t.project_id, t.name, t.slug, t.description, t.default_environment_slug, t.mcp_slug, t.mcp_is_public, t.mcp_enabled, t.tool_selection_mode, t.custom_domain_id, t.external_oauth_server_id, t.oauth_proxy_server_id, t.created_at, t.updated_at, t.deleted_at, t.deleted +SELECT t.id, t.organization_id, t.project_id, t.name, t.slug, t.description, t.default_environment_slug, t.mcp_slug, t.mcp_is_public, t.mcp_enabled, t.rate_limit_rpm, t.tool_selection_mode, t.custom_domain_id, t.external_oauth_server_id, t.oauth_proxy_server_id, t.created_at, t.updated_at, t.deleted_at, t.deleted FROM toolsets t JOIN projects p ON t.project_id = p.id WHERE p.organization_id = $1 @@ -796,6 +806,7 @@ func (q *Queries) ListEnabledToolsetsByOrganization(ctx context.Context, organiz &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -816,7 +827,7 @@ func (q *Queries) ListEnabledToolsetsByOrganization(ctx context.Context, organiz } const listToolsetsByProject = `-- name: ListToolsetsByProject :many -SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +SELECT id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted FROM toolsets WHERE project_id = $1 AND deleted IS FALSE @@ -843,6 +854,7 @@ func (q *Queries) ListToolsetsByProject(ctx context.Context, projectID uuid.UUID &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -873,9 +885,10 @@ SET , custom_domain_id = COALESCE($6, custom_domain_id) , mcp_enabled = COALESCE($7, mcp_enabled) , tool_selection_mode = COALESCE($8, tool_selection_mode) + , rate_limit_rpm = COALESCE($9, rate_limit_rpm) , updated_at = clock_timestamp() -WHERE slug = $9 AND project_id = $10 -RETURNING id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +WHERE slug = $10 AND project_id = $11 +RETURNING id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted ` type UpdateToolsetParams struct { @@ -887,6 +900,7 @@ type UpdateToolsetParams struct { CustomDomainID uuid.NullUUID McpEnabled bool ToolSelectionMode string + RateLimitRpm pgtype.Int4 Slug string ProjectID uuid.UUID } @@ -901,6 +915,7 @@ func (q *Queries) UpdateToolset(ctx context.Context, arg UpdateToolsetParams) (T arg.CustomDomainID, arg.McpEnabled, arg.ToolSelectionMode, + arg.RateLimitRpm, arg.Slug, arg.ProjectID, ) @@ -916,6 +931,7 @@ func (q *Queries) UpdateToolset(ctx context.Context, arg UpdateToolsetParams) (T &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -934,7 +950,7 @@ SET external_oauth_server_id = $1 , updated_at = clock_timestamp() WHERE slug = $2 AND project_id = $3 -RETURNING id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +RETURNING id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted ` type UpdateToolsetExternalOAuthServerParams struct { @@ -957,6 +973,7 @@ func (q *Queries) UpdateToolsetExternalOAuthServer(ctx context.Context, arg Upda &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, @@ -975,7 +992,7 @@ SET oauth_proxy_server_id = $1 , updated_at = clock_timestamp() WHERE slug = $2 AND project_id = $3 -RETURNING id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted +RETURNING id, organization_id, project_id, name, slug, description, default_environment_slug, mcp_slug, mcp_is_public, mcp_enabled, rate_limit_rpm, tool_selection_mode, custom_domain_id, external_oauth_server_id, oauth_proxy_server_id, created_at, updated_at, deleted_at, deleted ` type UpdateToolsetOAuthProxyServerParams struct { @@ -998,6 +1015,7 @@ func (q *Queries) UpdateToolsetOAuthProxyServer(ctx context.Context, arg UpdateT &i.McpSlug, &i.McpIsPublic, &i.McpEnabled, + &i.RateLimitRpm, &i.ToolSelectionMode, &i.CustomDomainID, &i.ExternalOauthServerID, diff --git a/server/migrations/20260307032453_rate-limiting.sql b/server/migrations/20260307032453_rate-limiting.sql new file mode 100644 index 0000000000..720de7f0af --- /dev/null +++ b/server/migrations/20260307032453_rate-limiting.sql @@ -0,0 +1,15 @@ +-- Modify "toolsets" table +ALTER TABLE "toolsets" ADD COLUMN "rate_limit_rpm" integer NULL; +-- Create "platform_rate_limits" table +CREATE TABLE "platform_rate_limits" ( + "id" uuid NOT NULL DEFAULT gen_random_uuid(), + "attribute_type" text NOT NULL, + "attribute_value" text NOT NULL, + "requests_per_minute" integer NOT NULL, + "created_at" timestamptz NOT NULL DEFAULT clock_timestamp(), + "updated_at" timestamptz NOT NULL DEFAULT clock_timestamp(), + PRIMARY KEY ("id"), + CONSTRAINT "platform_rate_limits_attribute_type_value_key" UNIQUE ("attribute_type", "attribute_value"), + CONSTRAINT "platform_rate_limits_attribute_type_check" CHECK (attribute_type = ANY (ARRAY['mcp_slug'::text, 'project'::text, 'organization'::text])), + CONSTRAINT "platform_rate_limits_requests_per_minute_check" CHECK (requests_per_minute > 0) +); diff --git a/server/migrations/atlas.sum b/server/migrations/atlas.sum index 21f2fe3cc6..3509841824 100644 --- a/server/migrations/atlas.sum +++ b/server/migrations/atlas.sum @@ -1,4 +1,4 @@ -h1:pm4L3uTSog+rumqkSJ45WvFmDek3FUjEk4PmBd8gDQY= +h1:uCF28ld68xMHed0XcuAUJGngqONVgD7wFFGWZlCPfkI= 20250502122425_initial-tables.sql h1:Hu3O60/bB4fjZpUay8FzyOjw6vngp087zU+U/wVKn7k= 20250502130852_initial-indexes.sql h1:oYbnwi9y9PPTqu7uVbSPSALhCY8XF3rv03nDfG4b7mo= 20250502154250_relax-http-security-fields.sql h1:0+OYIDq7IHmx7CP5BChVwfpF2rOSrRDxnqawXio2EVo= @@ -112,3 +112,4 @@ h1:pm4L3uTSog+rumqkSJ45WvFmDek3FUjEk4PmBd8gDQY= 20260305144932_add-workos-org-id.sql h1:KNcwC34iHLPViXsZrVK5ugIwGs1WZXs0sbUoYc8tNBE= 20260306000001_increase-api-key-name-length.sql h1:V2z6Vz8TIKPnm5YU1j35xa3zN0HNQ/ypm4BJA8rxz6E= 20260306123333_add-selected-remotes-column.sql h1:rxIWPKJv8Skpp6GPr4sTKWVL2SmVh3w5S4Un0CWMK38= +20260307032453_rate-limiting.sql h1:+3We29txw+81qL3HNUuOJ/WL07z37Q6YosRrcAMoaZ4= From 9e383b564cc71a02685fcec5ea2a5c072e99aca9 Mon Sep 17 00:00:00 2001 From: Sagar Batchu Date: Sat, 7 Mar 2026 18:48:43 -0800 Subject: [PATCH 2/2] test: add rate limiting tests and extract Limiter interface Introduce ratelimit.Limiter interface so middleware and MCP service can be unit tested with mock rate limiters instead of requiring Redis. Tests added: - writeJSONRPCRateLimitError: response shape, min retryAfterMs clamping - checkCustomerRateLimit: nil limiter, invalid RPM, zero RPM, allowed, blocked, fail-open on error - RateLimitMiddleware: skip GET, skip non-MCP, allowed with headers, blocked with 429, fail-open, config override, authenticated route key - resolveLimit: nil loader, no override, with override, config error - RecordRateLimitCheck: valid counter, nil counter Co-Authored-By: Claude Opus 4.6 --- server/internal/mcp/impl.go | 4 +- server/internal/mcp/metrics_test.go | 21 ++ server/internal/mcp/ratelimit_test.go | 220 +++++++++++++++++ server/internal/middleware/ratelimit.go | 2 +- server/internal/middleware/ratelimit_test.go | 246 +++++++++++++++++++ server/internal/ratelimit/ratelimit.go | 5 + 6 files changed, 495 insertions(+), 3 deletions(-) create mode 100644 server/internal/mcp/ratelimit_test.go diff --git a/server/internal/mcp/impl.go b/server/internal/mcp/impl.go index 96d0d3b558..19987c3335 100644 --- a/server/internal/mcp/impl.go +++ b/server/internal/mcp/impl.go @@ -91,7 +91,7 @@ type Service struct { externalmcpRepo *externalmcp_repo.Queries deploymentsRepo *deployments_repo.Queries enc *encryption.Client - rateLimiter *ratelimit.RateLimiter + rateLimiter ratelimit.Limiter } type oauthTokenInputs struct { @@ -142,7 +142,7 @@ func NewService( features *productfeatures.Client, vectorToolStore *rag.ToolsetVectorStore, temporal *temporal.Environment, - rateLimiter *ratelimit.RateLimiter, + rateLimiter ratelimit.Limiter, ) *Service { tracer := tracerProvider.Tracer("github.com/speakeasy-api/gram/server/internal/mcp") meter := meterProvider.Meter("github.com/speakeasy-api/gram/server/internal/mcp") diff --git a/server/internal/mcp/metrics_test.go b/server/internal/mcp/metrics_test.go index 64e3b26e39..bd146f6629 100644 --- a/server/internal/mcp/metrics_test.go +++ b/server/internal/mcp/metrics_test.go @@ -72,3 +72,24 @@ func TestMetrics_RecordMCPRequestDuration(t *testing.T) { m.RecordMCPRequestDuration(context.Background(), "tools/call", "https://mcp.example.com", 100*time.Millisecond) }) } + +func TestMetrics_RecordRateLimitCheckWithValidCounter(t *testing.T) { + t.Parallel() + meter := noop.NewMeterProvider().Meter("test") + logger := slog.New(slog.DiscardHandler) + m := newMetrics(meter, logger) + + // Should not panic for allowed and limited outcomes. + m.RecordRateLimitCheck(context.Background(), "customer", "test-key", true) + m.RecordRateLimitCheck(context.Background(), "platform", "test-slug", false) +} + +func TestMetrics_RecordRateLimitCheckNilCounter(t *testing.T) { + t.Parallel() + m := &metrics{ + rateLimitCheckCounter: nil, + } + + // Should not panic when counter is nil. + m.RecordRateLimitCheck(context.Background(), "customer", "test-key", true) +} diff --git a/server/internal/mcp/ratelimit_test.go b/server/internal/mcp/ratelimit_test.go new file mode 100644 index 0000000000..a6d252a556 --- /dev/null +++ b/server/internal/mcp/ratelimit_test.go @@ -0,0 +1,220 @@ +package mcp + +import ( + "context" + "encoding/json" + "fmt" + "log/slog" + "net/http" + "net/http/httptest" + "testing" + "time" + + "github.com/jackc/pgx/v5/pgtype" + "github.com/speakeasy-api/gram/server/internal/ratelimit" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/metric/noop" +) + +// mockLimiter is a test double for ratelimit.Limiter. +type mockLimiter struct { + result ratelimit.Result + err error +} + +func (m *mockLimiter) Allow(_ context.Context, _ string, _ int) (ratelimit.Result, error) { + return m.result, m.err +} + +func TestWriteJSONRPCRateLimitErrorResponseShape(t *testing.T) { + t.Parallel() + + w := httptest.NewRecorder() + resetAt := time.Now().Add(30 * time.Second) + result := ratelimit.Result{ + Allowed: false, + Limit: 100, + Remaining: 0, + ResetAt: resetAt, + } + + err := writeJSONRPCRateLimitError(w, 100, result) + require.NoError(t, err) + + require.Equal(t, http.StatusOK, w.Code, "JSON-RPC errors use HTTP 200") + require.Equal(t, "application/json", w.Header().Get("Content-Type")) + + var body map[string]any + err = json.Unmarshal(w.Body.Bytes(), &body) + require.NoError(t, err) + + require.Equal(t, "2.0", body["jsonrpc"]) + require.Nil(t, body["id"]) + + errObj, ok := body["error"].(map[string]any) + require.True(t, ok, "error field should be an object") + require.Equal(t, float64(rateLimitExceeded), errObj["code"]) + require.Contains(t, errObj["message"], "100 requests per minute") + + data, ok := errObj["data"].(map[string]any) + require.True(t, ok, "error.data should be an object") + require.Equal(t, "1m", data["window"]) + require.Equal(t, float64(100), data["limit"]) + require.Greater(t, data["retryAfterMs"], float64(0)) +} + +func TestWriteJSONRPCRateLimitErrorMinRetryAfter(t *testing.T) { + t.Parallel() + + w := httptest.NewRecorder() + // ResetAt in the past — retryAfterMs should be clamped to 1000. + result := ratelimit.Result{ + Allowed: false, + Limit: 10, + Remaining: 0, + ResetAt: time.Now().Add(-5 * time.Second), + } + + err := writeJSONRPCRateLimitError(w, 10, result) + require.NoError(t, err) + + var body map[string]any + err = json.Unmarshal(w.Body.Bytes(), &body) + require.NoError(t, err) + + errObj := body["error"].(map[string]any) + data := errObj["data"].(map[string]any) + require.Equal(t, float64(1000), data["retryAfterMs"], "retryAfterMs should be at least 1000") +} + +func TestCheckCustomerRateLimitNilLimiter(t *testing.T) { + t.Parallel() + + s := &Service{ + rateLimiter: nil, + logger: slog.New(slog.DiscardHandler), + } + + w := httptest.NewRecorder() + rpm := pgtype.Int4{Int32: 100, Valid: true} + + limited, err := s.checkCustomerRateLimit(context.Background(), w, rpm, "test-key") + require.NoError(t, err) + require.False(t, limited, "nil limiter should allow all requests") +} + +func TestCheckCustomerRateLimitInvalidRPM(t *testing.T) { + t.Parallel() + + s := &Service{ + rateLimiter: &mockLimiter{}, + logger: slog.New(slog.DiscardHandler), + } + + w := httptest.NewRecorder() + + // Null RPM (not configured). + limited, err := s.checkCustomerRateLimit(context.Background(), w, pgtype.Int4{Valid: false}, "test-key") + require.NoError(t, err) + require.False(t, limited, "null RPM should skip rate limiting") +} + +func TestCheckCustomerRateLimitZeroRPM(t *testing.T) { + t.Parallel() + + s := &Service{ + rateLimiter: &mockLimiter{}, + logger: slog.New(slog.DiscardHandler), + } + + w := httptest.NewRecorder() + + // Zero RPM should be treated as unconfigured. + limited, err := s.checkCustomerRateLimit(context.Background(), w, pgtype.Int4{Int32: 0, Valid: true}, "test-key") + require.NoError(t, err) + require.False(t, limited, "zero RPM should skip rate limiting") +} + +func TestCheckCustomerRateLimitAllowed(t *testing.T) { + t.Parallel() + + meter := noop.NewMeterProvider().Meter("test") + s := &Service{ + rateLimiter: &mockLimiter{ + result: ratelimit.Result{ + Allowed: true, + Limit: 100, + Remaining: 99, + ResetAt: time.Now().Add(time.Minute), + }, + }, + logger: slog.New(slog.DiscardHandler), + metrics: newMetrics(meter, slog.New(slog.DiscardHandler)), + } + + w := httptest.NewRecorder() + rpm := pgtype.Int4{Int32: 100, Valid: true} + + limited, err := s.checkCustomerRateLimit(context.Background(), w, rpm, "test-key") + require.NoError(t, err) + require.False(t, limited) + + // Rate limit headers should be set. + require.Equal(t, "100", w.Header().Get(ratelimit.HeaderRateLimitLimit)) + require.Equal(t, "99", w.Header().Get(ratelimit.HeaderRateLimitRemaining)) + require.NotEmpty(t, w.Header().Get(ratelimit.HeaderRateLimitReset)) +} + +func TestCheckCustomerRateLimitBlocked(t *testing.T) { + t.Parallel() + + meter := noop.NewMeterProvider().Meter("test") + s := &Service{ + rateLimiter: &mockLimiter{ + result: ratelimit.Result{ + Allowed: false, + Limit: 50, + Remaining: 0, + ResetAt: time.Now().Add(30 * time.Second), + }, + }, + logger: slog.New(slog.DiscardHandler), + metrics: newMetrics(meter, slog.New(slog.DiscardHandler)), + } + + w := httptest.NewRecorder() + rpm := pgtype.Int4{Int32: 50, Valid: true} + + limited, err := s.checkCustomerRateLimit(context.Background(), w, rpm, "test-key") + require.NoError(t, err) + require.True(t, limited, "should indicate request was rate limited") + + // Verify the JSON-RPC error was written. + require.Equal(t, http.StatusOK, w.Code, "JSON-RPC errors use HTTP 200") + + var body map[string]any + err = json.Unmarshal(w.Body.Bytes(), &body) + require.NoError(t, err) + require.Equal(t, "2.0", body["jsonrpc"]) + + errObj := body["error"].(map[string]any) + require.Equal(t, float64(rateLimitExceeded), errObj["code"]) +} + +func TestCheckCustomerRateLimitFailOpen(t *testing.T) { + t.Parallel() + + s := &Service{ + rateLimiter: &mockLimiter{ + err: fmt.Errorf("redis connection refused"), + }, + logger: slog.New(slog.DiscardHandler), + } + + w := httptest.NewRecorder() + rpm := pgtype.Int4{Int32: 100, Valid: true} + + limited, err := s.checkCustomerRateLimit(context.Background(), w, rpm, "test-key") + require.NoError(t, err) + require.False(t, limited, "should fail open on rate limiter error") +} diff --git a/server/internal/middleware/ratelimit.go b/server/internal/middleware/ratelimit.go index 19a87d2e1e..98651308d7 100644 --- a/server/internal/middleware/ratelimit.go +++ b/server/internal/middleware/ratelimit.go @@ -39,7 +39,7 @@ type rateLimitErrorResponse struct { // It extracts the MCP slug from the URL path and checks against the rate limiter. // Only applies to POST requests to /mcp/{slug} and /mcp/{project}/{toolset}/{environment} paths. // Non-MCP requests and non-POST methods pass through unchanged. -func RateLimitMiddleware(limiter *ratelimit.RateLimiter, configLoader RateLimitConfigLoader, logger *slog.Logger) func(http.Handler) http.Handler { +func RateLimitMiddleware(limiter ratelimit.Limiter, configLoader RateLimitConfigLoader, logger *slog.Logger) func(http.Handler) http.Handler { logger = logger.With(attr.SlogComponent("ratelimit")) meter := otel.GetMeterProvider().Meter("github.com/speakeasy-api/gram/server/internal/middleware") diff --git a/server/internal/middleware/ratelimit_test.go b/server/internal/middleware/ratelimit_test.go index 259e4d43e8..2785e8a35d 100644 --- a/server/internal/middleware/ratelimit_test.go +++ b/server/internal/middleware/ratelimit_test.go @@ -1,11 +1,21 @@ package middleware import ( + "context" + "encoding/json" + "fmt" + "log/slog" + "net/http" + "net/http/httptest" "testing" + "time" + "github.com/speakeasy-api/gram/server/internal/ratelimit" "github.com/stretchr/testify/require" ) +// --- extractMCPKey tests --- + func TestExtractMCPKeyPublicRoute(t *testing.T) { key, ok := extractMCPKey("/mcp/my-server") require.True(t, ok) @@ -50,3 +60,239 @@ func TestExtractMCPKeyRootPath(t *testing.T) { _, ok := extractMCPKey("/") require.False(t, ok) } + +// --- mock types --- + +type mockLimiter struct { + result ratelimit.Result + err error + called bool + key string +} + +func (m *mockLimiter) Allow(_ context.Context, key string, _ int) (ratelimit.Result, error) { + m.called = true + m.key = key + return m.result, m.err +} + +type mockConfigLoader struct { + limit int + err error +} + +func (m *mockConfigLoader) GetLimit(_ context.Context, _, _ string) (int, error) { + return m.limit, m.err +} + +// nextHandler records whether the downstream handler was called. +func nextHandler(called *bool) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { + *called = true + w.WriteHeader(http.StatusOK) + }) +} + +// --- middleware tests --- + +func TestRateLimitMiddlewareSkipsGetRequests(t *testing.T) { + t.Parallel() + + limiter := &mockLimiter{} + mw := RateLimitMiddleware(limiter, nil, slog.New(slog.DiscardHandler)) + + var called bool + handler := mw(nextHandler(&called)) + + req := httptest.NewRequest(http.MethodGet, "/mcp/my-server", nil) + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + require.True(t, called, "GET requests should pass through") + require.False(t, limiter.called, "limiter should not be invoked for GET") +} + +func TestRateLimitMiddlewareSkipsNonMCPPaths(t *testing.T) { + t.Parallel() + + limiter := &mockLimiter{} + mw := RateLimitMiddleware(limiter, nil, slog.New(slog.DiscardHandler)) + + var called bool + handler := mw(nextHandler(&called)) + + req := httptest.NewRequest(http.MethodPost, "/api/v1/tools", nil) + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + require.True(t, called, "non-MCP paths should pass through") + require.False(t, limiter.called, "limiter should not be invoked for non-MCP paths") +} + +func TestRateLimitMiddlewareAllowedRequest(t *testing.T) { + t.Parallel() + + resetAt := time.Now().Add(time.Minute) + limiter := &mockLimiter{ + result: ratelimit.Result{ + Allowed: true, + Limit: 600, + Remaining: 599, + ResetAt: resetAt, + }, + } + mw := RateLimitMiddleware(limiter, nil, slog.New(slog.DiscardHandler)) + + var called bool + handler := mw(nextHandler(&called)) + + req := httptest.NewRequest(http.MethodPost, "/mcp/my-server", nil) + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + require.True(t, called, "allowed requests should reach the next handler") + require.True(t, limiter.called) + require.Equal(t, "platform:my-server", limiter.key) + + // Rate limit headers should be present. + require.Equal(t, "600", w.Header().Get(ratelimit.HeaderRateLimitLimit)) + require.Equal(t, "599", w.Header().Get(ratelimit.HeaderRateLimitRemaining)) + require.NotEmpty(t, w.Header().Get(ratelimit.HeaderRateLimitReset)) +} + +func TestRateLimitMiddlewareBlockedRequest(t *testing.T) { + t.Parallel() + + resetAt := time.Now().Add(30 * time.Second) + limiter := &mockLimiter{ + result: ratelimit.Result{ + Allowed: false, + Limit: 600, + Remaining: 0, + ResetAt: resetAt, + }, + } + mw := RateLimitMiddleware(limiter, nil, slog.New(slog.DiscardHandler)) + + var called bool + handler := mw(nextHandler(&called)) + + req := httptest.NewRequest(http.MethodPost, "/mcp/my-server", nil) + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + require.False(t, called, "blocked requests should NOT reach the next handler") + require.Equal(t, http.StatusTooManyRequests, w.Code) + require.NotEmpty(t, w.Header().Get("Retry-After")) + require.Equal(t, "application/json", w.Header().Get("Content-Type")) + + var body rateLimitErrorResponse + err := json.Unmarshal(w.Body.Bytes(), &body) + require.NoError(t, err) + require.Equal(t, "rate limit exceeded", body.Error) + require.Greater(t, body.RetryAfter, 0) +} + +func TestRateLimitMiddlewareFailsOpenOnLimiterError(t *testing.T) { + t.Parallel() + + limiter := &mockLimiter{ + err: fmt.Errorf("redis connection refused"), + } + mw := RateLimitMiddleware(limiter, nil, slog.New(slog.DiscardHandler)) + + var called bool + handler := mw(nextHandler(&called)) + + req := httptest.NewRequest(http.MethodPost, "/mcp/my-server", nil) + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + require.True(t, called, "should fail open and pass request through") + require.Equal(t, http.StatusOK, w.Code) +} + +func TestRateLimitMiddlewareUsesConfigOverride(t *testing.T) { + t.Parallel() + + limiter := &mockLimiter{ + result: ratelimit.Result{ + Allowed: true, + Limit: 1000, + Remaining: 999, + ResetAt: time.Now().Add(time.Minute), + }, + } + configLoader := &mockConfigLoader{limit: 1000} + mw := RateLimitMiddleware(limiter, configLoader, slog.New(slog.DiscardHandler)) + + var called bool + handler := mw(nextHandler(&called)) + + req := httptest.NewRequest(http.MethodPost, "/mcp/my-server", nil) + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + require.True(t, called) + require.Equal(t, "1000", w.Header().Get(ratelimit.HeaderRateLimitLimit)) +} + +func TestRateLimitMiddlewareAuthenticatedRouteKey(t *testing.T) { + t.Parallel() + + limiter := &mockLimiter{ + result: ratelimit.Result{ + Allowed: true, + Limit: 600, + Remaining: 599, + ResetAt: time.Now().Add(time.Minute), + }, + } + mw := RateLimitMiddleware(limiter, nil, slog.New(slog.DiscardHandler)) + + var called bool + handler := mw(nextHandler(&called)) + + req := httptest.NewRequest(http.MethodPost, "/mcp/my-project/my-toolset/production", nil) + w := httptest.NewRecorder() + handler.ServeHTTP(w, req) + + require.True(t, called) + require.Equal(t, "platform:my-project:my-toolset", limiter.key) +} + +// --- resolveLimit tests --- + +func TestResolveLimitNilConfigLoader(t *testing.T) { + t.Parallel() + + limit, err := resolveLimit(context.Background(), nil, "my-slug") + require.NoError(t, err) + require.Equal(t, defaultPlatformRateLimit, limit) +} + +func TestResolveLimitNoOverride(t *testing.T) { + t.Parallel() + + loader := &mockConfigLoader{limit: 0} + limit, err := resolveLimit(context.Background(), loader, "my-slug") + require.NoError(t, err) + require.Equal(t, defaultPlatformRateLimit, limit) +} + +func TestResolveLimitWithOverride(t *testing.T) { + t.Parallel() + + loader := &mockConfigLoader{limit: 1000} + limit, err := resolveLimit(context.Background(), loader, "my-slug") + require.NoError(t, err) + require.Equal(t, 1000, limit) +} + +func TestResolveLimitConfigError(t *testing.T) { + t.Parallel() + + loader := &mockConfigLoader{err: fmt.Errorf("db connection lost")} + _, err := resolveLimit(context.Background(), loader, "my-slug") + require.Error(t, err) +} diff --git a/server/internal/ratelimit/ratelimit.go b/server/internal/ratelimit/ratelimit.go index 3beb0da144..01c448e088 100644 --- a/server/internal/ratelimit/ratelimit.go +++ b/server/internal/ratelimit/ratelimit.go @@ -30,6 +30,11 @@ type Result struct { ResetAt time.Time } +// Limiter checks whether a request is within its rate limit. +type Limiter interface { + Allow(ctx context.Context, key string, limit int) (Result, error) +} + // RateLimiter performs rate limit checks against Redis using a fixed-window counter. type RateLimiter struct { client *redis.Client