diff --git a/apps/docs/content/docs/en/integrations/cloudflare.mdx b/apps/docs/content/docs/en/integrations/cloudflare.mdx index 8338f2d0c08..e8c8e34c48d 100644 --- a/apps/docs/content/docs/en/integrations/cloudflare.mdx +++ b/apps/docs/content/docs/en/integrations/cloudflare.mdx @@ -494,7 +494,7 @@ Gets DNS analytics report for a zone including query counts and trends. | `zoneId` | string | Yes | The zone ID to get DNS analytics for | | `since` | string | No | Start date for analytics \(ISO 8601, e.g., "2024-01-01T00:00:00Z"\) or relative \(e.g., "-6h"\) | | `until` | string | No | End date for analytics \(ISO 8601, e.g., "2024-01-31T23:59:59Z"\) or relative \(e.g., "now"\) | -| `metrics` | string | Yes | Comma-separated metrics to retrieve \(e.g., "queryCount,uncachedCount,staleCount,responseTimeAvg,responseTimeMedian,responseTime90th,responseTime99th"\) | +| `metrics` | string | No | Comma-separated metrics to retrieve \(e.g., "queryCount,uncachedCount,staleCount,responseTimeAvg,responseTimeMedian,responseTime90th,responseTime99th"\). Optional — Cloudflare returns its default metric set when it is omitted | | `dimensions` | string | No | Comma-separated dimensions to group by \(e.g., "queryName,queryType,responseCode,responseCached,coloName,origin,dayOfWeek,tcp,ipVersion,querySizeBucket,responseSizeBucket"\) | | `filters` | string | No | Filters to apply to the data \(e.g., "queryType==A"\) | | `sort` | string | No | Sort order for the result set. Fields must be included in metrics or dimensions \(e.g., "+queryCount" or "-responseTimeAvg"\) | @@ -678,7 +678,7 @@ Creates a zone ruleset for a phase, optionally seeded with its first rules. Use | `zoneId` | string | Yes | The zone ID to create the ruleset in | | `name` | string | Yes | Human-readable name for the ruleset | | `phase` | string | Yes | The ruleset phase, e.g. http_ratelimit, http_request_firewall_custom, http_request_firewall_managed, http_request_transform, http_request_dynamic_redirect | -| `kind` | string | No | Ruleset kind: zone, custom, managed, or root. Use zone to create a phase entry point ruleset. Defaults to zone | +| `kind` | string | No | Ruleset kind: zone or custom. Use zone to create a phase entry point ruleset and custom for a ruleset an execute rule deploys. Defaults to zone. "root" is the account-level phase entry point and "managed" is Cloudflare-owned, so neither can be created on this zone-scoped endpoint | | `description` | string | No | Description of the ruleset | | `rules` | json | No | JSON array of rules to seed the ruleset with, in evaluation order. Each rule takes action, expression, and optionally description, enabled, action_parameters, and ratelimit | | `apiKey` | string | Yes | Cloudflare API Token | @@ -767,8 +767,8 @@ Updates a rule in a zone ruleset. Cloudflare replaces the rule definition rather | `expression` | string | Yes | Cloudflare filter expression selecting matching requests. Required because this endpoint replaces the rule definition — omitting it resets the stored expression | | `description` | string | No | Human-readable description of the rule | | `enabled` | boolean | No | Whether the rule is enabled | -| `ref` | string | No | Reference tag that stays stable across rule updates | -| `actionParameters` | string | No | JSON object of action-specific parameters, e.g. \{"id":"<MANAGED_RULESET_ID>","overrides":\{"rules":\[\{"id":"<RULE_ID>","action":"log","enabled":true,"score_threshold":40\}\]\}\} | +| `ref` | string | No | Reference tag that stays stable across rule updates. Because the update replaces the rule, omitting it resets the tag to the rule ID and breaks anything matching on the old value | +| `actionParameters` | string | No | JSON object of action-specific parameters, e.g. \{"id":"<MANAGED_RULESET_ID>","overrides":\{"rules":\[\{"id":"<RULE_ID>","action":"log","enabled":true,"score_threshold":40\}\]\}\}. Required on an execute rule and must be sent on every update: the endpoint replaces the rule, so omitting it resets action_parameters to \{\} — which unbinds the managed ruleset the rule deploys and every override under it | | `ratelimit` | string | No | JSON rate limiting configuration to preserve on a rule in the http_ratelimit phase, e.g. \{"characteristics":\["cf.colo.id","ip.src"\],"period":60,"requests_per_period":100\}. Because the update replaces the rule, omitting this on a rate limiting rule stops it rate limiting | | `logging` | string | No | JSON logging configuration to preserve, e.g. \{"enabled":true\}. Omitting it on a rule that had logging configured resets it to the default | | `apiKey` | string | Yes | Cloudflare API Token | @@ -1075,8 +1075,8 @@ Creates a Cloudflare Access (Zero Trust) application that puts an identity check | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `accountId` | string | Yes | The Cloudflare account ID. Access applications are account-scoped | -| `type` | string | Yes | Application type: self_hosted, saas, ssh, vnc, app_launcher, warp, biso, bookmark, dash_sso, infrastructure, rdp, mcp, mcp_portal, or proxy_endpoint | -| `domain` | string | No | The primary hostname and path secured by Access, e.g. internal.example.com or example.com/admin. Required for the self_hosted, ssh, vnc, rdp, and bookmark types; the saas, app_launcher, warp, biso, dash_sso, infrastructure, mcp, mcp_portal, and proxy_endpoint types do not accept it | +| `type` | string | Yes | Application type: self_hosted, saas, ssh, vnc, app_launcher, warp, biso, bookmark, infrastructure, rdp, mcp, mcp_portal, or proxy_endpoint. dash_sso has no request variant and cannot be created through the API | +| `domain` | string | No | The primary hostname and path secured by Access, e.g. internal.example.com or example.com/admin. Required for the self_hosted, ssh, vnc, and rdp types; optional for bookmark and mcp_portal; read-only for app_launcher, warp, biso, and proxy_endpoint; and absent from the saas, infrastructure, and mcp variants | | `name` | string | No | Friendly name shown in the dashboard and App Launcher | | `sessionDuration` | string | No | How long an Access session stays valid, e.g. 24h or 30m | | `allowedIdps` | string | No | Comma-separated identity provider IDs users may authenticate with. Leave empty to allow all configured providers | @@ -1087,6 +1087,8 @@ Creates a Cloudflare Access (Zero Trust) application that puts an identity check | `logoUrl` | string | No | Logo image URL shown in the dashboard and App Launcher | | `tags` | string | No | Comma-separated tag names categorizing the application | | `policies` | string | No | JSON array of policies to attach. Entries may be reusable policy IDs or inline policy objects, e.g. \["<POLICY_ID>"\] | +| `saasApp` | string | No | JSON SaaS configuration, required for the saas type and rejected on every other type. SAML, e.g. \{"auth_type":"saml","consumer_service_url":"https://example.com/acs","sp_entity_id":"https://example.com"\}; OIDC, e.g. \{"auth_type":"oidc","client_id":"...","redirect_uris":\["https://example.com/callback"\]\} | +| `targetCriteria` | string | No | JSON array of infrastructure target criteria, required for the infrastructure and rdp types and rejected on every other type, e.g. \[\{"port":22,"protocol":"SSH","target_attributes":\{"hostname":\["production"\]\}\}\] | | `apiKey` | string | Yes | Cloudflare API Token | #### Output @@ -1120,8 +1122,8 @@ Updates a Cloudflare Access (Zero Trust) application. This replaces the applicat | --------- | ---- | -------- | ----------- | | `accountId` | string | Yes | The Cloudflare account ID. Access applications are account-scoped | | `appId` | string | Yes | The Access application ID to update | -| `type` | string | Yes | Application type: self_hosted, saas, ssh, vnc, app_launcher, warp, biso, bookmark, dash_sso, infrastructure, rdp, mcp, mcp_portal, or proxy_endpoint | -| `domain` | string | No | The primary hostname and path secured by Access. Required for the self_hosted, ssh, vnc, rdp, and bookmark types; the saas, app_launcher, warp, biso, dash_sso, infrastructure, mcp, mcp_portal, and proxy_endpoint types do not accept it | +| `type` | string | Yes | Application type: self_hosted, saas, ssh, vnc, app_launcher, warp, biso, bookmark, infrastructure, rdp, mcp, mcp_portal, or proxy_endpoint. dash_sso has no request variant and cannot be written through the API | +| `domain` | string | No | The primary hostname and path secured by Access. Required for the self_hosted, ssh, vnc, and rdp types; optional for bookmark and mcp_portal; read-only for app_launcher, warp, biso, and proxy_endpoint; and absent from the saas, infrastructure, and mcp variants | | `name` | string | No | Friendly name shown in the dashboard and App Launcher | | `sessionDuration` | string | No | How long an Access session stays valid, e.g. 24h or 30m | | `allowedIdps` | string | No | Comma-separated identity provider IDs users may authenticate with | @@ -1131,6 +1133,8 @@ Updates a Cloudflare Access (Zero Trust) application. This replaces the applicat | `customDenyUrl` | string | No | URL denied users are redirected to | | `logoUrl` | string | No | Logo image URL shown in the dashboard and App Launcher | | `tags` | string | No | Comma-separated tag names categorizing the application | +| `saasApp` | string | No | JSON SaaS configuration, required for the saas type and rejected on every other type. SAML, e.g. \{"auth_type":"saml","consumer_service_url":"https://example.com/acs","sp_entity_id":"https://example.com"\}; OIDC, e.g. \{"auth_type":"oidc","client_id":"...","redirect_uris":\["https://example.com/callback"\]\} | +| `targetCriteria` | string | No | JSON array of infrastructure target criteria, required for the infrastructure and rdp types and rejected on every other type, e.g. \[\{"port":22,"protocol":"SSH","target_attributes":\{"hostname":\["production"\]\}\}\] | | `policies` | string | No | JSON array of policies to attach. Entries may be reusable policy IDs or inline policy objects | | `apiKey` | string | Yes | Cloudflare API Token | @@ -1224,7 +1228,7 @@ Creates a Cloudflare Access (Zero Trust) policy on an application, deciding who | `exclude` | string | No | JSON array of Access rules evaluated with NOT logic — matching any one rejects the request | | `require` | string | No | JSON array of Access rules evaluated with AND logic — all of them must match | | `precedence` | number | No | Evaluation order of the policy within the application | -| `sessionDuration` | string | No | How long a session granted by this policy stays valid, e.g. 24h | +| `sessionDuration` | string | No | How long a session granted by this policy stays valid, e.g. 24h. Leave it unset on a policy attached to an infrastructure-typed application — Cloudflare rejects those with error 12130 | | `approvalRequired` | boolean | No | Whether an approver must grant each access request | | `isolationRequired` | boolean | No | Whether the session must run in a remote isolated browser | | `purposeJustificationRequired` | boolean | No | Whether users must state a reason for access | @@ -1267,7 +1271,7 @@ Updates a Cloudflare Access (Zero Trust) policy on an application. This replaces | `exclude` | string | No | JSON array of Access rules evaluated with NOT logic | | `require` | string | No | JSON array of Access rules evaluated with AND logic | | `precedence` | number | No | Evaluation order of the policy within the application | -| `sessionDuration` | string | No | How long a session granted by this policy stays valid, e.g. 24h | +| `sessionDuration` | string | No | How long a session granted by this policy stays valid, e.g. 24h. Leave it unset on a policy attached to an infrastructure-typed application — Cloudflare rejects those with error 12130 | | `approvalRequired` | boolean | No | Whether an approver must grant each access request | | `isolationRequired` | boolean | No | Whether the session must run in a remote isolated browser | | `purposeJustificationRequired` | boolean | No | Whether users must state a reason for access | diff --git a/apps/docs/content/docs/en/integrations/crowdstrike.mdx b/apps/docs/content/docs/en/integrations/crowdstrike.mdx index 77c0813bb26..58a69fea6a1 100644 --- a/apps/docs/content/docs/en/integrations/crowdstrike.mdx +++ b/apps/docs/content/docs/en/integrations/crowdstrike.mdx @@ -148,7 +148,7 @@ Close an open CrowdStrike Falcon Real Time Response session (DELETE /real-time-r ### CrowdStrike Execute RTR Command -Run a read-only Real Time Response command in an open CrowdStrike Falcon session (POST /real-time-response/entities/command/v1). baseCommand names the family only (cat, cd, clear, csrutil, env, eventlog, filehash, getsid, help, history, ipconfig, ls, mount, netstat, ps, reg); subcommands go in commandString. Host-modifying commands need the Active Responder or Admin endpoints. Requires the "Real time response: Read" API scope. +Run a read-only Real Time Response command in an open CrowdStrike Falcon session (POST /real-time-response/entities/command/v1). baseCommand names the family only (cat, cd, clear, csrutil, env, eventlog, filehash, getsid, help, history, ifconfig, ipconfig, ls, mount, netstat, ps, reg, users); subcommands go in commandString. Host-modifying commands need the Active Responder or Admin endpoints. Requires the "Real time response: Read" API scope. #### Input @@ -158,7 +158,7 @@ Run a read-only Real Time Response command in an open CrowdStrike Falcon session | `clientSecret` | string | Yes | CrowdStrike Falcon API client secret | | `cloud` | string | Yes | CrowdStrike Falcon cloud region | | `sessionId` | string | Yes | RTR session ID returned by Init RTR Session | -| `baseCommand` | string | Yes | Read-only RTR base command family, one of: cat, cd, clear, csrutil, env, eventlog, filehash, getsid, help, history, ipconfig, ls, mount, netstat, ps, reg. Subcommands belong in commandString, not here. | +| `baseCommand` | string | Yes | Read-only RTR base command family, one of: cat, cd, clear, csrutil, env, eventlog, filehash, getsid, help, history, ifconfig, ipconfig, ls, mount, netstat, ps, reg, users. Subcommands belong in commandString, not here — and only reg query is read-tier, since reg set and reg delete are Active Responder commands. | | `commandString` | string | Yes | Full command line to run, such as "ls C:\\Windows" or "reg query HKLM\\Software" | #### Output @@ -501,6 +501,10 @@ Get CrowdStrike Identity Protection sensor details for one or more device IDs (P | ↳ `statusCauses` | array | Documented causes behind the current status | | ↳ `tiEnabled` | string | Threat intelligence enablement status | | `count` | number | Number of sensors returned | +| `pagination` | json | Pagination metadata \(limit, offset, total\) | +| ↳ `limit` | number | Page size used for the query | +| ↳ `offset` | number | Offset returned by CrowdStrike | +| ↳ `total` | number | Total records available | | `errors` | array | Errors CrowdStrike returned alongside a partially successful response | | ↳ `code` | number | CrowdStrike error code | | ↳ `id` | string | Identifier the error applies to | @@ -676,7 +680,7 @@ Add hosts to or remove hosts from a CrowdStrike Falcon static host group (POST / ### CrowdStrike Query Alerts -Search CrowdStrike Falcon alerts with a Falcon Query Language filter and return their composite IDs. Uses the current Alerts API (GET /alerts/queries/alerts/v2), which supersedes the deprecated Detects API. Requires the "Alerts: Read" API scope. +Search CrowdStrike Falcon alerts with a Falcon Query Language filter and return their composite IDs. Uses the current Alerts API (GET /alerts/queries/alerts/v2), which replaced the Detects API decommissioned on September 30, 2025. Requires the "Alerts: Read" API scope. #### Input @@ -902,7 +906,7 @@ Update CrowdStrike Falcon alerts by composite ID: change status, assign or unass ### CrowdStrike Update Indicators -Update custom CrowdStrike Falcon indicators of compromise by ID (PATCH /iocs/entities/indicators/v1). DESTRUCTIVE: CrowdStrike blanks out any field you omit, so read each indicator with crowdstrike_get_indicator_details first and resend its full field set with your edits applied. Changing action or scope changes prevention behavior fleet-wide. type and value are immutable. Requires the "IOC Management: Write" API scope. +Update custom CrowdStrike Falcon indicators of compromise by ID (PATCH /iocs/entities/indicators/v1). DESTRUCTIVE: omitted fields may be cleared, so read each indicator with crowdstrike_get_indicator_details first and resend its full field set with your edits applied. Changing action or scope changes prevention behavior fleet-wide. type and value are immutable. Requires the "IOC Management: Write" API scope. #### Input @@ -911,7 +915,7 @@ Update custom CrowdStrike Falcon indicators of compromise by ID (PATCH /iocs/ent | `clientId` | string | Yes | CrowdStrike Falcon API client ID | | `clientSecret` | string | Yes | CrowdStrike Falcon API client secret | | `cloud` | string | Yes | CrowdStrike Falcon cloud region | -| `indicators` | json | Yes | JSON array of indicators to update. Each entry requires id, and must also repeat every field it wants to keep: CrowdStrike blanks out any updatable field the entry omits. Updatable fields: action, severity, description, source, tags \(array\), platforms \(array\), applied_globally \(boolean\), host_groups \(array\), expiration \(ISO 8601\), mobile_action, metadata \(\{ filename \}\). type and value cannot be changed. | +| `indicators` | json | Yes | JSON array of indicators to update. Each entry requires id, and should also repeat every field it wants to keep: an updatable field the entry omits may be cleared. Updatable fields: action, severity, description, source, tags \(array\), platforms \(array\), applied_globally \(boolean\), host_groups \(array\), expiration \(ISO 8601\), mobile_action, metadata \(\{ filename \}\). type and value cannot be changed. | | `comment` | string | No | Audit comment explaining why these indicators were updated | | `retrodetects` | boolean | No | Whether to generate retroactive detections for the updated indicators | | `ignoreWarnings` | boolean | No | Whether to apply the updates even when CrowdStrike returns warnings | diff --git a/apps/docs/content/docs/en/integrations/datadog.mdx b/apps/docs/content/docs/en/integrations/datadog.mdx index 1f87000e751..af30f7efe9a 100644 --- a/apps/docs/content/docs/en/integrations/datadog.mdx +++ b/apps/docs/content/docs/en/integrations/datadog.mdx @@ -366,7 +366,7 @@ List all scheduled downtimes in Datadog. | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `currentOnly` | boolean | No | Only return currently active downtimes | -| `limit` | number | No | Number of downtimes to return per page \(default: 30, max: 100\) | +| `limit` | number | No | Number of downtimes to return per page. Datadog defaults to 30 and declares no maximum; keep this at 100 or below to stay within the bound Sim recommends. | | `offset` | number | No | Index of the first downtime to return \(e.g., 0, 30, 60\) | | `apiKey` | string | Yes | Datadog API key | | `applicationKey` | string | Yes | Datadog Application key | diff --git a/apps/docs/content/docs/en/integrations/microsoft_ad.mdx b/apps/docs/content/docs/en/integrations/microsoft_ad.mdx index a26033a2567..7cbefb0800e 100644 --- a/apps/docs/content/docs/en/integrations/microsoft_ad.mdx +++ b/apps/docs/content/docs/en/integrations/microsoft_ad.mdx @@ -46,9 +46,9 @@ List users in Azure AD (Microsoft Entra ID) | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `top` | number | No | Maximum number of users to return \(default 100, max 999\) | -| `filter` | string | No | OData filter expression \(e.g., "department eq \'Sales\'"\) | +| `filter` | string | No | OData filter expression \(e.g., "department eq 'Sales'"\) | | `search` | string | No | Search string to filter users by displayName or mail | -| `nextLink` | string | No | Continuation URL from a previous response\'s "nextLink" output, used to fetch the next page of results | +| `nextLink` | string | No | Continuation URL from a previous response's 'nextLink' output, used to fetch the next page of results | #### Output @@ -175,7 +175,7 @@ List groups in Azure AD (Microsoft Entra ID) | `top` | number | No | Maximum number of groups to return \(default 100, max 999\) | | `filter` | string | No | OData filter expression \(e.g., "securityEnabled eq true"\) | | `search` | string | No | Search string to filter groups by displayName or description | -| `nextLink` | string | No | Continuation URL from a previous response\'s "nextLink" output, used to fetch the next page of results | +| `nextLink` | string | No | Continuation URL from a previous response's 'nextLink' output, used to fetch the next page of results | #### Output @@ -291,7 +291,7 @@ List members of a group in Azure AD (Microsoft Entra ID) | --------- | ---- | -------- | ----------- | | `groupId` | string | No | Group ID. Not needed when Next Page is provided to fetch a later page. | | `top` | number | No | Maximum number of members to return \(default 100, max 999\) | -| `nextLink` | string | No | Continuation URL from a previous response\'s "nextLink" output, used to fetch the next page of results | +| `nextLink` | string | No | Continuation URL from a previous response's 'nextLink' output, used to fetch the next page of results | #### Output @@ -479,7 +479,7 @@ List sign-in events from the Microsoft Entra ID sign-in logs, newest first. Requ | --------- | ---- | -------- | ----------- | | `top` | number | No | Maximum number of sign-ins to return \(default and maximum page size is 1000\) | | `filter` | string | No | OData filter expression. Filterable fields include userPrincipalName, userId, appId, appDisplayName, ipAddress, createdDateTime, conditionalAccessStatus, riskState and status/errorCode. Example: "createdDateTime ge 2024-01-01T00:00:00Z and status/errorCode ne 0". | -| `nextLink` | string | No | Continuation URL from a previous response\'s "nextLink" output, used to fetch the next page of results | +| `nextLink` | string | No | Continuation URL from a previous response's 'nextLink' output, used to fetch the next page of results | #### Output @@ -499,7 +499,7 @@ List directory audit records showing who changed what in Microsoft Entra ID, suc | --------- | ---- | -------- | ----------- | | `top` | number | No | Maximum number of audit records to return | | `filter` | string | No | OData filter expression. Filterable fields include activityDateTime, activityDisplayName, correlationId, loggedByService, initiatedBy and targetResources. Example: "activityDateTime ge 2024-01-01T00:00:00Z". | -| `nextLink` | string | No | Continuation URL from a previous response\'s "nextLink" output, used to fetch the next page of results | +| `nextLink` | string | No | Continuation URL from a previous response's 'nextLink' output, used to fetch the next page of results | #### Output @@ -520,7 +520,7 @@ List the application role assignments granted to a user, including assignments t | `userId` | string | No | User ID or user principal name. Not needed when Next Page is provided to fetch a later page. | | `top` | number | No | Maximum number of assignments to return | | `filter` | string | No | OData filter expression. Filterable fields include id, resourceId and principalDisplayName. Example: "resourceId eq 8e881353-1735-45af-af21-ee1344582a4d". | -| `nextLink` | string | No | Continuation URL from a previous response\'s "nextLink" output, used to fetch the next page of results | +| `nextLink` | string | No | Continuation URL from a previous response's 'nextLink' output, used to fetch the next page of results | #### Output @@ -584,9 +584,9 @@ List the enterprise applications and service principals in the tenant, including | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `top` | number | No | Maximum number of service principals to return \(default and maximum page size is 100\) | -| `filter` | string | No | OData filter expression. Example: "servicePrincipalType eq \'Application\'" or "startsWith\(displayName, \'Salesforce\'\)". | +| `filter` | string | No | OData filter expression. Example: "servicePrincipalType eq 'Application'" or "startsWith\(displayName, 'Salesforce'\)". | | `search` | string | No | Search string matched against the service principal display name | -| `nextLink` | string | No | Continuation URL from a previous response\'s "nextLink" output, used to fetch the next page of results | +| `nextLink` | string | No | Continuation URL from a previous response's 'nextLink' output, used to fetch the next page of results | #### Output @@ -605,8 +605,8 @@ List every user, group, and service principal assigned to an application, by rea | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `servicePrincipalId` | string | No | Object ID of the service principal. Use List Service Principals to find it. Not needed when Next Page is provided to fetch a later page. | -| `filter` | string | No | OData filter expression supporting eq and startswith. Example: "principalType eq \'User\'". | -| `nextLink` | string | No | Continuation URL from a previous response\'s "nextLink" output, used to fetch the next page of results | +| `filter` | string | No | OData filter expression supporting eq and startswith. Example: "principalType eq 'User'". | +| `nextLink` | string | No | Continuation URL from a previous response's 'nextLink' output, used to fetch the next page of results | #### Output @@ -696,9 +696,9 @@ List the devices registered in Microsoft Entra ID | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `top` | number | No | Maximum number of devices to return | -| `filter` | string | No | OData filter expression. Example: "accountEnabled eq false" or "operatingSystem eq \'Windows\'". | +| `filter` | string | No | OData filter expression. Example: "accountEnabled eq false" or "operatingSystem eq 'Windows'". | | `search` | string | No | Search string matched against the device display name | -| `nextLink` | string | No | Continuation URL from a previous response\'s "nextLink" output, used to fetch the next page of results | +| `nextLink` | string | No | Continuation URL from a previous response's 'nextLink' output, used to fetch the next page of results | #### Output @@ -749,7 +749,7 @@ List the devices a user has registered or owns. Devices the caller cannot read a | `userId` | string | No | User ID or user principal name. Not needed when Next Page is provided to fetch a later page. | | `deviceRelationship` | string | No | Which devices to list: "registered" for devices the user registered, or "owned" for devices the user owns. Defaults to "registered". | | `top` | number | No | Maximum number of devices to return | -| `nextLink` | string | No | Continuation URL from a previous response\'s "nextLink" output, used to fetch the next page of results | +| `nextLink` | string | No | Continuation URL from a previous response's 'nextLink' output, used to fetch the next page of results | #### Output @@ -768,8 +768,8 @@ List the conditional access policies configured in the tenant, including their s | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `top` | number | No | Maximum number of policies to return | -| `filter` | string | No | OData filter expression. Example: "state eq \'enabled\'". | -| `nextLink` | string | No | Continuation URL from a previous response\'s "nextLink" output, used to fetch the next page of results | +| `filter` | string | No | OData filter expression. Example: "state eq 'enabled'". | +| `nextLink` | string | No | Continuation URL from a previous response's 'nextLink' output, used to fetch the next page of results | #### Output diff --git a/apps/docs/content/docs/en/integrations/okta.mdx b/apps/docs/content/docs/en/integrations/okta.mdx index 61d8e325480..94fc083b92f 100644 --- a/apps/docs/content/docs/en/integrations/okta.mdx +++ b/apps/docs/content/docs/en/integrations/okta.mdx @@ -405,7 +405,7 @@ Update a group profile in your Okta organization. Only groups of OKTA_GROUP type | `apiKey` | string | Yes | Okta API token for authentication | | `domain` | string | Yes | Okta domain \(e.g., dev-123456.okta.com\) | | `groupId` | string | Yes | Group ID to update | -| `name` | string | Yes | Updated group name | +| `name` | string | No | Updated group name. Leave blank to keep the stored name | | `description` | string | No | Updated group description | #### Output diff --git a/apps/docs/content/docs/en/integrations/servicenow.mdx b/apps/docs/content/docs/en/integrations/servicenow.mdx index f4fd22984e5..acce8017734 100644 --- a/apps/docs/content/docs/en/integrations/servicenow.mdx +++ b/apps/docs/content/docs/en/integrations/servicenow.mdx @@ -142,7 +142,7 @@ Compute aggregate statistics (count, sum, average, min, max, group by) over a Se | `sumFields` | string | No | Comma-separated numeric fields to sum | | `minFields` | string | No | Comma-separated fields to compute the minimum of | | `maxFields` | string | No | Comma-separated fields to compute the maximum of | -| `having` | string | No | Filter on aggregate results \(e.g., "count>5"\) | +| `having` | string | No | Filter on aggregate results, written as aggregate^field^operator^value and comma-separated for more than one \(e.g., "count^priority^>^3" or "count^state^=^1,avg^priority^>^3"\) | | `displayValue` | string | No | Return display values for grouped reference fields: "true", "false", or "all" | #### Output diff --git a/apps/docs/content/docs/en/integrations/splunk.mdx b/apps/docs/content/docs/en/integrations/splunk.mdx index fe23c451b9f..8c5a98c001f 100644 --- a/apps/docs/content/docs/en/integrations/splunk.mdx +++ b/apps/docs/content/docs/en/integrations/splunk.mdx @@ -91,6 +91,8 @@ Run an SPL search synchronously and return its results in a single call (oneshot | `firedAlerts` | json | Triggered instances of an alert \(\[\{name, savedSearchName, alertType, severity, sid, triggerTime\}\]\) | | `indexes` | json | Indexes configured on the instance \(\[\{name, datatype, disabled, totalEventCount, currentDBSizeMB, maxTotalDataSizeMB, minTime, maxTime\}\]\) | | `apps` | json | Apps installed on the instance \(name, label, version, author, disabled\) | +| `total` | number | Total number of entries matching a list request, from the response paging envelope. Compare with offset to decide whether another page remains. | +| `offset` | number | Offset of the first entry in the returned page, from the paging envelope | ### Splunk Create Search Job @@ -186,7 +188,7 @@ Fetch the transformed results of a completed Splunk search job by search ID, wit | `owner` | string | No | Namespace owner for /servicesNS requests \(e.g. admin, or nobody for app-shared objects\). Leave both this and the app empty to use the authenticated user context; set only one and the other becomes the - wildcard. | | `app` | string | No | Namespace app context for /servicesNS requests \(e.g. search\). Leave both this and the owner empty to use the authenticated user context; set only one and the other becomes the - wildcard. | | `sid` | string | Yes | Search ID of the job whose results to fetch \(e.g. 1457683115.100\) | -| `count` | number | No | Maximum number of result rows to return. Defaults to 100. Page through larger result sets with offset rather than raising this — a completed job can hold millions of rows. | +| `count` | number | No | Maximum number of result rows to return. Defaults to 100. Page through larger result sets with offset rather than raising this — a completed job can hold millions of rows. 0 is rejected here even though Splunk reads it as "every row". | | `offset` | number | No | First result row \(0-indexed\) from which to begin returning data | | `fields` | string | No | Comma-separated list of fields to return for each row \(e.g. _time,host,source\). Returns all fields when omitted. | | `addSummaryToMetadata` | boolean | No | Include field summary statistics in the response | @@ -243,6 +245,8 @@ Fetch the transformed results of a completed Splunk search job by search ID, wit | `firedAlerts` | json | Triggered instances of an alert \(\[\{name, savedSearchName, alertType, severity, sid, triggerTime\}\]\) | | `indexes` | json | Indexes configured on the instance \(\[\{name, datatype, disabled, totalEventCount, currentDBSizeMB, maxTotalDataSizeMB, minTime, maxTime\}\]\) | | `apps` | json | Apps installed on the instance \(name, label, version, author, disabled\) | +| `total` | number | Total number of entries matching a list request, from the response paging envelope. Compare with offset to decide whether another page remains. | +| `offset` | number | Offset of the first entry in the returned page, from the paging envelope | ### Splunk Cancel Search Job diff --git a/apps/sim/app/api/tools/crowdstrike/query/operations.test.ts b/apps/sim/app/api/tools/crowdstrike/query/operations.test.ts index 89a3b81992c..263462da8d8 100644 --- a/apps/sim/app/api/tools/crowdstrike/query/operations.test.ts +++ b/apps/sim/app/api/tools/crowdstrike/query/operations.test.ts @@ -8,6 +8,7 @@ const { fetchMock } = vi.hoisted(() => ({ fetchMock: vi.fn(), })) +import { MAX_ID_URL_BYTES } from '@/app/api/tools/crowdstrike/query/operations' import { POST } from '@/app/api/tools/crowdstrike/query/route' function jsonResponse(body: unknown, status = 200): Response { @@ -933,4 +934,279 @@ describe('CrowdStrike extended operations', () => { 'detection_suppress' ) }) + + describe('by-ids URL byte budget', () => { + /** Long enough that the contract maxima would generate a URL past any proxy limit. */ + function longIds(count: number, prefix: string): string[] { + return Array.from({ length: count }, (_, index) => + `${prefix}-${String(index).padStart(4, '0')}`.padEnd(64, 'x') + ) + } + + function idsFromUrl(rawUrl: string): string[] { + return new URL(rawUrl).searchParams.getAll('ids') + } + + /** The 8 KB request line + header cap common to proxies and load balancers. */ + const PROXY_REQUEST_LINE_LIMIT = 8192 + + it('keeps the budget under the request-line limit proxies enforce', () => { + expect(MAX_ID_URL_BYTES).toBeLessThanOrEqual(PROXY_REQUEST_LINE_LIMIT) + }) + + it('splits an oversized indicator lookup into batches that each stay under the URL budget', async () => { + const indicatorIds = longIds(300, 'ioc') + + fetchMock.mockImplementation((rawUrl: string) => + Promise.resolve( + jsonResponse({ + meta: { pagination: { limit: 1, offset: 0, total: 300 } }, + resources: idsFromUrl(rawUrl).map((id) => ({ id, type: 'sha256', value: id })), + }) + ) + ) + + const response = await POST( + requestFor({ operation: 'crowdstrike_get_indicator_details', indicatorIds }) + ) + const data = await response.json() + + const lookupUrls = fetchMock.mock.calls.slice(1).map((call) => String(call[0])) + expect(lookupUrls.length).toBeGreaterThan(1) + for (const url of lookupUrls) { + expect(url.length).toBeLessThanOrEqual(MAX_ID_URL_BYTES) + } + + expect(response.status).toBe(200) + expect(data.output.count).toBe(300) + expect(data.output.indicators.map((indicator: { id: string }) => indicator.id)).toEqual( + indicatorIds + ) + expect(lookupUrls.flatMap(idsFromUrl)).toEqual(indicatorIds) + }) + + it('merges the envelope errors every batch reported', async () => { + const indicatorIds = longIds(300, 'ioc') + + fetchMock.mockImplementation((rawUrl: string) => { + const ids = idsFromUrl(rawUrl) + return Promise.resolve( + jsonResponse({ + resources: ids.slice(1).map((id) => ({ id, type: 'sha256', value: id })), + errors: [{ code: 404, id: ids[0], message: 'Indicator not found' }], + }) + ) + }) + + const response = await POST( + requestFor({ operation: 'crowdstrike_get_indicator_details', indicatorIds }) + ) + const data = await response.json() + + const batchCount = fetchMock.mock.calls.length - 1 + expect(batchCount).toBeGreaterThan(1) + expect(data.output.errors).toHaveLength(batchCount) + }) + + it('surfaces an upstream failure raised by a later batch instead of swallowing it', async () => { + const indicatorIds = longIds(300, 'ioc') + let lookupCall = 0 + + fetchMock.mockImplementation((rawUrl: string) => { + lookupCall += 1 + if (lookupCall === 2) { + return Promise.resolve( + jsonResponse({ errors: [{ code: 429, message: 'Rate limit exceeded' }] }, 429) + ) + } + return Promise.resolve( + jsonResponse({ + resources: idsFromUrl(rawUrl).map((id) => ({ id, type: 'sha256', value: id })), + }) + ) + }) + + const response = await POST( + requestFor({ operation: 'crowdstrike_get_indicator_details', indicatorIds }) + ) + const data = await response.json() + + expect(response.status).toBe(429) + expect(data.success).toBe(false) + expect(data.error).toBe('Rate limit exceeded') + }) + + /** + * A batched delete has no rollback: every batch that answered `ok` really removed + * its indicators. Reporting only the failing batch's message would leave the + * caller unable to tell what is already gone, and a blind retry would re-target + * IDs that no longer exist. + */ + it('names the indicators earlier batches already deleted when a later batch fails', async () => { + const indicatorIds = longIds(300, 'ioc') + let deleteCall = 0 + const deletedByFirstBatch: string[] = [] + + fetchMock.mockImplementation((rawUrl: string) => { + deleteCall += 1 + if (deleteCall === 2) { + return Promise.resolve( + jsonResponse({ errors: [{ code: 429, message: 'Rate limit exceeded' }] }, 429) + ) + } + const ids = idsFromUrl(rawUrl) + deletedByFirstBatch.push(...ids) + return Promise.resolve(jsonResponse({ resources: ids })) + }) + + const response = await POST( + requestFor({ operation: 'crowdstrike_delete_indicators', indicatorIds }) + ) + const data = await response.json() + + expect(response.status).toBe(429) + expect(data.success).toBe(false) + expect(deletedByFirstBatch.length).toBeGreaterThan(0) + expect(data.error).toContain('Rate limit exceeded') + expect(data.error).toContain(`${deletedByFirstBatch.length} ID(s) were already deleted`) + expect(data.error).toContain(deletedByFirstBatch[0]) + }) + + /** + * A batch can answer 200 while reporting per-ID failures in `errors`. Recording + * the requested chunk would name indicators that are still live and tell the + * caller to drop them from the retry, so only the IDs Falcon echoed in + * `resources` count as committed. + */ + it('reports only the IDs Falcon confirmed, not every ID in a partly-failed batch', async () => { + const indicatorIds = longIds(300, 'ioc') + let deleteCall = 0 + let skipped = '' + const confirmed: string[] = [] + + fetchMock.mockImplementation((rawUrl: string) => { + deleteCall += 1 + if (deleteCall === 2) { + return Promise.resolve( + jsonResponse({ errors: [{ code: 429, message: 'Rate limit exceeded' }] }, 429) + ) + } + const ids = idsFromUrl(rawUrl) + skipped = ids[0] + confirmed.push(...ids.slice(1)) + return Promise.resolve( + jsonResponse({ + resources: ids.slice(1), + errors: [{ code: 404, id: ids[0], message: 'Indicator not found' }], + }) + ) + }) + + const response = await POST( + requestFor({ operation: 'crowdstrike_delete_indicators', indicatorIds }) + ) + const data = await response.json() + + expect(response.status).toBe(429) + expect(confirmed.length).toBeGreaterThan(0) + expect(data.error).toContain(`${confirmed.length} ID(s) were already deleted`) + expect(data.error).not.toContain(skipped) + }) + + /** + * A 2xx envelope carrying per-ID errors is a partial success, not a failure — + * `failedWithoutResources` only fails the operation when nothing came back at + * all. The batched path must report it exactly as a single request would: + * `deletedIds` names what Falcon confirmed and `errors` names what it refused, + * which is stricter reconciliation than the prose message the transport-failure + * path has to fall back on. A retry excludes `deletedIds`. + */ + it('reports a 2xx per-ID delete failure as partial success, matching an unbatched request', async () => { + const indicatorIds = longIds(300, 'ioc') + let deleteCall = 0 + let refused = '' + + fetchMock.mockImplementation((rawUrl: string) => { + deleteCall += 1 + const ids = idsFromUrl(rawUrl) + if (deleteCall === 2) { + refused = ids[0] + return Promise.resolve( + jsonResponse({ + resources: ids.slice(1), + errors: [{ code: 404, id: ids[0], message: 'Indicator not found' }], + }) + ) + } + return Promise.resolve(jsonResponse({ resources: ids })) + }) + + const response = await POST( + requestFor({ operation: 'crowdstrike_delete_indicators', indicatorIds }) + ) + const data = await response.json() + + expect(response.status).toBe(200) + expect(data.success).toBe(true) + expect(refused).not.toBe('') + expect(data.output.deletedIds).not.toContain(refused) + expect(data.output.count).toBe(indicatorIds.length - 1) + expect(data.output.errors).toContainEqual(expect.objectContaining({ id: refused, code: 404 })) + }) + + it('leaves a first-batch delete failure unannotated — nothing was committed', async () => { + const indicatorIds = longIds(300, 'ioc') + + fetchMock.mockImplementation(() => + Promise.resolve(jsonResponse({ errors: [{ code: 403, message: 'Access denied' }] }, 403)) + ) + + const response = await POST( + requestFor({ operation: 'crowdstrike_delete_indicators', indicatorIds }) + ) + const data = await response.json() + + expect(response.status).toBe(403) + expect(data.error).toBe('Access denied') + }) + + it('splits an oversized vulnerability lookup at the Spotlight cap', async () => { + const vulnerabilityIds = longIds(400, 'vuln') + + fetchMock.mockImplementation((rawUrl: string) => + Promise.resolve( + jsonResponse({ + resources: idsFromUrl(rawUrl).map((id) => ({ id })), + }) + ) + ) + + const response = await POST( + requestFor({ operation: 'crowdstrike_get_vulnerability_details', vulnerabilityIds }) + ) + const data = await response.json() + + const lookupUrls = fetchMock.mock.calls.slice(1).map((call) => String(call[0])) + expect(lookupUrls.length).toBeGreaterThan(1) + for (const url of lookupUrls) { + expect(url.length).toBeLessThanOrEqual(MAX_ID_URL_BYTES) + } + expect(data.output.count).toBe(400) + }) + + it('keeps a filter-only delete on a single request', async () => { + fetchMock.mockResolvedValueOnce(jsonResponse({ resources: ['ioc-1'] })) + + const response = await POST( + requestFor({ + operation: 'crowdstrike_delete_indicators', + filter: "source:'automation'", + comment: 'cleanup', + }) + ) + + expect(response.status).toBe(200) + expect(fetchMock).toHaveBeenCalledTimes(2) + }) + }) }) diff --git a/apps/sim/app/api/tools/crowdstrike/query/operations.ts b/apps/sim/app/api/tools/crowdstrike/query/operations.ts index f712dbf4505..a1b2b1e7b67 100644 --- a/apps/sim/app/api/tools/crowdstrike/query/operations.ts +++ b/apps/sim/app/api/tools/crowdstrike/query/operations.ts @@ -1,5 +1,8 @@ +import { isRecordLike } from '@sim/utils/object' +import { truncate } from '@sim/utils/string' import type { CrowdstrikeQueryBody } from '@/lib/api/contracts/tools/crowdstrike' import { + buildUrl, type CrowdStrikeCallResult, callCrowdStrike, getBoolean, @@ -9,7 +12,9 @@ import { getFirstRecordResource, getNumber, getPagination, + getRecordArray, getRecordResources, + getResourcesArray, getSpotlightPagination, getString, getStringResources, @@ -83,6 +88,170 @@ export function failedWithoutResources( return resourceCount === 0 && getEnvelopeErrors(result.data).length > 0 } +/** + * Falcon's by-ids lookups carry every ID in the query string, so a request at the + * contract maxima (1000 indicator IDs at ~68 bytes each) would generate a ~68 KB + * URL. Proxies and load balancers commonly cap the request line plus headers at + * 8 KB, so batches are sized to keep each generated URL at or under half of that, + * leaving the rest of the budget for headers. + */ +export const MAX_ID_URL_BYTES = 4096 + +/** + * Batches by cumulative encoded length rather than by a fixed count: Falcon IDs + * range from 32-character AIDs to long composite alert IDs, so a count-based cap + * would either waste the budget or blow past it. A single ID longer than the + * budget still gets its own batch — truncating the list would silently drop it. + */ +export function chunkIdsByUrlBudget(ids: string[], budget: number): string[][] { + const chunks: string[][] = [] + let current: string[] = [] + let used = 0 + + for (const id of ids) { + const cost = `&ids=${encodeURIComponent(id)}`.length + if (current.length > 0 && used + cost > budget) { + chunks.push(current) + current = [] + used = 0 + } + current.push(id) + used += cost + } + + if (current.length > 0) { + chunks.push(current) + } + + return chunks +} + +/** + * Caps how much of the already-committed ID list is spelled out in a partial-failure + * message. A by-ids delete can carry 1000 IDs at ~68 bytes each, so the full list + * would bury the actual failure under ~68 KB of text. + */ +const MAX_COMMITTED_IDS_IN_MESSAGE = 400 + +/** + * Rewrites a failed batch's envelope so the reported error names the deletions the + * earlier batches already committed. + * + * Batches run sequentially and Falcon has no way to roll back a deletion it already + * performed. Short-circuiting on a later batch would therefore report a bare failure + * over work that already happened, and a blind retry would target IDs that no longer + * exist. Only the message survives to the caller ({@link fail} keeps `status` and the + * message, not `data`), so the committed list is written onto `errors[0].message`, + * which is the first thing {@link getFalconErrorMessage} reads. + * + * `committed` holds the IDs Falcon echoed in `resources`, never the IDs that were + * requested, so an ID that failed inside an otherwise-200 batch is not reported as + * deleted. + */ +function withCommittedIds( + result: CrowdStrikeCallResult, + committed: string[] +): CrowdStrikeCallResult { + if (committed.length === 0) return result + + const envelope = isRecordLike(result.data) ? result.data : {} + const existing = getRecordArray(envelope.errors) + const reason = getFalconErrorMessage(result.data, 'CrowdStrike rejected a later batch.') + const message = + `${reason} This request was split into batches and ${committed.length} ID(s) were already deleted ` + + `before the failing batch; they were not rolled back, so retry only the remainder. ` + + `Deleted: ${truncate(committed.join(', '), MAX_COMMITTED_IDS_IN_MESSAGE)}` + + return { + ...result, + data: { ...envelope, errors: [{ ...(existing[0] ?? {}), message }, ...existing.slice(1)] }, + } +} + +interface ByIdsRequestOptions { + method: 'GET' | 'DELETE' + path: string + ids: string[] | undefined + query?: Record +} + +/** + * Issues a by-ids lookup as however many requests it takes to stay under + * `MAX_ID_URL_BYTES`, then presents the batches as one `{ meta, resources, errors }` + * envelope so callers read the same shape a single request returns. + * + * Batches run sequentially: resource order matches the caller's ID order, the + * endpoint's rate limit only ever sees one request at a time, and a failing batch + * short-circuits with its own status instead of being merged away. A `DELETE` that + * fails partway also carries the IDs its earlier batches already removed — see + * {@link withCommittedIds}. `meta` comes + * from the first batch — pagination is meaningless for a lookup that names every + * ID it wants, and no by-ids operation here reads it. + */ +async function callCrowdStrikeByIds( + baseUrl: string, + accessToken: string, + options: ByIdsRequestOptions +): Promise { + const prefix = buildUrl(baseUrl, { + method: options.method, + path: options.path, + query: options.query, + }) + const chunks = chunkIdsByUrlBudget( + options.ids ?? [], + Math.max(MAX_ID_URL_BYTES - prefix.length, 1) + ) + + if (chunks.length <= 1) { + return callCrowdStrike(baseUrl, accessToken, { + method: options.method, + path: options.path, + query: options.query, + repeatedQuery: { ids: options.ids }, + }) + } + + const resources: unknown[] = [] + const errors: unknown[] = [] + const committed: string[] = [] + let meta: unknown + let status = 200 + + for (const [index, chunk] of chunks.entries()) { + const result = await callCrowdStrike(baseUrl, accessToken, { + method: options.method, + path: options.path, + query: options.query, + repeatedQuery: { ids: chunk }, + }) + + if (!result.ok) { + return options.method === 'DELETE' ? withCommittedIds(result, committed) : result + } + + /** + * Only the IDs Falcon echoed in `resources` were actually deleted. A batch can + * answer 200 while reporting per-ID failures in `errors`, so recording the + * requested chunk would name indicators that are still live and tell the + * caller to drop them from the retry. + */ + if (options.method === 'DELETE') { + committed.push(...getStringResources(result.data)) + } + + if (index === 0) { + status = result.status + meta = isRecordLike(result.data) ? result.data.meta : undefined + } + + resources.push(...getResourcesArray(result.data)) + errors.push(...getRecordArray(isRecordLike(result.data) ? result.data.errors : undefined)) + } + + return { ok: true, status, data: { meta, resources, errors } } +} + function buildAlertActionParameters( body: Extract ) { @@ -251,10 +420,10 @@ export async function executeCrowdStrikeOperation( } case 'crowdstrike_get_host_group_details': { - const result = await callCrowdStrike(baseUrl, accessToken, { + const result = await callCrowdStrikeByIds(baseUrl, accessToken, { method: 'GET', path: '/devices/entities/host-groups/v1', - repeatedQuery: { ids: body.hostGroupIds }, + ids: body.hostGroupIds, }) if (!result.ok) return fail(result, 'Failed to fetch CrowdStrike host group details') @@ -330,10 +499,10 @@ export async function executeCrowdStrikeOperation( } case 'crowdstrike_get_indicator_details': { - const result = await callCrowdStrike(baseUrl, accessToken, { + const result = await callCrowdStrikeByIds(baseUrl, accessToken, { method: 'GET', path: '/iocs/entities/indicators/v1', - repeatedQuery: { ids: body.indicatorIds }, + ids: body.indicatorIds, }) if (!result.ok) return fail(result, 'Failed to fetch CrowdStrike indicator details') @@ -397,11 +566,11 @@ export async function executeCrowdStrikeOperation( } case 'crowdstrike_delete_indicators': { - const result = await callCrowdStrike(baseUrl, accessToken, { + const result = await callCrowdStrikeByIds(baseUrl, accessToken, { method: 'DELETE', path: '/iocs/entities/indicators/v1', query: { comment: body.comment, filter: body.filter }, - repeatedQuery: { ids: body.filter ? undefined : body.indicatorIds }, + ids: body.filter ? undefined : body.indicatorIds, }) if (!result.ok) return fail(result, 'Failed to delete CrowdStrike indicators') @@ -449,10 +618,10 @@ export async function executeCrowdStrikeOperation( } case 'crowdstrike_get_vulnerability_details': { - const result = await callCrowdStrike(baseUrl, accessToken, { + const result = await callCrowdStrikeByIds(baseUrl, accessToken, { method: 'GET', path: '/spotlight/entities/vulnerabilities/v2', - repeatedQuery: { ids: body.vulnerabilityIds }, + ids: body.vulnerabilityIds, }) if (!result.ok) return fail(result, 'Failed to fetch CrowdStrike vulnerability details') diff --git a/apps/sim/app/api/tools/mssql/utils.test.ts b/apps/sim/app/api/tools/mssql/utils.test.ts index 2959eb94d51..c29ff99f63f 100644 --- a/apps/sim/app/api/tools/mssql/utils.test.ts +++ b/apps/sim/app/api/tools/mssql/utils.test.ts @@ -131,6 +131,27 @@ describe('validateReadOnlyQuery', () => { expect(validateReadOnlyQuery(query).isValid).toBe(false) }) + /** + * `\bupdate\b` cannot match `UPDATETEXT` — there is no word boundary after + * `update` — so each text statement has to be screened in its own right. + */ + it.each([ + "SELECT 1 UPDATETEXT dbo.t.col @ptr 0 NULL 'x'", + "SELECT 1 WRITETEXT dbo.t.col @ptr 'x'", + 'SELECT 1 READTEXT dbo.t.col @ptr 0 16', + ])('rejects the text statement batch %s', (query) => { + expect(validateReadOnlyQuery(query).isValid).toBe(false) + }) + + /** The same statements reached through the WHERE screen, which shares the list. */ + it.each([ + "id = 1 UPDATETEXT dbo.t.col @ptr 0 NULL 'x'", + "id = 1 WRITETEXT dbo.t.col @ptr 'x'", + 'id = 1 READTEXT dbo.t.col @ptr 0 16', + ])('rejects the text statement %s in a WHERE clause', (where) => { + expect(() => buildDeleteQuery('dbo.users', where)).toThrow() + }) + /** * The guard against over-screening. `FETCH` is excluded from the keyword list * because `OFFSET … FETCH NEXT` is the standard paging clause, and the added @@ -140,6 +161,7 @@ describe('validateReadOnlyQuery', () => { 'SELECT * FROM dbo.users ORDER BY id OFFSET 10 ROWS FETCH NEXT 20 ROWS ONLY', 'WITH p AS (SELECT id FROM dbo.o) SELECT * FROM p ORDER BY id OFFSET 0 ROWS FETCH NEXT 5 ROWS ONLY', 'SELECT settled, offset_value, begin_date FROM dbo.t', + 'SELECT updatetext_id, writetext_flag, readtext_offset FROM dbo.t', 'SELECT TOP (100) id, name FROM dbo.users WHERE is_active = 1', ])('still accepts the legitimate read %s', (query) => { expect(validateReadOnlyQuery(query).isValid).toBe(true) diff --git a/apps/sim/app/api/tools/mssql/utils.ts b/apps/sim/app/api/tools/mssql/utils.ts index 27c380acacb..e8cd95d0961 100644 --- a/apps/sim/app/api/tools/mssql/utils.ts +++ b/apps/sim/app/api/tools/mssql/utils.ts @@ -189,6 +189,14 @@ export async function executeQuery( * `SET`/`BEGIN`/`COMMIT`/`ROLLBACK` because session and transaction state are * changed the same way (`SET IDENTITY_INSERT`, `SET ANSI_NULLS`). * + * The text statements `UPDATETEXT`, `WRITETEXT`, and `READTEXT` are listed in + * their own right rather than left to `update`: there is no word boundary after + * `update` in `UPDATETEXT`, so `\bupdate\b` never matches it and + * `SELECT 1 UPDATETEXT dbo.t.col @ptr 0 NULL 'x'` would otherwise pass every + * screen on the advertised read-only path. `READTEXT` reads rather than writes, + * but it introduces a second statement in exactly the same semicolon-less way, + * which is what this list exists to reject. + * * `FETCH` is deliberately **absent**: `OFFSET … FETCH NEXT` is the standard * T-SQL paging clause, so screening it would reject the ordinary paged SELECT * this operation exists to run. Word boundaries keep the additions off ordinary @@ -196,7 +204,7 @@ export async function executeQuery( * @see https://learn.microsoft.com/en-us/sql/t-sql/statements/statements */ const MSSQL_STATEMENT_KEYWORDS = - /\b(?:insert|update|delete|merge|drop|create|alter|truncate|disable|enable|set|begin|commit|rollback|grant|revoke|deny|exec|execute|backup|restore|shutdown|reconfigure|dbcc|kill|checkpoint|use|bulk|revert|setuser|openrowset|opendatasource|openquery|openxml|waitfor|into)\b/i + /\b(?:insert|update|updatetext|writetext|readtext|delete|merge|drop|create|alter|truncate|disable|enable|set|begin|commit|rollback|grant|revoke|deny|exec|execute|backup|restore|shutdown|reconfigure|dbcc|kill|checkpoint|use|bulk|revert|setuser|openrowset|opendatasource|openquery|openxml|waitfor|into)\b/i /** Extended, OLE-automation, and system stored procedures, called with or without `EXEC`. */ const MSSQL_PROCEDURE_PATTERN = /\b(?:xp_|sp_)\w+/i diff --git a/apps/sim/blocks/blocks/cloudflare.ts b/apps/sim/blocks/blocks/cloudflare.ts index b4b98e37f1f..2f3322b0ae5 100644 --- a/apps/sim/blocks/blocks/cloudflare.ts +++ b/apps/sim/blocks/blocks/cloudflare.ts @@ -19,23 +19,31 @@ import type { CloudflareResponse } from '@/tools/cloudflare/types' * * Every such control therefore carries its own id and is republished here under * the tool's param name, before any coercion in the mapper reads it. + * + * Which side of a collision gets the new id is not a free choice. Block state + * is never migrated, and `extractBlockParams` (`serializer/index.ts`) drops a + * stored value whose id matches no subBlock config — a deleted input — so the + * renamed side silently loses whatever shipped workflows stored. The read + * filters therefore keep their original ids, where losing a value means + * returning the whole zone under `success: true`, and the write controls take + * the new ones, where losing a value means a PATCH simply omits the field. */ const SUBBLOCK_ALIASES: Record> = { create_zone: { type: 'zoneType' }, - list_zones: { name: 'zoneNameFilter' }, - create_dns_record: { type: 'recordType', proxied: 'recordProxied' }, - list_dns_records: { - type: 'dnsTypeFilter', - name: 'dnsNameFilter', - content: 'dnsContentFilter', - order: 'dnsOrder', - proxied: 'dnsProxiedFilter', + create_dns_record: { type: 'recordType', proxied: 'recordProxied', tags: 'recordTags' }, + update_dns_record: { + type: 'updateRecordType', + name: 'updateRecordName', + content: 'updateRecordContent', + proxied: 'updateRecordProxied', + tags: 'updateRecordTags', }, + list_dns_records: { order: 'dnsOrder' }, list_certificates: { status: 'certificateStatus' }, - purge_cache: { tags: 'purgeTags' }, create_ruleset: { name: 'rulesetName' }, + update_ruleset_rule: { enabled: 'updateRuleEnabled' }, create_rate_limit_rule: { action: 'rateLimitAction' }, - update_rate_limit_rule: { action: 'updateRateLimitAction' }, + update_rate_limit_rule: { action: 'updateRateLimitAction', enabled: 'updateRuleEnabled' }, create_access_application: { type: 'appType', tags: 'accessAppTags' }, update_access_application: { type: 'updateAppType', tags: 'accessAppTags' }, update_access_policy: { decision: 'updatePolicyDecision' }, @@ -44,8 +52,20 @@ const SUBBLOCK_ALIASES: Record> = { list_access_service_tokens: { name: 'listNameFilter' }, list_worker_scripts: { tags: 'workerTagFilter' }, list_tunnels: { status: 'tunnelStatus', name: 'listNameFilter' }, + list_r2_buckets: { cursor: 'r2Cursor' }, + list_rulesets: { cursor: 'rulesetCursor' }, } +/** + * Access application types whose request schema makes `domain` mandatory. + * + * `access_app_request` is an `anyOf` over per-type variants: `domain` is + * required on the self_hosted, ssh, vnc, and rdp variants, optional and + * writable on bookmark and mcp_portal, read-only on app_launcher, warp, biso, + * and proxy_endpoint, and absent from saas, infrastructure, and mcp. + */ +const DOMAIN_REQUIRED_APP_TYPES = ['self_hosted', 'ssh', 'vnc', 'rdp'] as const + /** Every alias subBlock id, so none of them can reach a tool as a param. */ const ALIASED_SUBBLOCK_IDS = [ ...new Set(Object.values(SUBBLOCK_ALIASES).flatMap((aliases) => Object.values(aliases))), @@ -69,7 +89,7 @@ export const CloudflareBlock: BlockConfig = { byOperation: { list_zones: [ 'List zones', - { text: 'named', field: 'zoneNameFilter' }, + { text: 'named', field: 'name' }, { text: ', with status', field: 'status' }, ], get_zone: [{ text: 'Read details of zone', field: 'zoneId', core: true }], @@ -80,8 +100,8 @@ export const CloudflareBlock: BlockConfig = { delete_zone: [{ text: 'Delete zone', field: 'zoneId', core: true }], list_dns_records: [ { text: 'List DNS records in zone', field: 'zoneId', core: true }, - { text: ', of type', field: 'dnsTypeFilter' }, - { text: ', named', field: 'dnsNameFilter' }, + { text: ', of type', field: 'type' }, + { text: ', named', field: 'name' }, ], create_dns_record: [ { text: 'Add DNS record', field: 'name', core: true }, @@ -90,7 +110,7 @@ export const CloudflareBlock: BlockConfig = { ], update_dns_record: [ { text: 'Update DNS record', field: 'recordId', core: true }, - { text: ', pointing it at', field: 'content' }, + { text: ', pointing it at', field: 'updateRecordContent' }, { text: ', with TTL', field: 'ttl' }, ], delete_dns_record: [ @@ -114,7 +134,7 @@ export const CloudflareBlock: BlockConfig = { ], purge_cache: [ { text: 'Purge cache for zone', field: 'zoneId', core: true }, - { text: ', limited to', field: ['files', 'prefixes', 'hosts', 'purgeTags'] }, + { text: ', limited to', field: ['files', 'prefixes', 'hosts', 'tags'] }, ], list_rulesets: [{ text: 'List rulesets in zone', field: 'zoneId', core: true }], get_ruleset: [ @@ -296,7 +316,7 @@ export const CloudflareBlock: BlockConfig = { // List Zones inputs { - id: 'zoneNameFilter', + id: 'name', title: 'Domain Name', type: 'short-input', placeholder: 'Filter by domain (e.g., example.com)', @@ -445,7 +465,7 @@ export const CloudflareBlock: BlockConfig = { condition: { field: 'operation', value: 'list_dns_records' }, }, { - id: 'dnsTypeFilter', + id: 'type', title: 'Record Type', type: 'dropdown', options: [ @@ -463,7 +483,7 @@ export const CloudflareBlock: BlockConfig = { mode: 'advanced', }, { - id: 'dnsNameFilter', + id: 'name', title: 'Name Filter', type: 'short-input', placeholder: 'Filter by record name (exact match)', @@ -471,7 +491,7 @@ export const CloudflareBlock: BlockConfig = { mode: 'advanced', }, { - id: 'dnsContentFilter', + id: 'content', title: 'Content Filter', type: 'short-input', placeholder: 'Filter by record content (exact match)', @@ -521,7 +541,7 @@ export const CloudflareBlock: BlockConfig = { mode: 'advanced', }, { - id: 'dnsProxiedFilter', + id: 'proxied', title: 'Proxied Filter', type: 'dropdown', options: [ @@ -665,7 +685,7 @@ export const CloudflareBlock: BlockConfig = { mode: 'advanced', }, { - id: 'tags', + id: 'recordTags', title: 'Tags', type: 'short-input', placeholder: 'Comma-separated tags (e.g., production,web)', @@ -691,7 +711,7 @@ export const CloudflareBlock: BlockConfig = { condition: { field: 'operation', value: 'update_dns_record' }, }, { - id: 'type', + id: 'updateRecordType', title: 'Record Type', type: 'dropdown', options: [ @@ -709,7 +729,12 @@ export const CloudflareBlock: BlockConfig = { mode: 'advanced', }, { - id: 'name', + /** + * Renaming a live DNS record is a write, and this control is advanced, so + * sharing the bare `name` id let a name typed under any other operation + * reach the PATCH and rename the record. + */ + id: 'updateRecordName', title: 'Record Name', type: 'short-input', placeholder: 'e.g., example.com or sub.example.com', @@ -717,7 +742,7 @@ export const CloudflareBlock: BlockConfig = { mode: 'advanced', }, { - id: 'content', + id: 'updateRecordContent', title: 'New Content', type: 'short-input', placeholder: 'e.g., 192.0.2.1', @@ -733,7 +758,7 @@ export const CloudflareBlock: BlockConfig = { mode: 'advanced', }, { - id: 'proxied', + id: 'updateRecordProxied', title: 'Proxied', type: 'dropdown', options: [ @@ -762,7 +787,7 @@ export const CloudflareBlock: BlockConfig = { mode: 'advanced', }, { - id: 'tags', + id: 'updateRecordTags', title: 'Tags', type: 'short-input', placeholder: 'Comma-separated tags (e.g., production,web)', @@ -1126,7 +1151,7 @@ Return ONLY the comma-separated URLs - no explanations, no extra text.`, }, }, { - id: 'purgeTags', + id: 'tags', title: 'Cache Tags', type: 'short-input', placeholder: 'Comma-separated cache tags (Enterprise only)', @@ -1252,7 +1277,6 @@ Return ONLY the comma-separated URLs - no explanations, no extra text.`, options: [ { label: 'Zone (phase entry point)', id: 'zone' }, { label: 'Custom', id: 'custom' }, - { label: 'Root', id: 'root' }, ], value: () => 'zone', condition: { field: 'operation', value: 'create_ruleset' }, @@ -1444,12 +1468,31 @@ Return ONLY the expression - no explanations, no quotes around the whole express value: () => '', condition: { field: 'operation', - value: [ - 'create_ruleset_rule', - 'update_ruleset_rule', - 'create_rate_limit_rule', - 'update_rate_limit_rule', - ], + value: ['create_ruleset_rule', 'create_rate_limit_rule'], + }, + mode: 'advanced', + }, + { + /** + * The update endpoints replace the rule, so `enabled` is a live on/off + * switch for WAF and rate limiting there rather than a starting state. + * Sharing the create control's id let a `false` chosen while drafting a + * new rule reach a later update and disable an enforcing rule — from a + * field the operation does not render in basic mode, since an advanced + * control serializes on stored value alone, before its `condition` runs. + */ + id: 'updateRuleEnabled', + title: 'Enabled', + type: 'dropdown', + options: [ + { label: 'Leave unchanged (Cloudflare re-enables the rule)', id: '' }, + { label: 'Yes', id: 'true' }, + { label: 'No', id: 'false' }, + ], + value: () => '', + condition: { + field: 'operation', + value: ['update_ruleset_rule', 'update_rate_limit_rule'], }, mode: 'advanced', }, @@ -1485,6 +1528,12 @@ Return ONLY the expression - no explanations, no quotes around the whole express id: 'actionParameters', title: 'Action Parameters', type: 'long-input', + /** + * An `execute` rule carries the managed ruleset it deploys here, and the + * update endpoint replaces the rule — so leaving this blank resets + * action_parameters to {} and unbinds that ruleset. + */ + required: { field: 'action', value: 'execute' }, placeholder: '{"id":"","overrides":{"action":"log"}}', condition: { field: 'operation', @@ -1688,7 +1737,6 @@ Return ONLY the comma-separated list - no explanations, no extra text.`, { label: 'WARP', id: 'warp' }, { label: 'Browser Isolation', id: 'biso' }, { label: 'Bookmark', id: 'bookmark' }, - { label: 'Dashboard SSO', id: 'dash_sso' }, { label: 'Infrastructure', id: 'infrastructure' }, { label: 'RDP', id: 'rdp' }, { label: 'MCP', id: 'mcp' }, @@ -1717,7 +1765,6 @@ Return ONLY the comma-separated list - no explanations, no extra text.`, { label: 'WARP', id: 'warp' }, { label: 'Browser Isolation', id: 'biso' }, { label: 'Bookmark', id: 'bookmark' }, - { label: 'Dashboard SSO', id: 'dash_sso' }, { label: 'Infrastructure', id: 'infrastructure' }, { label: 'RDP', id: 'rdp' }, { label: 'MCP', id: 'mcp' }, @@ -1731,12 +1778,56 @@ Return ONLY the comma-separated list - no explanations, no extra text.`, id: 'domain', title: 'Domain', type: 'short-input', - placeholder: 'Required for self_hosted, ssh, vnc, rdp, and bookmark apps', + placeholder: 'e.g., internal.example.com — required for self_hosted, ssh, vnc, and rdp apps', + required: (values) => + values?.operation === 'update_access_application' + ? { field: 'updateAppType', value: [...DOMAIN_REQUIRED_APP_TYPES] } + : { field: 'appType', value: [...DOMAIN_REQUIRED_APP_TYPES] }, condition: { field: 'operation', value: ['create_access_application', 'update_access_application'], }, }, + { + /** `saas_app` is required on the saas request variant and rejected elsewhere. */ + id: 'saasApp', + title: 'SaaS Application', + type: 'long-input', + required: true, + placeholder: '{"auth_type":"saml","consumer_service_url":"https://example.com/acs"}', + condition: (values) => + values?.operation === 'update_access_application' + ? { + field: 'updateAppType', + value: 'saas', + and: { field: 'operation', value: 'update_access_application' }, + } + : { + field: 'appType', + value: 'saas', + and: { field: 'operation', value: 'create_access_application' }, + }, + }, + { + /** `target_criteria` is required on the infrastructure and rdp variants. */ + id: 'targetCriteria', + title: 'Target Criteria', + type: 'long-input', + required: true, + placeholder: '[{"port":22,"protocol":"ssh","target_attributes":{"hostname":["app"]}}]', + condition: (values) => + values?.operation === 'update_access_application' + ? { + field: 'updateAppType', + value: ['infrastructure', 'rdp'], + and: { field: 'operation', value: 'update_access_application' }, + } + : { + field: 'appType', + value: ['infrastructure', 'rdp'], + and: { field: 'operation', value: 'create_access_application' }, + }, + }, { id: 'accessAppDomainFilter', title: 'Domain Filter', @@ -2208,11 +2299,24 @@ Return ONLY the JSON array - no explanations, no markdown fences.`, mode: 'advanced', }, { - id: 'cursor', + /** + * R2 returns its cursor at `result_info.cursor` and the Rulesets API at + * `result_info.cursors.after`. The two are not interchangeable, so a + * cursor carried across from the other list 400s. + */ + id: 'r2Cursor', + title: 'Cursor', + type: 'short-input', + placeholder: 'Pagination cursor from a previous call', + condition: { field: 'operation', value: 'list_r2_buckets' }, + mode: 'advanced', + }, + { + id: 'rulesetCursor', title: 'Cursor', type: 'short-input', placeholder: 'Pagination cursor from a previous call', - condition: { field: 'operation', value: ['list_r2_buckets', 'list_rulesets'] }, + condition: { field: 'operation', value: 'list_rulesets' }, mode: 'advanced', }, { @@ -2543,13 +2647,31 @@ Return ONLY the JSON array - no explanations, no markdown fences.`, description: 'Whether the created DNS record is proxied through Cloudflare', }, certificateStatus: { type: 'string', description: 'Certificate pack status filter' }, - zoneNameFilter: { type: 'string', description: 'Domain name filter when listing zones' }, - dnsTypeFilter: { type: 'string', description: 'DNS record type filter when listing records' }, - dnsNameFilter: { type: 'string', description: 'Record name filter when listing records' }, - dnsContentFilter: { type: 'string', description: 'Record content filter when listing records' }, dnsOrder: { type: 'string', description: 'Sort field when listing DNS records' }, - dnsProxiedFilter: { type: 'string', description: 'Proxied filter when listing DNS records' }, - purgeTags: { type: 'string', description: 'Comma-separated cache tags to purge' }, + recordTags: { type: 'string', description: 'Tags applied to a created DNS record' }, + updateRecordType: { + type: 'string', + description: 'Record type a replaced DNS record ends up with', + }, + updateRecordName: { + type: 'string', + description: 'Record name a replaced DNS record ends up with', + }, + updateRecordContent: { + type: 'string', + description: 'Content a replaced DNS record ends up with', + }, + updateRecordProxied: { + type: 'string', + description: 'Whether a replaced DNS record ends up proxied through Cloudflare', + }, + updateRecordTags: { type: 'string', description: 'Tags a replaced DNS record ends up with' }, + updateRuleEnabled: { + type: 'string', + description: 'Whether a replaced WAF or rate limiting rule ends up enabled', + }, + r2Cursor: { type: 'string', description: 'Pagination cursor when listing R2 buckets' }, + rulesetCursor: { type: 'string', description: 'Pagination cursor when listing rulesets' }, workerTagFilter: { type: 'string', description: 'Tag filter when listing Worker scripts' }, accessAppTags: { type: 'string', description: 'Tag names applied to an Access application' }, listNameFilter: { @@ -2675,6 +2797,14 @@ Return ONLY the JSON array - no explanations, no markdown fences.`, customDenyUrl: { type: 'string', description: 'URL denied users are redirected to' }, logoUrl: { type: 'string', description: 'Application logo URL' }, policies: { type: 'string', description: 'JSON array of policies to attach' }, + saasApp: { + type: 'string', + description: 'JSON SaaS configuration for a saas-typed Access application', + }, + targetCriteria: { + type: 'string', + description: 'JSON target criteria for an infrastructure- or rdp-typed Access application', + }, decision: { type: 'string', description: 'Access policy decision' }, include: { type: 'string', description: 'JSON array of Access rules evaluated with OR logic' }, exclude: { type: 'string', description: 'JSON array of Access rules evaluated with NOT logic' }, @@ -2894,6 +3024,22 @@ Return ONLY the JSON array - no explanations, no markdown fences.`, }, } +/** + * Tool param names an alias may safely read a stored value back from. + * + * A value sitting under the bare param name is a workflow saved before that + * control was renamed — unless a control still claims the name and could have + * put the value there itself. Two claims disqualify a name: + * + * - a `mode: 'advanced'` control, because `shouldSerializeSubBlock` serializes + * one on stored value alone, before its `condition` runs, so the value may be + * another operation's hidden field bleeding across; + * - a control with a seeded default, because block state is seeded by subBlock + * id whatever the selected operation, so the value may be a default nobody + * chose (`decision` reads back as `allow` from the create-policy control). + * + * Excluding both keeps the legacy read from re-opening what the aliases closed. + */ export const CloudflareBlockMeta = { tags: ['cloud', 'monitoring'], url: 'https://www.cloudflare.com', diff --git a/apps/sim/blocks/blocks/crowdstrike.test.ts b/apps/sim/blocks/blocks/crowdstrike.test.ts index e8cbfb9b3bc..e75ba076a29 100644 --- a/apps/sim/blocks/blocks/crowdstrike.test.ts +++ b/apps/sim/blocks/blocks/crowdstrike.test.ts @@ -4,6 +4,7 @@ import fs from 'node:fs' import path from 'node:path' import { describe, expect, it } from 'vitest' +import { RTR_READ_ONLY_BASE_COMMANDS } from '@/lib/api/contracts/tools/crowdstrike' import { CrowdStrikeBlock } from '@/blocks/blocks/crowdstrike' /** @@ -154,28 +155,18 @@ describe('CrowdStrike block params', () => { ).toThrow(/500/) }) - it('offers only the documented read-tier RTR base command families', () => { + /** + * Asserted against the contract constant rather than a second hand-maintained + * literal: the route validates `base_command` with `RTR_READ_ONLY_BASE_COMMANDS`, + * so a dropdown that drifts from it either hides a command the API accepts or + * offers one the API rejects. Duplicating the list here would just move the + * drift into the test. + */ + it('offers exactly the read-tier RTR base command families the contract accepts', () => { const baseCommand = CrowdStrikeBlock.subBlocks.find((subBlock) => subBlock.id === 'baseCommand') const ids = (baseCommand?.options as { id: string }[] | undefined)?.map((option) => option.id) - expect(ids).toEqual([ - 'cat', - 'cd', - 'clear', - 'csrutil', - 'env', - 'eventlog', - 'filehash', - 'getsid', - 'help', - 'history', - 'ipconfig', - 'ls', - 'mount', - 'netstat', - 'ps', - 'reg', - ]) + expect(ids).toEqual([...RTR_READ_ONLY_BASE_COMMANDS]) }) it('offers no write-tier RTR base command under the read-scoped tool', () => { diff --git a/apps/sim/blocks/blocks/crowdstrike.ts b/apps/sim/blocks/blocks/crowdstrike.ts index 5759198aa2b..6ac65d5cb14 100644 --- a/apps/sim/blocks/blocks/crowdstrike.ts +++ b/apps/sim/blocks/blocks/crowdstrike.ts @@ -355,6 +355,12 @@ export const CrowdStrikeBlock: BlockConfig = { }, mode: 'advanced', }, + /** + * Falcon has two sort spellings. Alerts, IOC Management, Spotlight, and Cases + * document `field|direction`; Host Groups and Identity Protection sensors + * document `field.direction`. One placeholder cannot show both, so the field + * is declared twice under the same id with mutually exclusive conditions. + */ { id: 'sort', title: 'Sort', @@ -363,9 +369,7 @@ export const CrowdStrikeBlock: BlockConfig = { condition: { field: 'operation', value: [ - 'crowdstrike_query_sensors', 'crowdstrike_query_alerts', - 'crowdstrike_query_host_groups', 'crowdstrike_query_indicators', 'crowdstrike_query_vulnerabilities', 'crowdstrike_query_cases', @@ -373,6 +377,17 @@ export const CrowdStrikeBlock: BlockConfig = { }, mode: 'advanced', }, + { + id: 'sort', + title: 'Sort', + type: 'short-input', + placeholder: 'name.asc', + condition: { + field: 'operation', + value: ['crowdstrike_query_sensors', 'crowdstrike_query_host_groups'], + }, + mode: 'advanced', + }, { id: 'includeHidden', title: 'Include Hidden Alerts', @@ -695,12 +710,14 @@ export const CrowdStrikeBlock: BlockConfig = { { label: 'getsid (Windows, macOS)', id: 'getsid' }, { label: 'help', id: 'help' }, { label: 'history', id: 'history' }, + { label: 'ifconfig (macOS, Linux)', id: 'ifconfig' }, { label: 'ipconfig', id: 'ipconfig' }, { label: 'ls', id: 'ls' }, { label: 'mount', id: 'mount' }, { label: 'netstat', id: 'netstat' }, { label: 'ps', id: 'ps' }, - { label: 'reg (Windows)', id: 'reg' }, + { label: 'reg (Windows, query only)', id: 'reg' }, + { label: 'users (Windows)', id: 'users' }, ], value: () => 'ls', condition: { field: 'operation', value: 'crowdstrike_execute_rtr_command' }, diff --git a/apps/sim/blocks/blocks/datadog.test.ts b/apps/sim/blocks/blocks/datadog.test.ts new file mode 100644 index 00000000000..0eef4a11f3a --- /dev/null +++ b/apps/sim/blocks/blocks/datadog.test.ts @@ -0,0 +1,153 @@ +/** + * Guards the Datadog block's params mapper and declared outputs against the tools they front. + * + * @vitest-environment node + */ +import { describe, expect, it } from 'vitest' +import { DatadogBlock } from '@/blocks/blocks/datadog' +import * as datadogTools from '@/tools/datadog' +import type { ToolConfig } from '@/tools/types' + +const toolsById = new Map( + Object.values(datadogTools) + .filter( + (value): value is ToolConfig => typeof value === 'object' && value !== null && 'id' in value + ) + .map((tool) => [tool.id, tool]) +) + +const mapParams = DatadogBlock.tools.config?.params + +/** + * The block hands the executor `{ ...inputs, ...transformedParams }`, so a mapper that simply + * omits a key leaves the raw serialized subblock value in place. Every assertion about leakage + * has to run against this merged shape rather than the mapper's return value alone. + */ +function mergedParams(inputs: Record): Record { + return { ...inputs, ...(mapParams?.(inputs as never) as Record) } +} + +const baseInputs = { apiKey: 'key', applicationKey: 'app-key', site: 'datadoghq.com' } + +describe('datadog list_monitors params', () => { + /** + * `monitorTags` is Create Monitor's advanced tag field, but it serializes for every operation. + * Leaving it in the merge silently filters the monitor list while presenting it as complete. + */ + it('clears a leftover Create Monitor tag filter after the merge', () => { + const params = mergedParams({ + ...baseInputs, + operation: 'datadog_list_monitors', + monitorTags: 'team:backend', + }) + + expect(params.monitorTags).toBeUndefined() + }) + + it('still forwards the List Monitors filters', () => { + const params = mergedParams({ + ...baseInputs, + operation: 'datadog_list_monitors', + listMonitorName: 'CPU', + listMonitorTags: 'env:prod', + }) + + expect(params.name).toBe('CPU') + expect(params.tags).toBe('env:prod') + }) + + it('forwards pagination as numbers', () => { + const params = mergedParams({ + ...baseInputs, + operation: 'datadog_list_monitors', + listMonitorPageSize: '50', + listMonitorPage: '2', + }) + + expect(params.pageSize).toBe(50) + expect(params.page).toBe(2) + }) + + /** + * These are advanced free-text fields, so they can carry a typo or an unresolved + * reference. A bare `Number()` would put the literal `NaN` in the query string + * rather than omitting the parameter. + */ + it('drops a non-numeric pagination value instead of sending NaN', () => { + const params = mergedParams({ + ...baseInputs, + operation: 'datadog_list_monitors', + listMonitorPageSize: 'fifty', + listMonitorPage: '{{unresolved}}', + }) + + expect(params.pageSize).toBeUndefined() + expect(params.page).toBeUndefined() + }) + + it('keeps an explicit page 0, which is Datadog’s first page', () => { + const params = mergedParams({ + ...baseInputs, + operation: 'datadog_list_monitors', + listMonitorPage: '0', + }) + + expect(params.page).toBe(0) + }) + + it('exposes pagination subBlocks gated on List Monitors', () => { + const paginationIds = ['listMonitorPageSize', 'listMonitorPage'] + for (const id of paginationIds) { + const subBlock = DatadogBlock.subBlocks.find((candidate) => candidate.id === id) + expect(subBlock, `missing subBlock ${id}`).toBeDefined() + expect(subBlock?.condition).toEqual({ field: 'operation', value: 'datadog_list_monitors' }) + } + }) +}) + +describe('datadog create_monitor params', () => { + /** Clearing the leak must not disarm the operation the field actually belongs to. */ + it('still sends monitor tags as the create payload tags', () => { + const params = mergedParams({ + ...baseInputs, + operation: 'datadog_create_monitor', + name: 'High CPU', + type: 'metric alert', + monitorQuery: 'avg(last_5m):avg:system.cpu.user{*} > 90', + monitorTags: 'team:backend', + }) + + expect(params.tags).toBe('team:backend') + }) +}) + +describe('datadog block outputs', () => { + const outputs = DatadogBlock.outputs + + it('declares the fields mute and unmute return', () => { + for (const toolId of ['datadog_mute_monitor', 'datadog_unmute_monitor']) { + const toolOutputs = Object.keys(toolsById.get(toolId)?.outputs ?? {}) + expect(toolOutputs).toContain('monitorId') + for (const field of toolOutputs) { + expect(outputs, `${toolId} emits ${field}`).toHaveProperty(field) + } + } + }) + + /** `errors` is the only signal that Datadog rejected part of a submitted metric batch. */ + it('declares the submit_metrics errors field', () => { + expect(Object.keys(toolsById.get('datadog_submit_metrics')?.outputs ?? {})).toContain('errors') + expect(outputs).toHaveProperty('errors') + }) + + it('declares no output no tool can produce', () => { + const emitted = new Set() + for (const toolId of DatadogBlock.tools.access ?? []) { + for (const field of Object.keys(toolsById.get(toolId)?.outputs ?? {})) { + emitted.add(field) + } + } + + expect(Object.keys(outputs).filter((field) => !emitted.has(field))).toEqual([]) + }) +}) diff --git a/apps/sim/blocks/blocks/datadog.ts b/apps/sim/blocks/blocks/datadog.ts index da94bfc5582..0dcfe862503 100644 --- a/apps/sim/blocks/blocks/datadog.ts +++ b/apps/sim/blocks/blocks/datadog.ts @@ -15,6 +15,20 @@ function toSwitchBoolean(value: unknown): boolean | undefined { return undefined } +/** + * Coerce a List Monitors pagination input, dropping anything that is not a finite + * number. These are advanced free-text fields, so they can carry a typo or an + * unresolved reference, and a bare `Number()` would put the literal `NaN` in the + * query string instead of omitting the parameter. An untouched subBlock resolves + * to `null` and an empty one to `''`; both are omissions rather than zeros, while + * an explicit `0` is Datadog's own first page and is kept. + */ +function datadogPageNumber(value: unknown): number | undefined { + if (value == null || value === '') return undefined + const parsed = Number(value) + return Number.isFinite(parsed) ? parsed : undefined +} + export const DatadogBlock: BlockConfig = { type: 'datadog', name: 'Datadog', @@ -514,6 +528,22 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`, condition: { field: 'operation', value: 'datadog_list_monitors' }, mode: 'advanced', }, + { + id: 'listMonitorPageSize', + title: 'Page Size', + type: 'short-input', + placeholder: '50', + condition: { field: 'operation', value: 'datadog_list_monitors' }, + mode: 'advanced', + }, + { + id: 'listMonitorPage', + title: 'Page Number', + type: 'short-input', + placeholder: '0', + condition: { field: 'operation', value: 'datadog_list_monitors' }, + mode: 'advanced', + }, // Mute / Unmute Monitor inputs { @@ -1989,6 +2019,14 @@ Return ONLY the search query string - no explanations.`, ...baseParams, name: params.listMonitorName || undefined, tags: params.listMonitorTags || undefined, + /** + * `monitorTags` belongs to Create Monitor but serializes for every operation, and + * the block merges these params over the raw inputs. Without an explicit clear, a + * leftover value would filter this list while presenting it as complete. + */ + monitorTags: undefined, + pageSize: datadogPageNumber(params.listMonitorPageSize), + page: datadogPageNumber(params.listMonitorPage), } case 'datadog_mute_monitor': @@ -2352,6 +2390,8 @@ Return ONLY the search query string - no explanations.`, downtimeId: { type: 'string', description: 'Downtime ID to cancel' }, listMonitorName: { type: 'string', description: 'Filter monitors by name' }, listMonitorTags: { type: 'string', description: 'Filter monitors by tags' }, + listMonitorPageSize: { type: 'number', description: 'Monitors to return per page' }, + listMonitorPage: { type: 'number', description: 'Monitor page number (0-indexed)' }, // Incidents incidentId: { type: 'string', description: 'Incident UUID' }, incidentTitle: { type: 'string', description: 'Incident title' }, @@ -2452,12 +2492,15 @@ Return ONLY the search query string - no explanations.`, // Metrics series: { type: 'json', description: 'Timeseries data' }, status: { type: 'string', description: 'Query status' }, + errors: { type: 'json', description: 'Metric series rejected during submission' }, // Events event: { type: 'json', description: 'Event data' }, - events: { type: 'json', description: 'List of events' }, // Monitors monitor: { type: 'json', description: 'Monitor data' }, monitors: { type: 'json', description: 'List of monitors' }, + monitorId: { type: 'number', description: 'ID of the muted or unmuted monitor' }, + name: { type: 'string', description: 'Name of the muted or unmuted monitor' }, + overallState: { type: 'string', description: 'Monitor state after muting or unmuting' }, // Logs logs: { type: 'json', description: 'Log entries' }, nextLogId: { type: 'string', description: 'Pagination cursor for logs' }, diff --git a/apps/sim/blocks/blocks/microsoft_ad.test.ts b/apps/sim/blocks/blocks/microsoft_ad.test.ts new file mode 100644 index 00000000000..efe7ef81e01 --- /dev/null +++ b/apps/sim/blocks/blocks/microsoft_ad.test.ts @@ -0,0 +1,144 @@ +/** + * @vitest-environment node + */ +import { describe, expect, it } from 'vitest' +import { MicrosoftAdBlock } from '@/blocks/blocks/microsoft_ad' + +/** + * The tri-state assertions run against `{ ...inputs, ...buildParams(inputs) }`, the shape the + * generic tool handler actually forwards. A key the mapper merely omits is *not* dropped by that + * merge — the raw subBlock string survives — so asserting on the mapper's return alone would + * pass against the broken code. + */ +describe('MicrosoftAdBlock', () => { + const buildParams = MicrosoftAdBlock.tools.config.params! + + const subBlock = (id: string) => + MicrosoftAdBlock.subBlocks.find((candidate) => candidate.id === id)! + + describe('accountEnabled tri-state', () => { + it('clears the "No Change" default instead of forwarding an empty string', () => { + const inputs = { operation: 'update_user', userId: 'user-1', accountEnabled: '' } + const finalInputs = { ...inputs, ...buildParams(inputs) } + + expect(finalInputs.accountEnabled).toBeUndefined() + }) + + it('is the serialized default, so the empty case is the common case', () => { + const accountEnabled = subBlock('accountEnabled') + + expect(accountEnabled.value?.()).toBe('') + expect(accountEnabled.mode).toBeUndefined() + }) + + it('coerces an explicit update_user choice to a boolean', () => { + const enabled = { operation: 'update_user', userId: 'user-1', accountEnabled: 'true' } + const disabled = { operation: 'update_user', userId: 'user-1', accountEnabled: 'false' } + + expect({ ...enabled, ...buildParams(enabled) }.accountEnabled).toBe(true) + expect({ ...disabled, ...buildParams(disabled) }.accountEnabled).toBe(false) + }) + + it('coerces the create_user choice to a boolean and clears the update-side value', () => { + const inputs = { + operation: 'create_user', + displayName: 'Ada', + accountEnabled: '', + accountEnabledCreate: 'false', + } + const finalInputs = { ...inputs, ...buildParams(inputs) } + + expect(finalInputs.accountEnabled).toBe(false) + }) + }) + + describe('visibility tri-state', () => { + it('clears the "No Change" default instead of forwarding an empty string', () => { + const inputs = { operation: 'update_group', groupId: 'group-1', visibility: '' } + const finalInputs = { ...inputs, ...buildParams(inputs) } + + expect(finalInputs.visibility).toBeUndefined() + }) + + it('passes an explicit visibility through on both operations', () => { + const update = { operation: 'update_group', groupId: 'group-1', visibility: 'Public' } + const create = { + operation: 'create_group', + visibility: '', + visibilityCreate: 'HiddenMembership', + } + + expect({ ...update, ...buildParams(update) }.visibility).toBe('Public') + expect({ ...create, ...buildParams(create) }.visibility).toBe('HiddenMembership') + }) + }) + + describe('top coercion', () => { + it('never forwards NaN for a non-numeric page size', () => { + const inputs = { operation: 'list_users', top: 'all' } + const finalInputs = { ...inputs, ...buildParams(inputs) } + + expect(finalInputs.top).toBeUndefined() + }) + + it('coerces a numeric page size', () => { + const inputs = { operation: 'list_users', top: '100' } + + expect({ ...inputs, ...buildParams(inputs) }.top).toBe(100) + }) + }) + + describe('groupId requirement', () => { + it('requires a Group ID for list_group_members on the first page', () => { + const required = subBlock('groupId').required as (values?: Record) => { + field: string + value: string[] + } + + expect(required({}).value).toContain('list_group_members') + }) + + it('drops the requirement only while continuing from a nextLink', () => { + const required = subBlock('groupId').required as (values?: Record) => { + field: string + value: string[] + } + const { value } = required({ nextLink: 'https://graph.microsoft.com/v1.0/groups/g/members' }) + + expect(value).not.toContain('list_group_members') + expect(value).toEqual( + expect.arrayContaining([ + 'get_group', + 'update_group', + 'delete_group', + 'add_group_member', + 'remove_group_member', + ]) + ) + }) + }) + + /** + * `User.ReadWrite.All` is listed on every `/users` read this block performs — list, get, + * licenseDetails, registeredDevices, and ownedDevices — so `User.Read.All` was pure consent + * noise. `Directory.Read.All` and `GroupMember.ReadWrite.All` are deliberately retained: + * `GET /subscribedSkus` names neither `LicenseAssignment.ReadWrite.All` nor any scope left in + * this list, and `POST /groups/{id}/members/$ref` accepts `GroupMember.ReadWrite.All` only. + */ + describe('requested OAuth scopes', () => { + const requiredScopes = + MicrosoftAdBlock.subBlocks.find((candidate) => candidate.id === 'credential') + ?.requiredScopes ?? [] + + it('does not request User.Read.All, which User.ReadWrite.All subsumes', () => { + expect(requiredScopes).toContain('User.ReadWrite.All') + expect(requiredScopes).not.toContain('User.Read.All') + }) + + it('keeps the scopes no retained scope covers', () => { + expect(requiredScopes).toEqual( + expect.arrayContaining(['Directory.Read.All', 'GroupMember.ReadWrite.All']) + ) + }) + }) +}) diff --git a/apps/sim/blocks/blocks/microsoft_ad.ts b/apps/sim/blocks/blocks/microsoft_ad.ts index a2a337bf416..7769ca84f3b 100644 --- a/apps/sim/blocks/blocks/microsoft_ad.ts +++ b/apps/sim/blocks/blocks/microsoft_ad.ts @@ -33,6 +33,28 @@ const ALWAYS_USER_ID_OPERATIONS = USER_ID_OPERATIONS.filter( (operation) => !PAGED_USER_ID_OPERATIONS.includes(operation) ) +/** Operations that act on a single group and therefore require the Group ID field. */ +const GROUP_ID_OPERATIONS = [ + 'get_group', + 'update_group', + 'delete_group', + 'list_group_members', + 'add_group_member', + 'remove_group_member', +] + +/** + * Group operations that page through an `@odata.nextLink`. The continuation URL already + * addresses the group, so these are the only group operations that can run without a Group ID, + * and only when continuing from a previous page. + */ +const PAGED_GROUP_ID_OPERATIONS = ['list_group_members'] + +/** Group operations that always require a Group ID, whichever page is being fetched. */ +const ALWAYS_GROUP_ID_OPERATIONS = GROUP_ID_OPERATIONS.filter( + (operation) => !PAGED_GROUP_ID_OPERATIONS.includes(operation) +) + /** Collection operations that accept a page size and an @odata.nextLink continuation URL. */ const PAGED_OPERATIONS = [ 'list_users', @@ -433,27 +455,16 @@ export const MicrosoftAdBlock: BlockConfig = { title: 'Group ID', type: 'short-input', placeholder: 'Group ID (GUID)', - condition: { - field: 'operation', - value: [ - 'get_group', - 'update_group', - 'delete_group', - 'list_group_members', - 'add_group_member', - 'remove_group_member', - ], - }, - required: { - field: 'operation', - value: [ - 'get_group', - 'update_group', - 'delete_group', - 'add_group_member', - 'remove_group_member', - ], - }, + condition: { field: 'operation', value: GROUP_ID_OPERATIONS }, + /** + * `list_group_members` pages through an `@odata.nextLink` that already addresses the + * group, so it is the only member of this set that can run without a Group ID, and only + * when continuing from a previous page. + */ + required: (values) => + values?.nextLink + ? { field: 'operation', value: ALWAYS_GROUP_ID_OPERATIONS } + : { field: 'operation', value: GROUP_ID_OPERATIONS }, }, // Create group fields { @@ -817,7 +828,8 @@ export const MicrosoftAdBlock: BlockConfig = { tool: (params) => `microsoft_ad_${params.operation}`, params: (params) => { const result: Record = {} - if (params.top) result.top = Number(params.top) + const top = Number(params.top) + result.top = params.top && Number.isFinite(top) ? top : undefined if (params.nextLink) result.nextLink = params.nextLink const values = params as Record result.filter = values[FILTER_FIELD_BY_OPERATION[params.operation]] || undefined @@ -829,10 +841,13 @@ export const MicrosoftAdBlock: BlockConfig = { : undefined } if (params.operation === 'update_user') { - if (params.accountEnabled) result.accountEnabled = params.accountEnabled === 'true' + result.accountEnabled = params.accountEnabled + ? params.accountEnabled === 'true' + : undefined } else if (params.operation === 'create_user') { - if (params.accountEnabledCreate) - result.accountEnabled = params.accountEnabledCreate === 'true' + result.accountEnabled = params.accountEnabledCreate + ? params.accountEnabledCreate === 'true' + : undefined } if (params.mailEnabled !== undefined) result.mailEnabled = params.mailEnabled === 'true' if (params.securityEnabled !== undefined) @@ -843,9 +858,9 @@ export const MicrosoftAdBlock: BlockConfig = { if (params.groupDescription) result.description = params.groupDescription if (params.groupTypes !== undefined) result.groupTypes = params.groupTypes if (params.operation === 'update_group') { - if (params.visibility) result.visibility = params.visibility + result.visibility = params.visibility || undefined } else if (params.operation === 'create_group') { - if (params.visibilityCreate) result.visibility = params.visibilityCreate + result.visibility = params.visibilityCreate || undefined } return result }, diff --git a/apps/sim/blocks/blocks/okta.test.ts b/apps/sim/blocks/blocks/okta.test.ts index c0ed7c37f34..53e69305396 100644 --- a/apps/sim/blocks/blocks/okta.test.ts +++ b/apps/sim/blocks/blocks/okta.test.ts @@ -59,6 +59,22 @@ describe('Okta block params transform', () => { expect(merged.description).toBe('Eng team') }) + /** + * The update tool declares `name` optional and its merge helper carries the + * stored name through when the field is blank, so requiring it on the block + * would block a description-only update the tool and the API both accept. + * Create has no stored name to fall back on and still requires it. + */ + it('requires the group name only when creating a group', () => { + const groupName = OktaBlock.subBlocks.find((subBlock) => subBlock.id === 'groupName') + + expect(groupName?.condition).toEqual({ + field: 'operation', + value: ['okta_create_group', 'okta_update_group'], + }) + expect(groupName?.required).toEqual({ field: 'operation', value: ['okta_create_group'] }) + }) + it('keeps a false toggle, which is a real choice rather than a blank field', () => { const merged = merge({ ...BASE, diff --git a/apps/sim/blocks/blocks/okta.ts b/apps/sim/blocks/blocks/okta.ts index 852771f9e91..7a0db904fec 100644 --- a/apps/sim/blocks/blocks/okta.ts +++ b/apps/sim/blocks/blocks/okta.ts @@ -22,6 +22,23 @@ const SEND_EMAIL_DEFAULT_ON_OPERATIONS = ['okta_activate_user', 'okta_reset_pass const SEND_EMAIL_DEFAULT_ON = new Set(SEND_EMAIL_DEFAULT_ON_OPERATIONS) +/** + * The cursor subBlock each paginated operation reads. + * + * Okta's `after` cursor is opaque and scoped to the endpoint that minted it, so + * every operation carries its own field rather than sharing one. + */ +const CURSOR_FIELD_BY_OPERATION: Record = { + okta_list_users: 'after', + okta_list_groups: 'groupsAfter', + okta_list_group_members: 'groupMembersAfter', + okta_get_logs: 'logsAfter', + okta_list_apps: 'appsAfter', + okta_list_app_users: 'appUsersAfter', + okta_list_app_groups: 'appGroupsAfter', + okta_list_group_rules: 'groupRulesAfter', +} + /** Treats a blank subBlock value as absent. */ function blankToUndefined(value: unknown): unknown { return value === null || value === '' ? undefined : value @@ -464,11 +481,27 @@ export const OktaBlock: BlockConfig = { condition: { field: 'operation', value: ['okta_create_user', 'okta_update_user'] }, mode: 'advanced', }, + /** + * Okta's `activate` default is inverted between the two operations that take + * it: creating a user activates unless told otherwise, enrolling a factor + * does not. One shared switch could only be seeded for one of them, and + * because it is advanced `shouldSerializeSubBlock` skips its condition, so + * the other operation inherited the wrong answer. Each gets its own field + * and the params mapper picks by operation. + */ { id: 'activate', title: 'Activate Immediately', type: 'switch', - condition: { field: 'operation', value: ['okta_create_user', 'okta_enroll_factor'] }, + value: () => 'true', + condition: { field: 'operation', value: 'okta_create_user' }, + mode: 'advanced', + }, + { + id: 'activateFactor', + title: 'Activate Immediately', + type: 'switch', + condition: { field: 'operation', value: 'okta_enroll_factor' }, mode: 'advanced', }, // Group name (for create/update group) @@ -478,7 +511,13 @@ export const OktaBlock: BlockConfig = { type: 'short-input', placeholder: 'Engineering Team', condition: { field: 'operation', value: ['okta_create_group', 'okta_update_group'] }, - required: { field: 'operation', value: ['okta_create_group', 'okta_update_group'] }, + /** + * Required only on create, where Okta has no stored name to fall back on. + * An update is a read-modify-write that carries the stored name through, so + * a blank name means "leave it alone" — requiring it here would block a + * description-only update the tool and API both accept. + */ + required: { field: 'operation', value: ['okta_create_group'] }, }, { id: 'groupDescription', @@ -889,24 +928,77 @@ export const OktaBlock: BlockConfig = { }, mode: 'advanced', }, + /** + * One cursor field per operation. + * + * Okta mints `after` per endpoint and rejects a cursor issued by another + * one, so a single shared field carried a `list_users` cursor straight into + * `list_groups`. Being advanced, `shouldSerializeSubBlock` skips its + * condition, so the stale value reached the wire unseen; the params mapper + * publishes only the field belonging to the selected operation. + */ { id: 'after', title: 'Cursor', type: 'short-input', placeholder: 'nextCursor from a previous run', - condition: { - field: 'operation', - value: [ - 'okta_list_users', - 'okta_list_groups', - 'okta_list_group_members', - 'okta_get_logs', - 'okta_list_apps', - 'okta_list_app_users', - 'okta_list_app_groups', - 'okta_list_group_rules', - ], - }, + condition: { field: 'operation', value: 'okta_list_users' }, + mode: 'advanced', + }, + { + id: 'groupsAfter', + title: 'Cursor', + type: 'short-input', + placeholder: 'nextCursor from a previous run', + condition: { field: 'operation', value: 'okta_list_groups' }, + mode: 'advanced', + }, + { + id: 'groupMembersAfter', + title: 'Cursor', + type: 'short-input', + placeholder: 'nextCursor from a previous run', + condition: { field: 'operation', value: 'okta_list_group_members' }, + mode: 'advanced', + }, + { + id: 'logsAfter', + title: 'Cursor', + type: 'short-input', + placeholder: 'nextCursor from a previous run', + condition: { field: 'operation', value: 'okta_get_logs' }, + mode: 'advanced', + }, + { + id: 'appsAfter', + title: 'Cursor', + type: 'short-input', + placeholder: 'nextCursor from a previous run', + condition: { field: 'operation', value: 'okta_list_apps' }, + mode: 'advanced', + }, + { + id: 'appUsersAfter', + title: 'Cursor', + type: 'short-input', + placeholder: 'nextCursor from a previous run', + condition: { field: 'operation', value: 'okta_list_app_users' }, + mode: 'advanced', + }, + { + id: 'appGroupsAfter', + title: 'Cursor', + type: 'short-input', + placeholder: 'nextCursor from a previous run', + condition: { field: 'operation', value: 'okta_list_app_groups' }, + mode: 'advanced', + }, + { + id: 'groupRulesAfter', + title: 'Cursor', + type: 'short-input', + placeholder: 'nextCursor from a previous run', + condition: { field: 'operation', value: 'okta_list_group_rules' }, mode: 'advanced', }, ], @@ -973,6 +1065,9 @@ export const OktaBlock: BlockConfig = { * with an empty string rather than leaving it untouched. */ params: (params) => { + const operation = String(params.operation) + const cursorField = CURSOR_FIELD_BY_OPERATION[operation] + const result: Record = { apiKey: params.apiKey, domain: params.domain, @@ -992,9 +1087,16 @@ export const OktaBlock: BlockConfig = { * so a stale value from a previously selected operation can still be * present here. */ - sendEmail: SEND_EMAIL_DEFAULT_ON.has(String(params.operation)) + sendEmail: SEND_EMAIL_DEFAULT_ON.has(operation) ? blankToUndefined(params.sendEmail) : blankToUndefined(params.sendDeactivationEmail), + /** Same stale-advanced-value hazard: pick the toggle for this operation. */ + activate: + operation === 'okta_enroll_factor' + ? blankToUndefined(params.activateFactor) + : blankToUndefined(params.activate), + /** A cursor is only valid on the endpoint that minted it. */ + after: cursorField ? blankToUndefined(params[cursorField]) : undefined, } const mappedKeys = new Set([ @@ -1009,6 +1111,10 @@ export const OktaBlock: BlockConfig = { 'ruleSearch', 'sendEmail', 'sendDeactivationEmail', + 'activate', + 'activateFactor', + 'after', + ...Object.values(CURSOR_FIELD_BY_OPERATION), ]) for (const [key, value] of Object.entries(params)) { if (!mappedKeys.has(key)) result[key] = blankToUndefined(value) @@ -1038,6 +1144,10 @@ export const OktaBlock: BlockConfig = { title: { type: 'string', description: 'Job title' }, department: { type: 'string', description: 'Department' }, activate: { type: 'boolean', description: 'Activate user immediately on creation' }, + activateFactor: { + type: 'boolean', + description: 'Activate the MFA factor immediately on enrollment', + }, groupName: { type: 'string', description: 'Group name' }, groupDescription: { type: 'string', description: 'Group description' }, sendEmail: { type: 'boolean', description: 'Whether to send email notification' }, @@ -1046,7 +1156,20 @@ export const OktaBlock: BlockConfig = { description: 'Whether to send the deactivation or removal email notification', }, q: { type: 'string', description: 'Keyword search query' }, - after: { type: 'string', description: 'Cursor for the next page of results' }, + after: { type: 'string', description: 'Cursor for the next page of users' }, + groupsAfter: { type: 'string', description: 'Cursor for the next page of groups' }, + groupMembersAfter: { type: 'string', description: 'Cursor for the next page of group members' }, + logsAfter: { type: 'string', description: 'Cursor for the next page of System Log events' }, + appsAfter: { type: 'string', description: 'Cursor for the next page of applications' }, + appUsersAfter: { + type: 'string', + description: 'Cursor for the next page of application users', + }, + appGroupsAfter: { + type: 'string', + description: 'Cursor for the next page of application groups', + }, + groupRulesAfter: { type: 'string', description: 'Cursor for the next page of group rules' }, since: { type: 'string', description: 'Start of the System Log time window' }, until: { type: 'string', description: 'End of the System Log time window' }, sortOrder: { type: 'string', description: 'System Log sort order' }, @@ -1143,7 +1266,11 @@ export const OktaBlock: BlockConfig = { deactivated: { type: 'boolean', description: 'Whether user was deactivated' }, suspended: { type: 'boolean', description: 'Whether user was suspended' }, unsuspended: { type: 'boolean', description: 'Whether user was unsuspended' }, - activated: { type: 'boolean', description: 'Whether user was activated' }, + activated: { + type: 'string', + description: + 'Activation timestamp on a user read. Activate User reports `true` here instead.', + }, deleted: { type: 'boolean', description: 'Whether resource was deleted' }, activationUrl: { type: 'string', description: 'Activation URL (when sendEmail is false)' }, activationToken: { type: 'string', description: 'Activation token (when sendEmail is false)' }, diff --git a/apps/sim/blocks/blocks/servicenow.ts b/apps/sim/blocks/blocks/servicenow.ts index ddbd112745f..561260caeea 100644 --- a/apps/sim/blocks/blocks/servicenow.ts +++ b/apps/sim/blocks/blocks/servicenow.ts @@ -21,6 +21,26 @@ const FILE_FIELD = ['uploadFile', 'fileReference'] as const const RECORD_MATCH_FIELD = ['sysId', 'number', 'query'] as const +/** JSON-valued subblocks, paired with the control label to name in a parse error. */ +const JSON_SUBBLOCKS = [ + ['additionalFields', 'Additional Fields'], + ['variables', 'Item Variables'], +] as const + +/** + * Parses a JSON-valued subblock, naming the control the typo is in. + * + * `tools.config.params` runs unguarded, so a bare `JSON.parse` escapes as + * `JSON Parse error: Expected '}'` with nothing pointing at the field to fix. + */ +function parseJsonSubBlock(value: string, label: string): unknown { + try { + return JSON.parse(value) + } catch { + throw new Error(`${label} must be a JSON object`) + } +} + /** Generic Table API operations, which address an arbitrary table by name. */ const GENERIC_TABLE_OPS = [ 'servicenow_create_record', @@ -70,6 +90,17 @@ const SEMANTIC_UPDATE_OPS = [ /** Every operation that writes through the Table API. */ const SEMANTIC_WRITE_OPS = [...SEMANTIC_CREATE_OPS, ...SEMANTIC_UPDATE_OPS] as const +/** + * Every operation whose tool spreads `writeParams` — `fields`, `displayValue`, + * and `inputDisplayValue`. + * + * `update_approval` addresses its record by `approvalSysId` rather than the + * shared `sysId`, so it stays out of `SEMANTIC_UPDATE_OPS`, but it declares the + * same write params. Leaving it out of these controls made it the one operation + * where a stale advanced `displayValue`/`returnFields` reached the wire unseen. + */ +const SEMANTIC_WRITE_PARAM_OPS = [...SEMANTIC_WRITE_OPS, 'servicenow_update_approval'] as const + /** * Write operations that accept the raw `additionalFields` escape hatch. Excludes * `add_incident_comment`, whose body is exactly one journal field, so a value @@ -97,7 +128,7 @@ const PAGINATED_OPS = [ */ const SEMANTIC_DISPLAY_VALUE_OPS: ReadonlySet = new Set([ ...SEMANTIC_READ_OPS, - ...SEMANTIC_WRITE_OPS, + ...SEMANTIC_WRITE_PARAM_OPS, ]) /** Operations whose tool takes a `state`, from whichever control owns that state model. */ @@ -519,14 +550,22 @@ Output: {"short_description": "Network outage", "description": "Network connecti value: () => 'all', condition: { field: 'operation', - value: [...SEMANTIC_READ_OPS, ...SEMANTIC_WRITE_OPS], + value: [...SEMANTIC_READ_OPS, ...SEMANTIC_WRITE_PARAM_OPS], }, description: 'How reference and choice fields come back. "all" (the default) returns both the sys_id and the label as {value, display_value}.', mode: 'advanced', }, + /** + * Read Records keeps its projection on its own id. + * + * Sharing `fields` with the Create/Update Record JSON bodies meant one + * stored value served two value spaces: a projection selected into Create + * Record threw an uncaught `SyntaxError`, and a JSON body selected into + * Read Records went out as `sysparm_fields=[object Object]`. + */ { - id: 'fields', + id: 'readFields', title: 'Fields to Return', type: 'short-input', placeholder: 'number,short_description,priority', @@ -545,7 +584,7 @@ Output: {"short_description": "Network outage", "description": "Network connecti 'servicenow_search_knowledge', 'servicenow_get_knowledge_article', ...SEMANTIC_READ_OPS, - ...SEMANTIC_WRITE_OPS, + ...SEMANTIC_WRITE_PARAM_OPS, ], }, description: 'Comma-separated list of fields', @@ -662,9 +701,10 @@ Output: {"state": "2", "assigned_to": "john.doe", "work_notes": "Assigned and st id: 'having', title: 'Having', type: 'short-input', - placeholder: 'count>5', + placeholder: 'count^priority^>^3', condition: { field: 'operation', value: 'servicenow_aggregate' }, - description: 'Filter on aggregate results', + description: + 'Filter on aggregate results, written as aggregate^field^operator^value and comma-separated for more than one', mode: 'advanced', }, // Attachment record sys_id (list + upload) @@ -836,7 +876,11 @@ Output: {"state": "2", "assigned_to": "john.doe", "work_notes": "Assigned and st title: 'Target State', type: 'combobox', options: [...CHANGE_STATE_OPTIONS], - value: () => CHANGE_STATE_OPTIONS[0].id, + /** + * Deliberately unseeded. A seeded first option ("New") meant running the + * operation untouched moved the change backwards; `required` now forces an + * explicit choice instead. + */ condition: { field: 'operation', value: 'servicenow_update_change_state' }, required: true, description: @@ -1350,7 +1394,10 @@ Output: {"state": "2", "assigned_to": "john.doe", "work_notes": "Assigned and st title: 'Decision', type: 'dropdown', options: [...APPROVAL_DECISION_OPTIONS], - value: () => APPROVAL_DECISION_OPTIONS[0].id, + /** + * Deliberately unseeded. Seeding the first option defaulted the operation + * to Approve, so `required` forces the caller to pick a decision. + */ condition: { field: 'operation', value: 'servicenow_update_approval' }, required: true, }, @@ -1525,7 +1572,7 @@ Output: {"state": "2", "assigned_to": "john.doe", "work_notes": "Assigned and st { label: 'Yes — resolve display names to sys_ids', id: 'true' }, ], value: () => 'false', - condition: { field: 'operation', value: [...SEMANTIC_WRITE_OPS] }, + condition: { field: 'operation', value: [...SEMANTIC_WRITE_PARAM_OPS] }, description: 'Sets sysparm_input_display_value, letting you write "Beth Anglin" into assigned_to instead of a sys_id. Also reinterprets date and time values in your timezone rather than GMT.', mode: 'advanced', @@ -1580,6 +1627,7 @@ Output: {"state": "2", "assigned_to": "john.doe", "work_notes": "Assigned and st const { operation, fields, + readFields, returnFields, file, attachmentLimit, @@ -1642,11 +1690,11 @@ Output: {"state": "2", "assigned_to": "john.doe", "work_notes": "Assigned and st rest.updateView = rest.updateView === true || rest.updateView === 'true' } - for (const key of ['additionalFields', 'variables'] as const) { + for (const [key, label] of JSON_SUBBLOCKS) { const value = rest[key] if (typeof value === 'string') { const trimmed = value.trim() - rest[key] = trimmed ? JSON.parse(trimmed) : undefined + rest[key] = trimmed ? parseJsonSubBlock(trimmed, label) : undefined } } @@ -1660,20 +1708,21 @@ Output: {"state": "2", "assigned_to": "john.doe", "work_notes": "Assigned and st } /** - * `fields` means two different things: a JSON body on Create/Update - * Record, and a comma-separated projection everywhere else. The generic - * Table API tools keep the original `fields` subblock id, since renaming - * it would orphan the stored value of every workflow already using them; - * every operation added since reads `returnFields` instead, so a JSON - * body can never arrive as a projection or the reverse. + * The `fields` tool param means two different things: a JSON body on + * Create/Update Record, and a comma-separated projection everywhere + * else. Every subblock therefore owns exactly one of those value + * spaces — `fields` is the Create/Update body, `readFields` is Read + * Records' projection, `returnFields` is every other operation's — so a + * JSON body can never arrive as a projection or the reverse. */ if (isCreateOrUpdate) { if (!fields) return { ...rest, fields: undefined } - const parsedFields = typeof fields === 'string' ? JSON.parse(fields) : fields + const parsedFields = + typeof fields === 'string' ? parseJsonSubBlock(fields, 'Fields') : fields return { ...rest, fields: parsedFields } } - const projection = operation === 'servicenow_read_record' ? fields : returnFields + const projection = operation === 'servicenow_read_record' ? readFields : returnFields return { ...rest, fields: projection || undefined } }, }, @@ -1694,6 +1743,10 @@ Output: {"state": "2", "assigned_to": "john.doe", "work_notes": "Assigned and st }, offset: { type: 'number', description: 'Pagination offset' }, fields: { type: 'json', description: 'Fields object or JSON string' }, + readFields: { + type: 'string', + description: 'Comma-separated fields to return (Read Records)', + }, displayValue: { type: 'string', description: 'Display value mode for reference fields' }, semanticDisplayValue: { type: 'string', diff --git a/apps/sim/blocks/blocks/splunk.test.ts b/apps/sim/blocks/blocks/splunk.test.ts index 1c9e003e31e..4a3d502195b 100644 --- a/apps/sim/blocks/blocks/splunk.test.ts +++ b/apps/sim/blocks/blocks/splunk.test.ts @@ -136,3 +136,97 @@ describe('SplunkBlock subBlocks', () => { expect([...optionIds].sort()).toEqual([...SplunkBlock.tools.access].sort()) }) }) + +describe('SplunkBlock subBlock placeholders', () => { + function subBlock(id: string) { + const found = SplunkBlock.subBlocks.find((block) => block.id === id) + if (!found) throw new Error(`SplunkBlock is missing the ${id} subBlock`) + return found + } + + function subBlocksFor(id: string, operation: string) { + return SplunkBlock.subBlocks.filter((block) => { + if (block.id !== id) return false + const value = block.condition?.value + return Array.isArray(value) ? value.includes(operation) : value === operation + }) + } + + /** + * `nobody` names the shared-application owner, so it is one specific owner + * rather than a neutral filler — and users copy placeholders. `-` is the + * documented wildcard for all users, which is what the namespace builder + * already substitutes. + */ + it('offers the - wildcard as the namespace owner, not nobody', () => { + expect(subBlock('owner').placeholder).toBe('-') + }) + + /** + * The old placeholder claimed a default of 100 for all five operations (the real + * default is 30 for the four collection endpoints) and advertised `0 returns + * all` — an unbounded read that Get Search Results now rejects outright. Because + * this block keeps subBlock ids unique, one field serves every operation, so it + * must not state a rule that holds for only some of them. + */ + it('does not advertise a wrong default or an unbounded read on Max Results', () => { + const shown = subBlocksFor('count', 'splunk_get_search_results') + expect(shown).toHaveLength(1) + + const placeholder = String(shown[0].placeholder) + expect(placeholder).not.toContain('100') + expect(placeholder).not.toMatch(/0 returns all/) + }) + + /** The per-operation detail the placeholder can no longer carry. */ + it('documents the differing defaults and the 0 rule on the count input', () => { + const description = String(SplunkBlock.inputs.count.description) + + expect(description).toContain('30') + expect(description).toContain('100') + expect(description).toMatch(/reject/i) + }) +}) + +describe('SplunkBlock numeric coercion', () => { + /** + * A bare `Number()` sent `NaN` for an unparseable value, which serializes as the + * literal `NaN` and makes Splunk reject the request with an error that names the + * field but not the cause. Omitting it lets Splunk apply its own default. + */ + it.each(['abc', 'twenty', '12px'])('omits an unparseable Max Results (%s)', (count) => { + const merged = mergedInputs({ operation: 'splunk_list_indexes', count }) + + expect(merged.count).not.toBe(Number.NaN) + expect(mapParams({ operation: 'splunk_list_indexes', count })).not.toHaveProperty('count') + }) + + it('omits an unparseable value on every numeric field it maps', () => { + const result = mapParams({ + operation: 'splunk_dispatch_saved_search', + savedSearchName: 'Errors', + dispatchMaxCount: 'abc', + dispatchMaxTime: 'abc', + dispatchTtl: 'abc', + offset: 'abc', + }) + + expect(result).not.toHaveProperty('dispatchMaxCount') + expect(result).not.toHaveProperty('dispatchMaxTime') + expect(result).not.toHaveProperty('dispatchTtl') + expect(result).not.toHaveProperty('offset') + }) + + it('still coerces the numeric forms it is given', () => { + expect( + mapParams({ operation: 'splunk_create_search_job', autoCancel: '300', maxCount: 5000 }) + ).toMatchObject({ autoCancel: 300, maxCount: 5000 }) + }) +}) + +describe('SplunkBlock outputs', () => { + it('declares the paging total and offset the list tools now project', () => { + expect(SplunkBlock.outputs).toHaveProperty('total') + expect(SplunkBlock.outputs).toHaveProperty('offset') + }) +}) diff --git a/apps/sim/blocks/blocks/splunk.ts b/apps/sim/blocks/blocks/splunk.ts index c2e25ee18a3..689fce7e504 100644 --- a/apps/sim/blocks/blocks/splunk.ts +++ b/apps/sim/blocks/blocks/splunk.ts @@ -16,6 +16,26 @@ function toSplunkToggle(value: unknown): boolean | undefined { return value !== 'false' && value !== '0' } +/** + * Assign a numeric Splunk field, dropping anything that is not a finite number. + * + * A bare `Number()` turns a typo like `abc` into `NaN`, which serializes into the + * query string or form body as the literal `NaN` — Splunk then rejects the whole + * request with an error that names the field but not the cause. Omitting the field + * instead lets Splunk apply its own documented default, which is what an unusable + * value should fall back to. + * + * An untouched subBlock resolves to `null` and an empty one to `''`; both are + * omissions rather than zeros, so neither may reach `Number()` (which reads both + * as `0`). + */ +function assignSplunkNumber(target: Record, key: string, value: unknown): void { + if (value == null || value === '') return + const parsed = Number(value) + if (!Number.isFinite(parsed)) return + target[key] = parsed +} + export const SplunkBlock: BlockConfig = { type: 'splunk', name: 'Splunk', @@ -133,7 +153,7 @@ export const SplunkBlock: BlockConfig = { id: 'owner', title: 'Namespace Owner', type: 'short-input', - placeholder: 'nobody', + placeholder: '-', mode: 'advanced', }, { @@ -405,11 +425,20 @@ Examples: condition: { field: 'operation', value: 'splunk_list_indexes' }, }, + /** + * One Max Results field serves five operations whose defaults differ (30 for + * the four collection endpoints, 100 for search results) and whose handling of + * `count=0` differs too — the collections read it as "every entry", while + * search results reject it because nothing downstream bounds that read. This + * block keeps subBlock ids unique, so rather than state one group's rule as if + * it were shared, the placeholder states neither and the per-operation detail + * lives in the `count` input description. + */ { id: 'count', title: 'Max Results', type: 'short-input', - placeholder: '100 (0 returns all)', + placeholder: 'Leave empty for the Splunk default', condition: { field: 'operation', value: [ @@ -460,17 +489,17 @@ Examples: params: (params) => { const result: Record = {} - if (params.count != null && params.count !== '') result.count = Number(params.count) - if (params.offset != null && params.offset !== '') result.offset = Number(params.offset) + assignSplunkNumber(result, 'count', params.count) + assignSplunkNumber(result, 'offset', params.offset) switch (params.operation) { case 'splunk_run_search': - if (params.autoCancel) result.autoCancel = Number(params.autoCancel) - if (params.maxCount) result.maxCount = Number(params.maxCount) + assignSplunkNumber(result, 'autoCancel', params.autoCancel) + assignSplunkNumber(result, 'maxCount', params.maxCount) break case 'splunk_create_search_job': - if (params.autoCancel) result.autoCancel = Number(params.autoCancel) - if (params.maxCount) result.maxCount = Number(params.maxCount) + assignSplunkNumber(result, 'autoCancel', params.autoCancel) + assignSplunkNumber(result, 'maxCount', params.maxCount) result.enableLookups = toSplunkToggle(params.enableLookups) result.allowPartialResults = toSplunkToggle(params.allowPartialResults) break @@ -485,9 +514,9 @@ Examples: result.name = params.savedSearchName result.triggerActions = toSplunkToggle(params.triggerActions) result.forceDispatch = toSplunkToggle(params.forceDispatch) - if (params.dispatchMaxCount) result.dispatchMaxCount = Number(params.dispatchMaxCount) - if (params.dispatchMaxTime) result.dispatchMaxTime = Number(params.dispatchMaxTime) - if (params.dispatchTtl) result.dispatchTtl = Number(params.dispatchTtl) + assignSplunkNumber(result, 'dispatchMaxCount', params.dispatchMaxCount) + assignSplunkNumber(result, 'dispatchMaxTime', params.dispatchMaxTime) + assignSplunkNumber(result, 'dispatchTtl', params.dispatchTtl) break case 'splunk_get_fired_alerts': result.name = params.alertName @@ -552,7 +581,11 @@ Examples: description: 'Whether to dispatch even when the saved search is already running', }, datatype: { type: 'string', description: 'Index type filter: all, event, or metric' }, - count: { type: 'number', description: 'Maximum number of entries to return' }, + count: { + type: 'number', + description: + 'Maximum number of entries to return. The Splunk default is 30 for the collection endpoints and 100 for search results. The collection endpoints read 0 as "return every entry"; search results reject it, since a completed job can hold hundreds of thousands of rows.', + }, offset: { type: 'number', description: 'Index of the first entry to return' }, }, @@ -633,6 +666,15 @@ Examples: type: 'json', description: 'Apps installed on the instance (name, label, version, author, disabled)', }, + total: { + type: 'number', + description: + 'Total number of entries matching a list request, from the response paging envelope. Compare with offset to decide whether another page remains.', + }, + offset: { + type: 'number', + description: 'Offset of the first entry in the returned page, from the paging envelope', + }, }, } diff --git a/apps/sim/lib/api/contracts/tools/crowdstrike.ts b/apps/sim/lib/api/contracts/tools/crowdstrike.ts index 2094bedd327..3a9a295d42d 100644 --- a/apps/sim/lib/api/contracts/tools/crowdstrike.ts +++ b/apps/sim/lib/api/contracts/tools/crowdstrike.ts @@ -746,7 +746,10 @@ const HOST_GROUP_ACTIONS = ['add-hosts', 'remove-hosts'] as const * and it accepts only these base commands. Subcommands ride in `command_string` * (`eventlog view ...`, `reg query ...`), never in `base_command`; the write-tier * variants such as `eventlog backup` belong to `/entities/active-responder-command/v1` - * and would fail here on scope. + * and would fail here on scope. `reg` is read-tier only as `reg query` — `reg set` + * and `reg delete` are Active Responder commands on that same write-tier endpoint. + * `ifconfig` and `users` are the macOS/Linux counterparts to `ipconfig` and are + * read-tier on this endpoint. */ export const RTR_READ_ONLY_BASE_COMMANDS = [ 'cat', @@ -759,12 +762,14 @@ export const RTR_READ_ONLY_BASE_COMMANDS = [ 'getsid', 'help', 'history', + 'ifconfig', 'ipconfig', 'ls', 'mount', 'netstat', 'ps', 'reg', + 'users', ] as const const performHostGroupActionSchema = baseRequestSchema.extend({ @@ -814,10 +819,10 @@ const getIndicatorDetailsSchema = baseRequestSchema.extend({ * constrained here. Unknown keys pass through so newly documented IOC fields keep * working without a contract change. * - * This guards blanks only. CrowdStrike separately documents that *omitting* a - * field on PATCH also overwrites it with a blank value, and no schema can detect - * an absent key — that hazard is carried in the `crowdstrike_update_indicators` - * tool and parameter descriptions instead. + * This guards blanks only. Omitted fields have also been observed to come back + * cleared after a PATCH — CrowdStrike publishes no statement either way — and no + * schema can detect an absent key, so that hazard is carried in the + * `crowdstrike_update_indicators` tool and parameter descriptions instead. */ const indicatorPayloadSchema = z .object({ @@ -878,7 +883,10 @@ const createIndicatorsSchema = baseRequestSchema.extend({ indicators: z .array(createIndicatorPayloadSchema) .min(1, 'At least one indicator is required') - .max(200, 'CrowdStrike accepts at most 200 indicators per request'), + .max( + 200, + 'Sim caps this request at 200 indicators; CrowdStrike publishes no limit for this endpoint' + ), comment: nonBlankQuerySchema('Comment'), retrodetects: z.boolean().optional(), ignoreWarnings: z.boolean().optional(), @@ -889,7 +897,10 @@ const updateIndicatorsSchema = baseRequestSchema.extend({ indicators: z .array(updateIndicatorPayloadSchema) .min(1, 'At least one indicator is required') - .max(200, 'CrowdStrike accepts at most 200 indicators per request'), + .max( + 200, + 'Sim caps this request at 200 indicators; CrowdStrike publishes no limit for this endpoint' + ), comment: nonBlankQuerySchema('Comment'), retrodetects: z.boolean().optional(), ignoreWarnings: z.boolean().optional(), diff --git a/apps/sim/lib/integrations/integrations.json b/apps/sim/lib/integrations/integrations.json index b1ddd145c68..df98e42145b 100644 --- a/apps/sim/lib/integrations/integrations.json +++ b/apps/sim/lib/integrations/integrations.json @@ -4801,7 +4801,7 @@ "operations": [ { "name": "Query Alerts", - "description": "Search CrowdStrike Falcon alerts with a Falcon Query Language filter and return their composite IDs. Uses the current Alerts API (GET /alerts/queries/alerts/v2), which supersedes the deprecated Detects API. Requires the \"Alerts: Read\" API scope." + "description": "Search CrowdStrike Falcon alerts with a Falcon Query Language filter and return their composite IDs. Uses the current Alerts API (GET /alerts/queries/alerts/v2), which replaced the Detects API decommissioned on September 30, 2025. Requires the \"Alerts: Read\" API scope." }, { "name": "Get Alert Details", @@ -4841,7 +4841,7 @@ }, { "name": "Update Indicators", - "description": "Update custom CrowdStrike Falcon indicators of compromise by ID (PATCH /iocs/entities/indicators/v1). DESTRUCTIVE: CrowdStrike blanks out any field you omit, so read each indicator with crowdstrike_get_indicator_details first and resend its full field set with your edits applied. Changing action or scope changes prevention behavior fleet-wide. type and value are immutable. Requires the \"IOC Management: Write\" API scope." + "description": "Update custom CrowdStrike Falcon indicators of compromise by ID (PATCH /iocs/entities/indicators/v1). DESTRUCTIVE: omitted fields may be cleared, so read each indicator with crowdstrike_get_indicator_details first and resend its full field set with your edits applied. Changing action or scope changes prevention behavior fleet-wide. type and value are immutable. Requires the \"IOC Management: Write\" API scope." }, { "name": "Delete Indicators", @@ -4861,7 +4861,7 @@ }, { "name": "Execute RTR Command", - "description": "Run a read-only Real Time Response command in an open CrowdStrike Falcon session (POST /real-time-response/entities/command/v1). baseCommand names the family only (cat, cd, clear, csrutil, env, eventlog, filehash, getsid, help, history, ipconfig, ls, mount, netstat, ps, reg); subcommands go in commandString. Host-modifying commands need the Active Responder or Admin endpoints. Requires the \"Real time response: Read\" API scope." + "description": "Run a read-only Real Time Response command in an open CrowdStrike Falcon session (POST /real-time-response/entities/command/v1). baseCommand names the family only (cat, cd, clear, csrutil, env, eventlog, filehash, getsid, help, history, ifconfig, ipconfig, ls, mount, netstat, ps, reg, users); subcommands go in commandString. Host-modifying commands need the Active Responder or Admin endpoints. Requires the \"Real time response: Read\" API scope." }, { "name": "Get RTR Command Status", diff --git a/apps/sim/lib/oauth/oauth.ts b/apps/sim/lib/oauth/oauth.ts index 288d16e6a39..e8f43754cf9 100644 --- a/apps/sim/lib/oauth/oauth.ts +++ b/apps/sim/lib/oauth/oauth.ts @@ -334,7 +334,6 @@ export const OAUTH_PROVIDERS: Record = { 'openid', 'profile', 'email', - 'User.Read.All', 'User.ReadWrite.All', 'Group.ReadWrite.All', 'GroupMember.ReadWrite.All', diff --git a/apps/sim/lib/oauth/utils.ts b/apps/sim/lib/oauth/utils.ts index 23466c14c14..055a45b3586 100644 --- a/apps/sim/lib/oauth/utils.ts +++ b/apps/sim/lib/oauth/utils.ts @@ -256,7 +256,6 @@ export const SCOPE_DESCRIPTIONS: Record = { 'Sites.ReadWrite.All': 'Read and write Sharepoint sites', 'Sites.Manage.All': 'Manage Sharepoint sites', 'https://dynamics.microsoft.com/user_impersonation': 'Access Microsoft Dataverse on your behalf', - 'User.Read.All': 'Read all user profiles', 'User.ReadWrite.All': 'Read and write all user profiles', 'GroupMember.ReadWrite.All': 'Read and write all group memberships', 'Directory.Read.All': 'Read directory data', diff --git a/apps/sim/lib/workflows/migrations/subblock-migrations.test.ts b/apps/sim/lib/workflows/migrations/subblock-migrations.test.ts index 923a6d4976b..2241e189fba 100644 --- a/apps/sim/lib/workflows/migrations/subblock-migrations.test.ts +++ b/apps/sim/lib/workflows/migrations/subblock-migrations.test.ts @@ -423,6 +423,71 @@ describe('migrateSubblockIds', () => { expect(blocks.b3.subBlocks.code).toBeDefined() }) + /** + * The suffixed Cloudflare read-filter ids existed only between #6740 and the + * restore, and never shipped in a release. They are dropped rather than renamed + * onto `name`/`type`/`content`/`proxied`/`tags`, which every Cloudflare block + * already materializes — a rename would hit the collision guard and discard the + * value regardless, while leaving the stale key parked in state. + */ + describe('cloudflare block', () => { + it('drops the staging-only read-filter ids without disturbing the restored ids', () => { + const input: Record = { + b1: makeBlock({ + type: 'cloudflare', + subBlocks: { + operation: { id: 'operation', type: 'dropdown', value: 'list_dns_records' }, + zoneNameFilter: { id: 'zoneNameFilter', type: 'short-input', value: 'example.com' }, + dnsNameFilter: { id: 'dnsNameFilter', type: 'short-input', value: 'www' }, + dnsTypeFilter: { id: 'dnsTypeFilter', type: 'dropdown', value: 'A' }, + dnsContentFilter: { id: 'dnsContentFilter', type: 'short-input', value: '1.2.3.4' }, + dnsProxiedFilter: { id: 'dnsProxiedFilter', type: 'dropdown', value: 'true' }, + purgeTags: { id: 'purgeTags', type: 'short-input', value: 'tag-a' }, + cursor: { id: 'cursor', type: 'short-input', value: 'abc' }, + name: { id: 'name', type: 'short-input', value: '' }, + }, + }), + } + + const { blocks, migrated } = migrateSubblockIds(input) + + expect(migrated).toBe(true) + for (const legacyId of [ + 'zoneNameFilter', + 'dnsNameFilter', + 'dnsTypeFilter', + 'dnsContentFilter', + 'dnsProxiedFilter', + 'purgeTags', + 'cursor', + ]) { + expect(blocks.b1.subBlocks[legacyId]).toBeUndefined() + expect(blocks.b1.subBlocks[`_removed_${legacyId}`]).toBeUndefined() + } + expect(blocks.b1.subBlocks.operation.value).toBe('list_dns_records') + expect(blocks.b1.subBlocks.name.value).toBe('') + }) + + it('leaves a workflow saved on the restored ids untouched', () => { + const input: Record = { + b1: makeBlock({ + type: 'cloudflare', + subBlocks: { + operation: { id: 'operation', type: 'dropdown', value: 'list_dns_records' }, + name: { id: 'name', type: 'short-input', value: 'www' }, + type: { id: 'type', type: 'dropdown', value: 'A' }, + }, + }), + } + + const { blocks, migrated } = migrateSubblockIds(input) + + expect(migrated).toBe(false) + expect(blocks.b1.subBlocks.name.value).toBe('www') + expect(blocks.b1.subBlocks.type.value).toBe('A') + }) + }) + it('should handle blocks with empty subBlocks', () => { const input: Record = { b1: makeBlock({ type: 'knowledge', subBlocks: {} }), diff --git a/apps/sim/lib/workflows/migrations/subblock-migrations.ts b/apps/sim/lib/workflows/migrations/subblock-migrations.ts index b5de686bd89..fb2cb8e7661 100644 --- a/apps/sim/lib/workflows/migrations/subblock-migrations.ts +++ b/apps/sim/lib/workflows/migrations/subblock-migrations.ts @@ -114,6 +114,35 @@ export const SUBBLOCK_ID_MIGRATIONS: Record> = { host: '_removed_host', apiKey: '_removed_apiKey', }, + /** + * The Cloudflare block briefly gave its DNS/zone read filters and its cache-purge + * tag list operation-suffixed IDs, and added a single shared `cursor`. This PR + * restores the shipped IDs (`name`, `type`, `content`, `proxied`, `tags`) so saved + * workflows keep filtering, and splits the cursor per endpoint. + * + * The suffixed IDs are dropped rather than renamed onto their shipped + * counterparts. They existed only between #6740 and this change and never + * appeared in a release, so no deployed workflow carries them — and a rename + * could not restore a value even for a workflow edited in that window. Block + * state materializes an entry for every subblock the config declares, not just + * the active operation's, so `name`/`type`/`content`/`proxied`/`tags` are always + * already present; {@link migrateBlockSubblockIds} would hit its collision guard + * and discard the source value anyway. Mapping them as renames would therefore + * claim a recovery that never happens, while leaving the stale value parked in + * state and riding along in exports. + * + * `cursor` split into `r2Cursor` and `rulesetCursor`, so there is no single + * replacement to name. + */ + cloudflare: { + zoneNameFilter: '_removed_zoneNameFilter', + dnsNameFilter: '_removed_dnsNameFilter', + dnsTypeFilter: '_removed_dnsTypeFilter', + dnsContentFilter: '_removed_dnsContentFilter', + dnsProxiedFilter: '_removed_dnsProxiedFilter', + purgeTags: '_removed_purgeTags', + cursor: '_removed_cursor', + }, rippling: { action: '_removed_action', candidateDepartment: '_removed_candidateDepartment', diff --git a/apps/sim/tools/cloudflare/cloudflare.test.ts b/apps/sim/tools/cloudflare/cloudflare.test.ts index e3e31b14fc7..04c740078d5 100644 --- a/apps/sim/tools/cloudflare/cloudflare.test.ts +++ b/apps/sim/tools/cloudflare/cloudflare.test.ts @@ -151,28 +151,31 @@ describe('subBlock ids that share a tool param keep their own default', () => { const mapped = mapFor('create_dns_record', { zoneId: 'zone1' }) for (const alias of [ + 'zoneType', 'recordType', 'recordProxied', + 'recordTags', + 'updateRecordType', + 'updateRecordName', + 'updateRecordContent', + 'updateRecordProxied', + 'updateRecordTags', + 'dnsOrder', 'certificateStatus', - 'appType', - 'updateAppType', - 'updatePolicyDecision', + 'rulesetName', + 'updateRuleEnabled', 'rateLimitAction', 'updateRateLimitAction', - 'rulesetName', - 'zoneNameFilter', - 'zoneType', - 'dnsTypeFilter', - 'dnsNameFilter', - 'dnsContentFilter', - 'dnsOrder', - 'dnsProxiedFilter', - 'purgeTags', - 'workerTagFilter', + 'appType', + 'updateAppType', 'accessAppTags', + 'updatePolicyDecision', 'listNameFilter', 'accessAppDomainFilter', + 'workerTagFilter', 'tunnelStatus', + 'r2Cursor', + 'rulesetCursor', ]) { expect(mapped[alias], `alias ${alias} reached the tool`).toBeUndefined() } @@ -222,6 +225,15 @@ describe('a shared subBlock id means the same thing everywhere', () => { 'rulesetId', ]) + /** + * Ids a read filter and a written value share on purpose. Both sides render a + * control the user can see and edit for their own operation, so a carried-over + * value is visible rather than hidden — and these are the ids shipped + * workflows already store, which a rename would strand (see + * `the ids shipped workflows already store are still live`). + */ + const SHARED_VISIBLE_IDS = new Set(['name', 'content']) + const WRITE_PREFIXES = ['create_', 'update_', 'delete_', 'purge_', 'revoke_'] function operationsFor(subBlock: (typeof CloudflareBlock.subBlocks)[number]): string[] { @@ -236,7 +248,7 @@ describe('a shared subBlock id means the same thing everywhere', () => { const kindsById = new Map>() for (const subBlock of CloudflareBlock.subBlocks) { - if (ADDRESSING_IDS.has(subBlock.id)) continue + if (ADDRESSING_IDS.has(subBlock.id) || SHARED_VISIBLE_IDS.has(subBlock.id)) continue for (const operation of operationsFor(subBlock)) { const kind = WRITE_PREFIXES.some((prefix) => operation.startsWith(prefix)) ? 'write' @@ -330,3 +342,291 @@ describe('no hidden advanced control feeds an operation that cannot show it', () expect(leaks).toEqual([]) }) }) + +/** + * Block state is never migrated, and `extractBlockParams` (`serializer/index.ts`) + * drops a stored value whose id matches no subBlock config — for a non-custom + * block that is a deleted input. So renaming a control strands whatever shipped + * workflows stored under the old id, and no mapper-level fallback can recover + * it: the value is gone before `tools.config.params` runs. + * + * That decides which side of an id collision may be renamed. A read filter that + * loses its value returns the whole zone with `success: true` — which a + * downstream `delete_dns_record` then fans out over — so filters keep the ids + * shipped workflows already hold. A write control that loses its value just + * omits the field from a PATCH, so the new id goes there. + */ +describe('the ids shipped workflows already store are still live', () => { + function operationsFor(id: string): string[] { + return CloudflareBlock.subBlocks.flatMap((subBlock) => { + if (subBlock.id !== id) return [] + const condition = subBlock.condition + if (!condition || typeof condition !== 'object' || !('field' in condition)) return [] + if (condition.field !== 'operation') return [] + const value = condition.value + return Array.isArray(value) ? value.map(String) : [String(value)] + }) + } + + it.each([ + ['list_dns_records', 'type'], + ['list_dns_records', 'name'], + ['list_dns_records', 'content'], + ['list_dns_records', 'proxied'], + ['list_dns_records', 'search'], + ['list_zones', 'name'], + ['list_zones', 'status'], + ['purge_cache', 'tags'], + ])('%s still reads its %s filter from the id it shipped with', (operation, id) => { + expect(operationsFor(id)).toContain(operation) + }) + + it('still passes each of those filters through to the tool', () => { + const records = mapFor('list_dns_records', { + zoneId: 'zone1', + type: 'A', + name: 'www.example.com', + content: '203.0.113.10', + proxied: 'true', + search: 'legacy', + }) + expect(records.type).toBe('A') + expect(records.name).toBe('www.example.com') + expect(records.content).toBe('203.0.113.10') + expect(records.proxied).toBe(true) + expect(records.search).toBe('legacy') + + expect(mapFor('list_zones', { name: 'example.com', status: 'active' })).toMatchObject({ + name: 'example.com', + status: 'active', + }) + expect(mapFor('purge_cache', { zoneId: 'z1', tags: 'a,b' }).tags).toBe('a,b') + }) +}) + +describe('the rule enable switch is split between creating and updating', () => { + it('never carries a create-time enabled onto a rule update', () => { + // `enabled` is advanced, so it serializes on stored value alone, before its + // condition runs. Shared, a `false` chosen while drafting a new rule would + // disable a live WAF or rate limiting rule on a later update. + for (const operation of ['update_ruleset_rule', 'update_rate_limit_rule']) { + const mapped = mapFor(operation, { + zoneId: 'z1', + rulesetId: 'rs1', + ruleId: 'r1', + enabled: 'false', + }) + expect(mapped.enabled, `${operation} took a create-time enabled`).toBeUndefined() + } + }) + + it('sends the update control when the caller sets it', () => { + expect( + mapFor('update_ruleset_rule', { + zoneId: 'z1', + rulesetId: 'rs1', + ruleId: 'r1', + updateRuleEnabled: 'false', + }).enabled + ).toBe(false) + }) + + it('still sends the create control on the create operations', () => { + expect( + mapFor('create_ruleset_rule', { zoneId: 'z1', rulesetId: 'rs1', enabled: 'false' }).enabled + ).toBe(false) + }) +}) + +describe('a DNS record rename cannot be inherited from another operation', () => { + it('ignores a name typed under any other operation', () => { + // `name` is shared by zone, Access application, policy, and service token + // creation. The update control is advanced, so a shared id let any of those + // reach the PATCH and rename the live record. + expect( + mapFor('update_dns_record', { zoneId: 'z1', recordId: 'rec1', name: 'ci-pipeline' }).name + ).toBeUndefined() + }) + + it('renames only when the record-name control is set', () => { + expect( + mapFor('update_dns_record', { + zoneId: 'z1', + recordId: 'rec1', + updateRecordName: 'www.example.com', + }).name + ).toBe('www.example.com') + }) +}) + +describe('Access application types the API can actually build', () => { + const appTypeOptions = (id: string) => { + const subBlock = CloudflareBlock.subBlocks.find((sub) => sub.id === id) + const options = subBlock?.options + return (Array.isArray(options) ? options : []).map((option) => + typeof option === 'string' ? option : ((option as { id?: string }).id ?? '') + ) + } + + it('drops dash_sso, which has no request variant at all', () => { + expect(appTypeOptions('appType')).not.toContain('dash_sso') + expect(appTypeOptions('updateAppType')).not.toContain('dash_sso') + }) + + it('requires a domain exactly for the types whose request schema demands one', () => { + const domain = CloudflareBlock.subBlocks.find((sub) => sub.id === 'domain') + const required = domain?.required + expect(typeof required).toBe('function') + const resolve = required as (values?: Record) => { + field: string + value: string | number | boolean | Array + } + + const onCreate = resolve({ operation: 'create_access_application' }) + expect(onCreate.field).toBe('appType') + expect(onCreate.value).toEqual(['self_hosted', 'ssh', 'vnc', 'rdp']) + + const onUpdate = resolve({ operation: 'update_access_application' }) + expect(onUpdate.field).toBe('updateAppType') + expect(onUpdate.value).toEqual(['self_hosted', 'ssh', 'vnc', 'rdp']) + }) + + it('carries the fields saas, infrastructure, and rdp applications cannot be created without', () => { + for (const tool of [ + cloudflareTools.cloudflareCreateAccessApplicationTool, + cloudflareTools.cloudflareUpdateAccessApplicationTool, + ]) { + const body = tool.request.body?.({ + accountId: 'acct1', + appId: 'app1', + apiKey, + type: 'saas', + saasApp: '{"auth_type":"saml"}', + targetCriteria: '[{"port":22,"protocol":"SSH"}]', + } as never) as Record + + expect(body.saas_app).toEqual({ auth_type: 'saml' }) + expect(body.target_criteria).toEqual([{ port: 22, protocol: 'SSH' }]) + } + }) +}) + +describe('the ruleset kind offered matches the endpoint', () => { + it('does not offer root, which only exists at the account level', () => { + const kind = CloudflareBlock.subBlocks.find((sub) => sub.id === 'kind') + const options = (Array.isArray(kind?.options) ? kind.options : []).map( + (option) => (option as { id?: string }).id ?? '' + ) + + expect(options).not.toContain('root') + expect(options).toContain('zone') + }) +}) + +describe('an update that would tear down the rule it edits is refused', () => { + const updateRule = cloudflareTools.cloudflareUpdateRulesetRuleTool + + it('refuses an execute rule with no action parameters', () => { + // PATCH replaces the rule, so omitting action_parameters resets it to {} and + // unbinds the managed ruleset the rule deploys, plus every override under it. + expect(() => + updateRule.request.body?.({ + zoneId: 'z1', + rulesetId: 'rs1', + ruleId: 'r1', + apiKey, + action: 'execute', + expression: 'true', + } as never) + ).toThrow(/Action Parameters is required/) + }) + + /** + * An explicit `{}` is the same payload Cloudflare's schema default produces, so + * it does the same damage as omitting the field. Checking presence rather than + * emptiness let it through the guard. + */ + it('refuses an execute rule whose action parameters are an empty object', () => { + expect(() => + updateRule.request.body?.({ + zoneId: 'z1', + rulesetId: 'rs1', + ruleId: 'r1', + apiKey, + action: 'execute', + expression: 'true', + actionParameters: '{}', + } as never) + ).toThrow(/Action Parameters is required/) + }) + + it('leaves an empty action parameters object alone on a non-execute action', () => { + const body = updateRule.request.body?.({ + zoneId: 'z1', + rulesetId: 'rs1', + ruleId: 'r1', + apiKey, + action: 'block', + expression: 'true', + actionParameters: '{}', + } as never) as Record + + expect(body.action_parameters).toEqual({}) + }) + + it('accepts an execute rule that resends its action parameters', () => { + const body = updateRule.request.body?.({ + zoneId: 'z1', + rulesetId: 'rs1', + ruleId: 'r1', + apiKey, + action: 'execute', + expression: 'true', + actionParameters: '{"id":"managed-1"}', + } as never) as Record + + expect(body.action_parameters).toEqual({ id: 'managed-1' }) + }) + + it('leaves non-execute actions alone', () => { + expect(() => + updateRule.request.body?.({ + zoneId: 'z1', + rulesetId: 'rs1', + ruleId: 'r1', + apiKey, + action: 'block', + expression: 'true', + } as never) + ).not.toThrow() + }) + + it('warns in both descriptions that omission resets the field', () => { + expect(updateRule.params.actionParameters.description).toMatch(/resets action_parameters/) + expect(updateRule.params.ref.description).toMatch(/omitting it resets/) + }) + + it('requires action parameters in the block whenever the action is execute', () => { + const actionParameters = CloudflareBlock.subBlocks.find((sub) => sub.id === 'actionParameters') + expect(actionParameters?.required).toEqual({ field: 'action', value: 'execute' }) + }) +}) + +describe('optional and per-API pagination params', () => { + it('does not force a metrics list the DNS analytics API treats as optional', () => { + expect(cloudflareTools.cloudflareDnsAnalyticsTool.params.metrics.required).toBe(false) + }) + + it('keeps the R2 and ruleset cursors apart', () => { + // R2 answers with result_info.cursor and the Rulesets API with + // result_info.cursors.after, so a cursor carried across the two 400s. + expect( + mapFor('list_r2_buckets', { accountId: 'a1', rulesetCursor: 'ruleset-1' }).cursor + ).toBeUndefined() + expect(mapFor('list_rulesets', { zoneId: 'z1', r2Cursor: 'r2-1' }).cursor).toBeUndefined() + expect(mapFor('list_r2_buckets', { accountId: 'a1', r2Cursor: 'r2-1' }).cursor).toBe('r2-1') + expect(mapFor('list_rulesets', { zoneId: 'z1', rulesetCursor: 'ruleset-1' }).cursor).toBe( + 'ruleset-1' + ) + }) +}) diff --git a/apps/sim/tools/cloudflare/create_access_application.ts b/apps/sim/tools/cloudflare/create_access_application.ts index 0fd9a1e91aa..77550d13061 100644 --- a/apps/sim/tools/cloudflare/create_access_application.ts +++ b/apps/sim/tools/cloudflare/create_access_application.ts @@ -9,6 +9,7 @@ import { mapAccessApplication, parseCsvParam, parseJsonArrayParam, + parseJsonObjectParam, } from '@/tools/cloudflare/utils' import type { ToolConfig } from '@/tools/types' @@ -34,14 +35,14 @@ export const createAccessApplicationTool: ToolConfig< required: true, visibility: 'user-or-llm', description: - 'Application type: self_hosted, saas, ssh, vnc, app_launcher, warp, biso, bookmark, dash_sso, infrastructure, rdp, mcp, mcp_portal, or proxy_endpoint', + 'Application type: self_hosted, saas, ssh, vnc, app_launcher, warp, biso, bookmark, infrastructure, rdp, mcp, mcp_portal, or proxy_endpoint. dash_sso has no request variant and cannot be created through the API', }, domain: { type: 'string', required: false, visibility: 'user-or-llm', description: - 'The primary hostname and path secured by Access, e.g. internal.example.com or example.com/admin. Required for the self_hosted, ssh, vnc, rdp, and bookmark types; the saas, app_launcher, warp, biso, dash_sso, infrastructure, mcp, mcp_portal, and proxy_endpoint types do not accept it', + 'The primary hostname and path secured by Access, e.g. internal.example.com or example.com/admin. Required for the self_hosted, ssh, vnc, and rdp types; optional for bookmark and mcp_portal; read-only for app_launcher, warp, biso, and proxy_endpoint; and absent from the saas, infrastructure, and mcp variants', }, name: { type: 'string', @@ -105,6 +106,20 @@ export const createAccessApplicationTool: ToolConfig< description: 'JSON array of policies to attach. Entries may be reusable policy IDs or inline policy objects, e.g. [""]', }, + saasApp: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'JSON SaaS configuration, required for the saas type and rejected on every other type. SAML, e.g. {"auth_type":"saml","consumer_service_url":"https://example.com/acs","sp_entity_id":"https://example.com"}; OIDC, e.g. {"auth_type":"oidc","client_id":"...","redirect_uris":["https://example.com/callback"]}', + }, + targetCriteria: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'JSON array of infrastructure target criteria, required for the infrastructure and rdp types and rejected on every other type, e.g. [{"port":22,"protocol":"SSH","target_attributes":{"hostname":["production"]}}]', + }, apiKey: { type: 'string', required: true, @@ -121,10 +136,11 @@ export const createAccessApplicationTool: ToolConfig< body: (params) => { const body: Record = { type: params.type } /** - * `domain` exists only on the self_hosted, ssh, vnc, rdp, and bookmark - * request variants; the saas, app_launcher, warp, biso, dash_sso, - * infrastructure, mcp, mcp_portal, and proxy_endpoint variants have no - * such field, so sending a blank one makes those app types unbuildable. + * `domain` is writable only on the self_hosted, ssh, vnc, rdp, bookmark, + * and mcp_portal request variants — required on the first four — read-only + * on app_launcher, warp, biso, and proxy_endpoint, and absent from saas, + * infrastructure, and mcp. Sending a blank one makes those types + * unbuildable, so it is only forwarded when set. */ if (params.domain) body.domain = params.domain if (params.name) body.name = params.name @@ -149,6 +165,12 @@ export const createAccessApplicationTool: ToolConfig< const policies = parseJsonArrayParam(params.policies, 'Policies') if (policies) body.policies = policies + const saasApp = parseJsonObjectParam(params.saasApp, 'SaaS Application') + if (saasApp) body.saas_app = saasApp + + const targetCriteria = parseJsonArrayParam(params.targetCriteria, 'Target Criteria') + if (targetCriteria) body.target_criteria = targetCriteria + return body }, }, diff --git a/apps/sim/tools/cloudflare/create_access_policy.ts b/apps/sim/tools/cloudflare/create_access_policy.ts index c307a191c01..6cb6d6db8ce 100644 --- a/apps/sim/tools/cloudflare/create_access_policy.ts +++ b/apps/sim/tools/cloudflare/create_access_policy.ts @@ -77,7 +77,8 @@ export const createAccessPolicyTool: ToolConfig< type: 'string', required: false, visibility: 'user-or-llm', - description: 'How long a session granted by this policy stays valid, e.g. 24h', + description: + 'How long a session granted by this policy stays valid, e.g. 24h. Leave it unset on a policy attached to an infrastructure-typed application — Cloudflare rejects those with error 12130', }, approvalRequired: { type: 'boolean', diff --git a/apps/sim/tools/cloudflare/create_ruleset.ts b/apps/sim/tools/cloudflare/create_ruleset.ts index 89bd79a348a..0666c44b499 100644 --- a/apps/sim/tools/cloudflare/create_ruleset.ts +++ b/apps/sim/tools/cloudflare/create_ruleset.ts @@ -46,7 +46,7 @@ export const createRulesetTool: ToolConfig< required: false, visibility: 'user-or-llm', description: - 'Ruleset kind: zone, custom, managed, or root. Use zone to create a phase entry point ruleset. Defaults to zone', + 'Ruleset kind: zone or custom. Use zone to create a phase entry point ruleset and custom for a ruleset an execute rule deploys. Defaults to zone. "root" is the account-level phase entry point and "managed" is Cloudflare-owned, so neither can be created on this zone-scoped endpoint', }, description: { type: 'string', diff --git a/apps/sim/tools/cloudflare/dns_analytics.ts b/apps/sim/tools/cloudflare/dns_analytics.ts index 7b038aeed58..03eae69f8e3 100644 --- a/apps/sim/tools/cloudflare/dns_analytics.ts +++ b/apps/sim/tools/cloudflare/dns_analytics.ts @@ -38,10 +38,10 @@ export const dnsAnalyticsTool: ToolConfig< }, metrics: { type: 'string', - required: true, + required: false, visibility: 'user-or-llm', description: - 'Comma-separated metrics to retrieve (e.g., "queryCount,uncachedCount,staleCount,responseTimeAvg,responseTimeMedian,responseTime90th,responseTime99th")', + 'Comma-separated metrics to retrieve (e.g., "queryCount,uncachedCount,staleCount,responseTimeAvg,responseTimeMedian,responseTime90th,responseTime99th"). Optional — Cloudflare returns its default metric set when it is omitted', }, dimensions: { type: 'string', diff --git a/apps/sim/tools/cloudflare/types.ts b/apps/sim/tools/cloudflare/types.ts index cd5073fa547..fa827e17f9c 100644 --- a/apps/sim/tools/cloudflare/types.ts +++ b/apps/sim/tools/cloudflare/types.ts @@ -971,6 +971,8 @@ export interface CloudflareCreateAccessApplicationParams extends CloudflareBaseP logoUrl?: string tags?: string policies?: string + saasApp?: string + targetCriteria?: string } export interface CloudflareUpdateAccessApplicationParams diff --git a/apps/sim/tools/cloudflare/update_access_application.ts b/apps/sim/tools/cloudflare/update_access_application.ts index d314e9aeca1..8204a2eb317 100644 --- a/apps/sim/tools/cloudflare/update_access_application.ts +++ b/apps/sim/tools/cloudflare/update_access_application.ts @@ -9,6 +9,7 @@ import { mapAccessApplication, parseCsvParam, parseJsonArrayParam, + parseJsonObjectParam, } from '@/tools/cloudflare/utils' import type { ToolConfig } from '@/tools/types' @@ -40,14 +41,14 @@ export const updateAccessApplicationTool: ToolConfig< required: true, visibility: 'user-or-llm', description: - 'Application type: self_hosted, saas, ssh, vnc, app_launcher, warp, biso, bookmark, dash_sso, infrastructure, rdp, mcp, mcp_portal, or proxy_endpoint', + 'Application type: self_hosted, saas, ssh, vnc, app_launcher, warp, biso, bookmark, infrastructure, rdp, mcp, mcp_portal, or proxy_endpoint. dash_sso has no request variant and cannot be written through the API', }, domain: { type: 'string', required: false, visibility: 'user-or-llm', description: - 'The primary hostname and path secured by Access. Required for the self_hosted, ssh, vnc, rdp, and bookmark types; the saas, app_launcher, warp, biso, dash_sso, infrastructure, mcp, mcp_portal, and proxy_endpoint types do not accept it', + 'The primary hostname and path secured by Access. Required for the self_hosted, ssh, vnc, and rdp types; optional for bookmark and mcp_portal; read-only for app_launcher, warp, biso, and proxy_endpoint; and absent from the saas, infrastructure, and mcp variants', }, name: { type: 'string', @@ -103,6 +104,20 @@ export const updateAccessApplicationTool: ToolConfig< visibility: 'user-or-llm', description: 'Comma-separated tag names categorizing the application', }, + saasApp: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'JSON SaaS configuration, required for the saas type and rejected on every other type. SAML, e.g. {"auth_type":"saml","consumer_service_url":"https://example.com/acs","sp_entity_id":"https://example.com"}; OIDC, e.g. {"auth_type":"oidc","client_id":"...","redirect_uris":["https://example.com/callback"]}', + }, + targetCriteria: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'JSON array of infrastructure target criteria, required for the infrastructure and rdp types and rejected on every other type, e.g. [{"port":22,"protocol":"SSH","target_attributes":{"hostname":["production"]}}]', + }, policies: { type: 'string', required: false, @@ -126,10 +141,11 @@ export const updateAccessApplicationTool: ToolConfig< body: (params) => { const body: Record = { type: params.type } /** - * `domain` exists only on the self_hosted, ssh, vnc, rdp, and bookmark - * request variants; the saas, app_launcher, warp, biso, dash_sso, - * infrastructure, mcp, mcp_portal, and proxy_endpoint variants have no - * such field, so sending a blank one makes those app types unbuildable. + * `domain` is writable only on the self_hosted, ssh, vnc, rdp, bookmark, + * and mcp_portal request variants — required on the first four — read-only + * on app_launcher, warp, biso, and proxy_endpoint, and absent from saas, + * infrastructure, and mcp. Sending a blank one makes those types + * unbuildable, so it is only forwarded when set. */ if (params.domain) body.domain = params.domain if (params.name) body.name = params.name @@ -154,6 +170,12 @@ export const updateAccessApplicationTool: ToolConfig< const policies = parseJsonArrayParam(params.policies, 'Policies') if (policies) body.policies = policies + const saasApp = parseJsonObjectParam(params.saasApp, 'SaaS Application') + if (saasApp) body.saas_app = saasApp + + const targetCriteria = parseJsonArrayParam(params.targetCriteria, 'Target Criteria') + if (targetCriteria) body.target_criteria = targetCriteria + return body }, }, diff --git a/apps/sim/tools/cloudflare/update_access_policy.ts b/apps/sim/tools/cloudflare/update_access_policy.ts index 3cb47d20636..2c6b2357b38 100644 --- a/apps/sim/tools/cloudflare/update_access_policy.ts +++ b/apps/sim/tools/cloudflare/update_access_policy.ts @@ -82,7 +82,8 @@ export const updateAccessPolicyTool: ToolConfig< type: 'string', required: false, visibility: 'user-or-llm', - description: 'How long a session granted by this policy stays valid, e.g. 24h', + description: + 'How long a session granted by this policy stays valid, e.g. 24h. Leave it unset on a policy attached to an infrastructure-typed application — Cloudflare rejects those with error 12130', }, approvalRequired: { type: 'boolean', diff --git a/apps/sim/tools/cloudflare/update_ruleset_rule.ts b/apps/sim/tools/cloudflare/update_ruleset_rule.ts index f94113c008a..918dd7e557c 100644 --- a/apps/sim/tools/cloudflare/update_ruleset_rule.ts +++ b/apps/sim/tools/cloudflare/update_ruleset_rule.ts @@ -70,14 +70,15 @@ export const updateRulesetRuleTool: ToolConfig< type: 'string', required: false, visibility: 'user-or-llm', - description: 'Reference tag that stays stable across rule updates', + description: + 'Reference tag that stays stable across rule updates. Because the update replaces the rule, omitting it resets the tag to the rule ID and breaks anything matching on the old value', }, actionParameters: { type: 'string', required: false, visibility: 'user-or-llm', description: - 'JSON object of action-specific parameters, e.g. {"id":"","overrides":{"rules":[{"id":"","action":"log","enabled":true,"score_threshold":40}]}}', + 'JSON object of action-specific parameters, e.g. {"id":"","overrides":{"rules":[{"id":"","action":"log","enabled":true,"score_threshold":40}]}}. Required on an execute rule and must be sent on every update: the endpoint replaces the rule, so omitting it resets action_parameters to {} — which unbinds the managed ruleset the rule deploys and every override under it', }, ratelimit: { type: 'string', @@ -116,6 +117,19 @@ export const updateRulesetRuleTool: ToolConfig< if (params.ref) body.ref = params.ref const actionParameters = parseJsonObjectParam(params.actionParameters, 'Action Parameters') + /** + * PATCH replaces the rule, so action_parameters that is omitted falls back + * to the schema default of {}. On an execute rule that drops the managed + * ruleset ID, unbinding the WAF managed ruleset and every override under + * it. An explicit `{}` is the same payload by a different route and does + * the same damage, so emptiness is what is checked rather than presence. + * Refuse rather than silently tear the rule down. + */ + if (params.action === 'execute' && Object.keys(actionParameters ?? {}).length === 0) { + throw new Error( + 'Action Parameters is required when the action is "execute". This endpoint replaces the rule, so sending it empty or omitting it would reset action_parameters and unbind the managed ruleset. Read the rule with "Get Ruleset" and resend its action_parameters.' + ) + } if (actionParameters) body.action_parameters = actionParameters const ratelimit = parseJsonObjectParam(params.ratelimit, 'Rate Limiting Configuration') diff --git a/apps/sim/tools/crowdstrike/crowdstrike.test.ts b/apps/sim/tools/crowdstrike/crowdstrike.test.ts new file mode 100644 index 00000000000..de133bed54c --- /dev/null +++ b/apps/sim/tools/crowdstrike/crowdstrike.test.ts @@ -0,0 +1,194 @@ +/** + * @vitest-environment node + */ +import { describe, expect, it } from 'vitest' +import { crowdstrikeQueryBodySchema } from '@/lib/api/contracts/tools/crowdstrike' +import { CrowdStrikeBlock } from '@/blocks/blocks/crowdstrike' +import { crowdstrikeExecuteRtrCommandTool } from '@/tools/crowdstrike/execute_rtr_command' +import { crowdstrikeGetSensorAggregatesTool } from '@/tools/crowdstrike/get_sensor_aggregates' +import { crowdstrikeGetSensorDetailsTool } from '@/tools/crowdstrike/get_sensor_details' +import { crowdstrikeQueryAlertsTool } from '@/tools/crowdstrike/query_alerts' +import { crowdstrikeQuerySensorsTool } from '@/tools/crowdstrike/query_sensors' +import type { + CrowdStrikeGetSensorAggregatesResponse, + CrowdStrikeGetSensorDetailsResponse, + CrowdStrikeQuerySensorsResponse, +} from '@/tools/crowdstrike/types' +import { crowdstrikeUpdateIndicatorsTool } from '@/tools/crowdstrike/update_indicators' + +const credentials = { + clientId: 'client-id', + clientSecret: 'client-secret', + cloud: 'us-1' as const, +} + +function issueMessages(result: ReturnType) { + return result.success ? [] : result.error.issues.map((issue) => issue.message) +} + +describe('CrowdStrike indicator batch cap', () => { + const oversizedIndicators = { + crowdstrike_create_indicators: Array.from({ length: 201 }, (_, index) => ({ + type: 'sha256', + value: `value-${index}`, + applied_globally: true, + })), + crowdstrike_update_indicators: Array.from({ length: 201 }, (_, index) => ({ + id: `ioc-${index}`, + action: 'prevent', + })), + } as const + + it('attributes the 200-indicator cap to Sim rather than to CrowdStrike', () => { + for (const operation of [ + 'crowdstrike_create_indicators', + 'crowdstrike_update_indicators', + ] as const) { + const messages = issueMessages( + crowdstrikeQueryBodySchema.safeParse({ + ...credentials, + operation, + indicators: oversizedIndicators[operation], + }) + ) + + expect(messages).toContain( + 'Sim caps this request at 200 indicators; CrowdStrike publishes no limit for this endpoint' + ) + expect(messages.join('\n')).not.toMatch(/CrowdStrike accepts at most 200 indicators/) + } + }) +}) + +describe('CrowdStrike update-indicators guidance', () => { + it('states the omitted-field hazard as observed rather than as documented behavior', () => { + const { description } = crowdstrikeUpdateIndicatorsTool + expect(description).not.toMatch(/blanks out any field you omit/) + expect(description).toMatch(/omitted fields may be cleared/) + expect(description).toMatch(/resend its full field set/) + + const indicatorsParam = crowdstrikeUpdateIndicatorsTool.params.indicators + expect(indicatorsParam.description).not.toMatch(/blanks out any updatable field/) + expect(indicatorsParam.description).toMatch(/may be cleared/) + }) +}) + +describe('CrowdStrike alerts API lineage', () => { + it('calls the Detects API decommissioned, not deprecated', () => { + expect(crowdstrikeQueryAlertsTool.description).not.toMatch(/deprecated Detects API/) + expect(crowdstrikeQueryAlertsTool.description).toMatch(/decommissioned on September 30, 2025/) + }) +}) + +describe('CrowdStrike sensor outputs', () => { + it('declares pagination on every sensor-listing tool', () => { + expect(crowdstrikeQuerySensorsTool.outputs.pagination).toBeDefined() + expect(crowdstrikeGetSensorDetailsTool.outputs.pagination).toBeDefined() + }) + + it('declares errors on every sensor tool', () => { + expect(crowdstrikeQuerySensorsTool.outputs.errors).toBeDefined() + expect(crowdstrikeGetSensorDetailsTool.outputs.errors).toBeDefined() + expect(crowdstrikeGetSensorAggregatesTool.outputs.errors).toBeDefined() + }) + + /** + * The route emits `errors` on all three sensor envelopes and the contract requires + * it, so the response interfaces must carry it too. Interfaces are erased at + * runtime, so these literals are the check: dropping `errors` from any of the + * three makes them a compile error (TS2353) in the editor and in any `tsc` run + * that includes test files. `apps/sim/tsconfig.json` excludes test files, so + * `bun run type-check` alone will not catch it. + */ + it('types errors on every sensor response interface', () => { + const querySensors: CrowdStrikeQuerySensorsResponse['output'] = { + count: 0, + errors: [], + pagination: null, + sensors: [], + } + const sensorDetails: CrowdStrikeGetSensorDetailsResponse['output'] = { + count: 0, + errors: [], + pagination: null, + sensors: [], + } + const sensorAggregates: CrowdStrikeGetSensorAggregatesResponse['output'] = { + aggregates: [], + count: 0, + errors: [], + } + + expect(querySensors.errors).toEqual([]) + expect(sensorDetails.errors).toEqual([]) + expect(sensorAggregates.errors).toEqual([]) + }) +}) + +describe('CrowdStrike RTR read-only base commands', () => { + function parseBaseCommand(baseCommand: string) { + return crowdstrikeQueryBodySchema.safeParse({ + ...credentials, + operation: 'crowdstrike_execute_rtr_command', + sessionId: 'session-1', + baseCommand, + commandString: `${baseCommand} `, + }) + } + + it('accepts the non-Windows network and session triage commands', () => { + expect(parseBaseCommand('ifconfig').success).toBe(true) + expect(parseBaseCommand('users').success).toBe(true) + }) + + it('keeps the read-tier commands PSFalcon and Caracara document', () => { + for (const baseCommand of ['csrutil', 'reg', 'eventlog']) { + expect(parseBaseCommand(baseCommand).success).toBe(true) + } + }) + + it('still rejects a write-tier base command', () => { + expect(parseBaseCommand('rm').success).toBe(false) + }) + + it('documents that only reg query is read-tier', () => { + expect(crowdstrikeExecuteRtrCommandTool.params.baseCommand.description).toMatch( + /only reg query is read-tier/ + ) + }) + + it('offers ifconfig and users in the block dropdown', () => { + const baseCommandBlock = CrowdStrikeBlock.subBlocks.find((block) => block.id === 'baseCommand') + const optionIds = (baseCommandBlock?.options as { id: string }[] | undefined)?.map( + (option) => option.id + ) + expect(optionIds).toContain('ifconfig') + expect(optionIds).toContain('users') + }) +}) + +describe('CrowdStrike sort placeholders', () => { + it('shows the dot form for the collections that document it and the pipe form elsewhere', () => { + const sortBlocks = CrowdStrikeBlock.subBlocks.filter((block) => block.id === 'sort') + expect(sortBlocks).toHaveLength(2) + + for (const operation of ['crowdstrike_query_host_groups', 'crowdstrike_query_sensors']) { + const match = sortBlocks.find((block) => + (block.condition as { value: string[] }).value.includes(operation) + ) + expect(match?.placeholder).toBe('name.asc') + } + + for (const operation of [ + 'crowdstrike_query_alerts', + 'crowdstrike_query_indicators', + 'crowdstrike_query_vulnerabilities', + 'crowdstrike_query_cases', + ]) { + const match = sortBlocks.find((block) => + (block.condition as { value: string[] }).value.includes(operation) + ) + expect(match?.placeholder).toBe('created_timestamp|desc') + } + }) +}) diff --git a/apps/sim/tools/crowdstrike/execute_rtr_command.ts b/apps/sim/tools/crowdstrike/execute_rtr_command.ts index d50a890a2ac..45ce5745aa0 100644 --- a/apps/sim/tools/crowdstrike/execute_rtr_command.ts +++ b/apps/sim/tools/crowdstrike/execute_rtr_command.ts @@ -11,7 +11,7 @@ export const crowdstrikeExecuteRtrCommandTool: ToolConfig< id: 'crowdstrike_execute_rtr_command', name: 'CrowdStrike Execute RTR Command', description: - 'Run a read-only Real Time Response command in an open CrowdStrike Falcon session (POST /real-time-response/entities/command/v1). baseCommand names the family only (cat, cd, clear, csrutil, env, eventlog, filehash, getsid, help, history, ipconfig, ls, mount, netstat, ps, reg); subcommands go in commandString. Host-modifying commands need the Active Responder or Admin endpoints. Requires the "Real time response: Read" API scope.', + 'Run a read-only Real Time Response command in an open CrowdStrike Falcon session (POST /real-time-response/entities/command/v1). baseCommand names the family only (cat, cd, clear, csrutil, env, eventlog, filehash, getsid, help, history, ifconfig, ipconfig, ls, mount, netstat, ps, reg, users); subcommands go in commandString. Host-modifying commands need the Active Responder or Admin endpoints. Requires the "Real time response: Read" API scope.', version: '1.0.0', params: { @@ -44,7 +44,7 @@ export const crowdstrikeExecuteRtrCommandTool: ToolConfig< required: true, visibility: 'user-or-llm', description: - 'Read-only RTR base command family, one of: cat, cd, clear, csrutil, env, eventlog, filehash, getsid, help, history, ipconfig, ls, mount, netstat, ps, reg. Subcommands belong in commandString, not here.', + 'Read-only RTR base command family, one of: cat, cd, clear, csrutil, env, eventlog, filehash, getsid, help, history, ifconfig, ipconfig, ls, mount, netstat, ps, reg, users. Subcommands belong in commandString, not here — and only reg query is read-tier, since reg set and reg delete are Active Responder commands.', }, commandString: { type: 'string', diff --git a/apps/sim/tools/crowdstrike/get_sensor_details.ts b/apps/sim/tools/crowdstrike/get_sensor_details.ts index be162d543b7..c9ab95914ab 100644 --- a/apps/sim/tools/crowdstrike/get_sensor_details.ts +++ b/apps/sim/tools/crowdstrike/get_sensor_details.ts @@ -179,6 +179,16 @@ export const crowdstrikeGetSensorDetailsTool: ToolConfig< type: 'number', description: 'Number of sensors returned', }, + pagination: { + type: 'json', + description: 'Pagination metadata (limit, offset, total)', + optional: true, + properties: { + limit: { type: 'number', description: 'Page size used for the query', optional: true }, + offset: { type: 'number', description: 'Offset returned by CrowdStrike', optional: true }, + total: { type: 'number', description: 'Total records available', optional: true }, + }, + }, errors: { type: 'array', description: 'Errors CrowdStrike returned alongside a partially successful response', diff --git a/apps/sim/tools/crowdstrike/query_alerts.ts b/apps/sim/tools/crowdstrike/query_alerts.ts index a836a8a72fe..73734f54287 100644 --- a/apps/sim/tools/crowdstrike/query_alerts.ts +++ b/apps/sim/tools/crowdstrike/query_alerts.ts @@ -11,7 +11,7 @@ export const crowdstrikeQueryAlertsTool: ToolConfig< id: 'crowdstrike_query_alerts', name: 'CrowdStrike Query Alerts', description: - 'Search CrowdStrike Falcon alerts with a Falcon Query Language filter and return their composite IDs. Uses the current Alerts API (GET /alerts/queries/alerts/v2), which supersedes the deprecated Detects API. Requires the "Alerts: Read" API scope.', + 'Search CrowdStrike Falcon alerts with a Falcon Query Language filter and return their composite IDs. Uses the current Alerts API (GET /alerts/queries/alerts/v2), which replaced the Detects API decommissioned on September 30, 2025. Requires the "Alerts: Read" API scope.', version: '1.0.0', params: { diff --git a/apps/sim/tools/crowdstrike/types.ts b/apps/sim/tools/crowdstrike/types.ts index 2879e4e9cff..4dc0a753c58 100644 --- a/apps/sim/tools/crowdstrike/types.ts +++ b/apps/sim/tools/crowdstrike/types.ts @@ -101,6 +101,7 @@ interface CrowdStrikeSensor { export interface CrowdStrikeQuerySensorsResponse extends ToolResponse { output: { count: number + errors: CrowdStrikeApiError[] pagination: CrowdStrikePagination | null sensors: CrowdStrikeSensor[] } @@ -109,6 +110,7 @@ export interface CrowdStrikeQuerySensorsResponse extends ToolResponse { export interface CrowdStrikeGetSensorDetailsResponse extends ToolResponse { output: { count: number + errors: CrowdStrikeApiError[] pagination: CrowdStrikePagination | null sensors: CrowdStrikeSensor[] } @@ -138,6 +140,7 @@ export interface CrowdStrikeGetSensorAggregatesResponse extends ToolResponse { output: { aggregates: CrowdStrikeSensorAggregateResult[] count: number + errors: CrowdStrikeApiError[] } } diff --git a/apps/sim/tools/crowdstrike/update_indicators.ts b/apps/sim/tools/crowdstrike/update_indicators.ts index 6c4ce2e2338..709b09d588c 100644 --- a/apps/sim/tools/crowdstrike/update_indicators.ts +++ b/apps/sim/tools/crowdstrike/update_indicators.ts @@ -11,7 +11,7 @@ export const crowdstrikeUpdateIndicatorsTool: ToolConfig< id: 'crowdstrike_update_indicators', name: 'CrowdStrike Update Indicators', description: - 'Update custom CrowdStrike Falcon indicators of compromise by ID (PATCH /iocs/entities/indicators/v1). DESTRUCTIVE: CrowdStrike blanks out any field you omit, so read each indicator with crowdstrike_get_indicator_details first and resend its full field set with your edits applied. Changing action or scope changes prevention behavior fleet-wide. type and value are immutable. Requires the "IOC Management: Write" API scope.', + 'Update custom CrowdStrike Falcon indicators of compromise by ID (PATCH /iocs/entities/indicators/v1). DESTRUCTIVE: omitted fields may be cleared, so read each indicator with crowdstrike_get_indicator_details first and resend its full field set with your edits applied. Changing action or scope changes prevention behavior fleet-wide. type and value are immutable. Requires the "IOC Management: Write" API scope.', version: '1.0.0', params: { @@ -38,7 +38,7 @@ export const crowdstrikeUpdateIndicatorsTool: ToolConfig< required: true, visibility: 'user-or-llm', description: - 'JSON array of indicators to update. Each entry requires id, and must also repeat every field it wants to keep: CrowdStrike blanks out any updatable field the entry omits. Updatable fields: action, severity, description, source, tags (array), platforms (array), applied_globally (boolean), host_groups (array), expiration (ISO 8601), mobile_action, metadata ({ filename }). type and value cannot be changed.', + 'JSON array of indicators to update. Each entry requires id, and should also repeat every field it wants to keep: an updatable field the entry omits may be cleared. Updatable fields: action, severity, description, source, tags (array), platforms (array), applied_globally (boolean), host_groups (array), expiration (ISO 8601), mobile_action, metadata ({ filename }). type and value cannot be changed.', }, comment: { type: 'string', diff --git a/apps/sim/tools/datadog/cancel_downtime.ts b/apps/sim/tools/datadog/cancel_downtime.ts index 7c99ba9b3f6..892ddbc60bc 100644 --- a/apps/sim/tools/datadog/cancel_downtime.ts +++ b/apps/sim/tools/datadog/cancel_downtime.ts @@ -38,7 +38,8 @@ export const cancelDowntimeTool: ToolConfig { const site = params.site || 'datadoghq.com' - return `https://api.${site}/api/v2/downtime/${params.downtimeId}` + const downtimeId = encodeURIComponent(String(params.downtimeId).trim()) + return `https://api.${site}/api/v2/downtime/${downtimeId}` }, method: 'DELETE', headers: (params) => ({ diff --git a/apps/sim/tools/datadog/datadog.test.ts b/apps/sim/tools/datadog/datadog.test.ts index 72d9ba14ae1..e8b31df7daa 100644 --- a/apps/sim/tools/datadog/datadog.test.ts +++ b/apps/sim/tools/datadog/datadog.test.ts @@ -2,12 +2,16 @@ * @vitest-environment node */ import { beforeEach, describe, expect, it, vi } from 'vitest' +import { cancelDowntimeTool } from '@/tools/datadog/cancel_downtime' import { createDowntimeTool } from '@/tools/datadog/create_downtime' import { createEventTool } from '@/tools/datadog/create_event' import { createMonitorTool } from '@/tools/datadog/create_monitor' import { getIncidentTool } from '@/tools/datadog/get_incident' +import { getMonitorTool } from '@/tools/datadog/get_monitor' +import { listDashboardsTool } from '@/tools/datadog/list_dashboards' import { listDowntimesTool } from '@/tools/datadog/list_downtimes' import { listIncidentsTool } from '@/tools/datadog/list_incidents' +import { listMonitorsTool } from '@/tools/datadog/list_monitors' import { muteMonitorTool } from '@/tools/datadog/mute_monitor' import { queryLogsTool } from '@/tools/datadog/query_logs' import { queryTimeseriesTool } from '@/tools/datadog/query_timeseries' @@ -449,6 +453,79 @@ describe('splitCommaList input tolerance', () => { }) }) +describe('path parameter encoding', () => { + /** A pasted id often carries surrounding whitespace, which would 404 as `%20123`. */ + it('trims and encodes the monitor id in get_monitor', () => { + const url = callUrl(getMonitorTool, { ...auth, monitorId: ' 12 3 ' } as any) + expect(url).toContain('/api/v1/monitor/12%203') + expect(url).not.toContain('/monitor/ 12') + }) + + it('trims and encodes the downtime id in cancel_downtime', () => { + const url = callUrl(cancelDowntimeTool, { ...auth, downtimeId: ' a/b ' } as any) + expect(url).toContain('/api/v2/downtime/a%2Fb') + expect(url).not.toContain('/downtime/ a') + }) +}) + +describe('list_downtimes limit description', () => { + /** + * The Datadog v2 spec declares `default: 30` and `example: 100` but no `maximum`, so the + * description must not present 100 as a vendor-enforced ceiling. + */ + it('does not claim a vendor maximum', () => { + const description = listDowntimesTool.params.limit.description ?? '' + expect(description).not.toMatch(/max:\s*100/) + expect(description).toMatch(/declares no maximum/) + }) +}) + +describe('list_monitors pagination', () => { + /** + * Datadog returns every monitor when `page` is absent, so both page params have to reach + * the request for the page size to have any effect. + */ + it('sends page and page_size', () => { + const url = callUrl(listMonitorsTool, { ...auth, page: 2, pageSize: 50 } as any) + expect(url).toContain('page=2') + expect(url).toContain('page_size=50') + }) +}) + +describe('list_dashboards filters', () => { + /** `filter[shared]` and `filter[deleted]` are incompatible, so an off toggle sends nothing. */ + it('omits both filters when neither is enabled', () => { + const url = callUrl(listDashboardsTool, { ...auth, filterShared: false, filterDeleted: false }) + expect(url).not.toContain('filter%5Bshared%5D') + expect(url).not.toContain('filter%5Bdeleted%5D') + }) + + it('sends only the filter that is enabled', () => { + const url = callUrl(listDashboardsTool, { ...auth, filterShared: true, filterDeleted: false }) + expect(url).toContain('filter%5Bshared%5D=true') + expect(url).not.toContain('filter%5Bdeleted%5D') + }) +}) + +describe('submit_metrics errors output', () => { + /** `errors` is the only signal that Datadog rejected part of an accepted submission. */ + it('reports errors on the success path', async () => { + const result = await submitMetricsTool.transformResponse!( + jsonResponse({ errors: ['metric name too long'] }) + ) + expect(result.success).toBe(true) + expect(result.output.errors).toEqual(['metric name too long']) + }) + + it('reports errors on the failure path', async () => { + const result = await submitMetricsTool.transformResponse!( + jsonResponse({ errors: ['bad payload'] }, { status: 400 }) + ) + expect(result.success).toBe(false) + expect(result.output.errors).toEqual(['bad payload']) + }) +}) + describe('registry surface', () => { it('keeps create_event on api-key-only auth', () => { expect(createEventTool.params.applicationKey).toBeUndefined() diff --git a/apps/sim/tools/datadog/get_monitor.ts b/apps/sim/tools/datadog/get_monitor.ts index 441b1d47974..2d69e114e39 100644 --- a/apps/sim/tools/datadog/get_monitor.ts +++ b/apps/sim/tools/datadog/get_monitor.ts @@ -56,8 +56,9 @@ export const getMonitorTool: ToolConfig = if (params.groupStates) queryParams.set('group_states', params.groupStates) if (params.withDowntimes) queryParams.set('with_downtimes', 'true') + const monitorId = encodeURIComponent(String(params.monitorId).trim()) const queryString = queryParams.toString() - return `https://api.${site}/api/v1/monitor/${params.monitorId}${queryString ? `?${queryString}` : ''}` + return `https://api.${site}/api/v1/monitor/${monitorId}${queryString ? `?${queryString}` : ''}` }, method: 'GET', headers: (params) => ({ diff --git a/apps/sim/tools/datadog/list_dashboards.ts b/apps/sim/tools/datadog/list_dashboards.ts index 642058113c9..4c7d58095bb 100644 --- a/apps/sim/tools/datadog/list_dashboards.ts +++ b/apps/sim/tools/datadog/list_dashboards.ts @@ -55,12 +55,14 @@ export const listDashboardsTool: ToolConfig { const queryParams = new URLSearchParams() - if (params.filterShared !== undefined) - queryParams.set('filter[shared]', String(params.filterShared)) - if (params.filterDeleted !== undefined) - queryParams.set('filter[deleted]', String(params.filterDeleted)) + if (params.filterShared) queryParams.set('filter[shared]', 'true') + if (params.filterDeleted) queryParams.set('filter[deleted]', 'true') if (params.count !== undefined) queryParams.set('count', String(params.count)) if (params.start !== undefined) queryParams.set('start', String(params.start)) const queryString = queryParams.toString() diff --git a/apps/sim/tools/datadog/list_downtimes.ts b/apps/sim/tools/datadog/list_downtimes.ts index c690ea7f9d9..a8c269fbc1b 100644 --- a/apps/sim/tools/datadog/list_downtimes.ts +++ b/apps/sim/tools/datadog/list_downtimes.ts @@ -24,7 +24,8 @@ export const listDowntimesTool: ToolConfig = JSON.parse( - '{"a2a_cancel_task":{"id":"a2a_cancel_task","name":"A2A Cancel Task","description":"Request cancellation of an in-progress A2A task.","version":"1.0.0","params":{"agentUrl":{"type":"string","required":true,"visibility":"user-only","description":"The A2A agent endpoint URL"},"taskId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The task ID to cancel"},"apiKey":{"type":"string","required":false,"visibility":"user-only","description":"API key for authentication (if required)"}}},"a2a_get_agent_card":{"id":"a2a_get_agent_card","name":"A2A Get Agent Card","description":"Fetch the Agent Card (discovery document) for an external A2A agent.","version":"1.0.0","params":{"agentUrl":{"type":"string","required":true,"visibility":"user-only","description":"The A2A agent endpoint URL"},"apiKey":{"type":"string","required":false,"visibility":"user-only","description":"API key for authentication (if required)"}}},"a2a_get_task":{"id":"a2a_get_task","name":"A2A Get Task","description":"Retrieve the current state and result of an A2A task.","version":"1.0.0","params":{"agentUrl":{"type":"string","required":true,"visibility":"user-only","description":"The A2A agent endpoint URL"},"taskId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The task ID to retrieve"},"historyLength":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of history messages to include"},"apiKey":{"type":"string","required":false,"visibility":"user-only","description":"API key for authentication (if required)"}}},"a2a_send_message":{"id":"a2a_send_message","name":"A2A Send Message","description":"Send a message to an external A2A agent and return its response.","version":"1.0.0","params":{"agentUrl":{"type":"string","required":true,"visibility":"user-only","description":"The A2A agent endpoint URL"},"message":{"type":"string","required":true,"visibility":"user-or-llm","description":"The message text to send"},"data":{"type":"json","required":false,"visibility":"user-or-llm","description":"Optional structured JSON data to attach"},"files":{"type":"json","required":false,"visibility":"user-or-llm","description":"Optional files to attach"},"taskId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Existing task ID to continue"},"contextId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Conversation context ID to continue"},"apiKey":{"type":"string","required":false,"visibility":"user-only","description":"API key for authentication (if required)"}}},"agentmail_create_draft":{"id":"agentmail_create_draft","name":"Create Draft","description":"Create a new email draft in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox to create the draft in"},"to":{"type":"string","required":false,"visibility":"user-or-llm","description":"Recipient email addresses (comma-separated)"},"subject":{"type":"string","required":false,"visibility":"user-or-llm","description":"Draft subject line"},"text":{"type":"string","required":false,"visibility":"user-or-llm","description":"Plain text draft body"},"html":{"type":"string","required":false,"visibility":"user-or-llm","description":"HTML draft body"},"cc":{"type":"string","required":false,"visibility":"user-or-llm","description":"CC recipient email addresses (comma-separated)"},"bcc":{"type":"string","required":false,"visibility":"user-or-llm","description":"BCC recipient email addresses (comma-separated)"},"inReplyTo":{"type":"string","required":false,"visibility":"user-or-llm","description":"ID of message being replied to"},"sendAt":{"type":"string","required":false,"visibility":"user-or-llm","description":"ISO 8601 timestamp to schedule sending"}}},"agentmail_create_inbox":{"id":"agentmail_create_inbox","name":"Create Inbox","description":"Create a new email inbox with AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"username":{"type":"string","required":false,"visibility":"user-or-llm","description":"Username for the inbox email address"},"domain":{"type":"string","required":false,"visibility":"user-or-llm","description":"Domain for the inbox email address"},"displayName":{"type":"string","required":false,"visibility":"user-or-llm","description":"Display name for the inbox"}}},"agentmail_delete_draft":{"id":"agentmail_delete_draft","name":"Delete Draft","description":"Delete an email draft in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox containing the draft"},"draftId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the draft to delete"}}},"agentmail_delete_inbox":{"id":"agentmail_delete_inbox","name":"Delete Inbox","description":"Delete an email inbox in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox to delete"}}},"agentmail_delete_thread":{"id":"agentmail_delete_thread","name":"Delete Thread","description":"Delete an email thread in AgentMail (moves to trash, or permanently deletes if already in trash)","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox containing the thread"},"threadId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the thread to delete"},"permanent":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Force permanent deletion instead of moving to trash"}}},"agentmail_forward_message":{"id":"agentmail_forward_message","name":"Forward Message","description":"Forward an email message to new recipients in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox containing the message"},"messageId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the message to forward"},"to":{"type":"string","required":true,"visibility":"user-or-llm","description":"Recipient email addresses (comma-separated)"},"subject":{"type":"string","required":false,"visibility":"user-or-llm","description":"Override subject line"},"text":{"type":"string","required":false,"visibility":"user-or-llm","description":"Additional plain text to prepend"},"html":{"type":"string","required":false,"visibility":"user-or-llm","description":"Additional HTML to prepend"},"cc":{"type":"string","required":false,"visibility":"user-or-llm","description":"CC recipient email addresses (comma-separated)"},"bcc":{"type":"string","required":false,"visibility":"user-or-llm","description":"BCC recipient email addresses (comma-separated)"}}},"agentmail_get_draft":{"id":"agentmail_get_draft","name":"Get Draft","description":"Get details of a specific email draft in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox the draft belongs to"},"draftId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the draft to retrieve"}}},"agentmail_get_inbox":{"id":"agentmail_get_inbox","name":"Get Inbox","description":"Get details of a specific email inbox in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox to retrieve"}}},"agentmail_get_message":{"id":"agentmail_get_message","name":"Get Message","description":"Get details of a specific email message in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox containing the message"},"messageId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the message to retrieve"}}},"agentmail_get_thread":{"id":"agentmail_get_thread","name":"Get Thread","description":"Get details of a specific email thread including messages in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox containing the thread"},"threadId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the thread to retrieve"}}},"agentmail_list_drafts":{"id":"agentmail_list_drafts","name":"List Drafts","description":"List email drafts in an inbox in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox to list drafts from"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of drafts to return"},"pageToken":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pagination token for next page of results"}}},"agentmail_list_inboxes":{"id":"agentmail_list_inboxes","name":"List Inboxes","description":"List all email inboxes in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of inboxes to return"},"pageToken":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pagination token for next page of results"}}},"agentmail_list_messages":{"id":"agentmail_list_messages","name":"List Messages","description":"List messages in an inbox in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox to list messages from"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of messages to return"},"pageToken":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pagination token for next page of results"}}},"agentmail_list_threads":{"id":"agentmail_list_threads","name":"List Threads","description":"List email threads in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox to list threads from"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of threads to return"},"pageToken":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pagination token for next page of results"},"labels":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated labels to filter threads by"},"before":{"type":"string","required":false,"visibility":"user-or-llm","description":"Filter threads before this ISO 8601 timestamp"},"after":{"type":"string","required":false,"visibility":"user-or-llm","description":"Filter threads after this ISO 8601 timestamp"}}},"agentmail_reply_message":{"id":"agentmail_reply_message","name":"Reply to Message","description":"Reply to an existing email message in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox to reply from"},"messageId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the message to reply to"},"text":{"type":"string","required":false,"visibility":"user-or-llm","description":"Plain text reply body"},"html":{"type":"string","required":false,"visibility":"user-or-llm","description":"HTML reply body"},"to":{"type":"string","required":false,"visibility":"user-or-llm","description":"Override recipient email addresses (comma-separated)"},"cc":{"type":"string","required":false,"visibility":"user-or-llm","description":"CC email addresses (comma-separated)"},"bcc":{"type":"string","required":false,"visibility":"user-or-llm","description":"BCC email addresses (comma-separated)"},"replyAll":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Reply to all recipients of the original message"}}},"agentmail_send_draft":{"id":"agentmail_send_draft","name":"Send Draft","description":"Send an existing email draft in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox containing the draft"},"draftId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the draft to send"}}},"agentmail_send_message":{"id":"agentmail_send_message","name":"Send Message","description":"Send an email message from an AgentMail inbox","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox to send from"},"to":{"type":"string","required":true,"visibility":"user-or-llm","description":"Recipient email address (comma-separated for multiple)"},"subject":{"type":"string","required":true,"visibility":"user-or-llm","description":"Email subject line"},"text":{"type":"string","required":false,"visibility":"user-or-llm","description":"Plain text email body"},"html":{"type":"string","required":false,"visibility":"user-or-llm","description":"HTML email body"},"cc":{"type":"string","required":false,"visibility":"user-or-llm","description":"CC recipient email addresses (comma-separated)"},"bcc":{"type":"string","required":false,"visibility":"user-or-llm","description":"BCC recipient email addresses (comma-separated)"}}},"agentmail_update_draft":{"id":"agentmail_update_draft","name":"Update Draft","description":"Update an existing email draft in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox containing the draft"},"draftId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the draft to update"},"to":{"type":"string","required":false,"visibility":"user-or-llm","description":"Recipient email addresses (comma-separated)"},"subject":{"type":"string","required":false,"visibility":"user-or-llm","description":"Draft subject line"},"text":{"type":"string","required":false,"visibility":"user-or-llm","description":"Plain text draft body"},"html":{"type":"string","required":false,"visibility":"user-or-llm","description":"HTML draft body"},"cc":{"type":"string","required":false,"visibility":"user-or-llm","description":"CC recipient email addresses (comma-separated)"},"bcc":{"type":"string","required":false,"visibility":"user-or-llm","description":"BCC recipient email addresses (comma-separated)"},"sendAt":{"type":"string","required":false,"visibility":"user-or-llm","description":"ISO 8601 timestamp to schedule sending"}}},"agentmail_update_inbox":{"id":"agentmail_update_inbox","name":"Update Inbox","description":"Update the display name of an email inbox in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox to update"},"displayName":{"type":"string","required":true,"visibility":"user-or-llm","description":"New display name for the inbox"}}},"agentmail_update_message":{"id":"agentmail_update_message","name":"Update Message","description":"Add or remove labels on an email message in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox containing the message"},"messageId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the message to update"},"addLabels":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated labels to add to the message"},"removeLabels":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated labels to remove from the message"}}},"agentmail_update_thread":{"id":"agentmail_update_thread","name":"Update Thread Labels","description":"Add or remove labels on an email thread in AgentMail","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentMail API key"},"inboxId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the inbox containing the thread"},"threadId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the thread to update"},"addLabels":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated labels to add to the thread"},"removeLabels":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated labels to remove from the thread"}}},"agentphone_create_call":{"id":"agentphone_create_call","name":"Create Outbound Call","description":"Initiate an outbound voice call from an AgentPhone agent","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"agentId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Agent that will handle the call"},"toNumber":{"type":"string","required":true,"visibility":"user-or-llm","description":"Phone number to call in E.164 format (e.g. +14155551234)"},"fromNumberId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Phone number ID to use as caller ID. Must belong to the agent. If omitted, the agent\'s first assigned number is used."},"initialGreeting":{"type":"string","required":false,"visibility":"user-or-llm","description":"Optional greeting spoken when the recipient answers"},"voice":{"type":"string","required":false,"visibility":"user-or-llm","description":"Voice ID override for this call (defaults to the agent\'s configured voice)"},"systemPrompt":{"type":"string","required":false,"visibility":"user-or-llm","description":"When provided, uses a built-in LLM for the conversation instead of forwarding to your webhook"}}},"agentphone_create_contact":{"id":"agentphone_create_contact","name":"Create Contact","description":"Create a new contact in AgentPhone","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"phoneNumber":{"type":"string","required":true,"visibility":"user-or-llm","description":"Phone number in E.164 format (e.g. +14155551234)"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Contact\'s full name"},"email":{"type":"string","required":false,"visibility":"user-or-llm","description":"Contact\'s email address"},"notes":{"type":"string","required":false,"visibility":"user-or-llm","description":"Freeform notes stored on the contact"}}},"agentphone_create_number":{"id":"agentphone_create_number","name":"Create Phone Number","description":"Provision a new SMS- and voice-enabled phone number","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Two-letter country code (e.g. US, CA). Defaults to US."},"areaCode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Preferred area code (US/CA only, e.g. \\"415\\"). Best-effort — may be ignored if unavailable."},"agentId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Optionally attach the number to an agent immediately"}}},"agentphone_delete_contact":{"id":"agentphone_delete_contact","name":"Delete Contact","description":"Delete a contact by ID","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"contactId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Contact ID"}}},"agentphone_get_call":{"id":"agentphone_get_call","name":"Get Call","description":"Fetch a call and its full transcript","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"callId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the call to retrieve"}}},"agentphone_get_call_transcript":{"id":"agentphone_get_call_transcript","name":"Get Call Transcript","description":"Get the full ordered transcript for a call","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"callId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the call to retrieve the transcript for"}}},"agentphone_get_contact":{"id":"agentphone_get_contact","name":"Get Contact","description":"Fetch a single contact by ID","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"contactId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Contact ID"}}},"agentphone_get_conversation":{"id":"agentphone_get_conversation","name":"Get Conversation","description":"Get a conversation along with its recent messages","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"conversationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Conversation ID"},"messageLimit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of recent messages to include (default 50, max 100)"}}},"agentphone_get_conversation_messages":{"id":"agentphone_get_conversation_messages","name":"Get Conversation Messages","description":"Get paginated messages for a conversation","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"conversationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Conversation ID"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of messages to return (default 50, max 200)"},"before":{"type":"string","required":false,"visibility":"user-or-llm","description":"Return messages received before this ISO 8601 timestamp"},"after":{"type":"string","required":false,"visibility":"user-or-llm","description":"Return messages received after this ISO 8601 timestamp"}}},"agentphone_get_number_messages":{"id":"agentphone_get_number_messages","name":"Get Phone Number Messages","description":"Fetch messages received on a specific phone number","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"numberId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the phone number"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of messages to return (default 50, max 200)"},"before":{"type":"string","required":false,"visibility":"user-or-llm","description":"Return messages received before this ISO 8601 timestamp"},"after":{"type":"string","required":false,"visibility":"user-or-llm","description":"Return messages received after this ISO 8601 timestamp"}}},"agentphone_get_usage":{"id":"agentphone_get_usage","name":"Get Usage","description":"Retrieve current usage statistics for the AgentPhone account","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"}}},"agentphone_get_usage_daily":{"id":"agentphone_get_usage_daily","name":"Get Daily Usage","description":"Get a daily breakdown of usage (messages, calls, webhooks) for the last N days","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"days":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of days to return (1-365, default 30)"}}},"agentphone_get_usage_monthly":{"id":"agentphone_get_usage_monthly","name":"Get Monthly Usage","description":"Get monthly usage aggregation (messages, calls, webhooks) for the last N months","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"months":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of months to return (1-24, default 6)"}}},"agentphone_list_calls":{"id":"agentphone_list_calls","name":"List Calls","description":"List voice calls for this AgentPhone account","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of results to return (default 20, max 100)"},"offset":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of results to skip (min 0)"},"status":{"type":"string","required":false,"visibility":"user-or-llm","description":"Filter by status (completed, in-progress, failed)"},"direction":{"type":"string","required":false,"visibility":"user-or-llm","description":"Filter by direction (inbound, outbound)"},"type":{"type":"string","required":false,"visibility":"user-or-llm","description":"Filter by call type (pstn, web)"},"search":{"type":"string","required":false,"visibility":"user-or-llm","description":"Search by phone number (matches fromNumber or toNumber)"}}},"agentphone_list_contacts":{"id":"agentphone_list_contacts","name":"List Contacts","description":"List contacts for this AgentPhone account","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"search":{"type":"string","required":false,"visibility":"user-or-llm","description":"Filter by name or phone number (case-insensitive contains)"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of results to return (default 50, max 200)"},"offset":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of results to skip (min 0)"}}},"agentphone_list_conversations":{"id":"agentphone_list_conversations","name":"List Conversations","description":"List conversations (message threads) for this AgentPhone account","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of results to return (default 20, max 100)"},"offset":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of results to skip (min 0)"}}},"agentphone_list_numbers":{"id":"agentphone_list_numbers","name":"List Phone Numbers","description":"List all phone numbers provisioned for this AgentPhone account","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of results to return (default 20, max 100)"},"offset":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of results to skip (min 0)"}}},"agentphone_react_to_message":{"id":"agentphone_react_to_message","name":"React to Message","description":"Send an iMessage tapback reaction to a message (iMessage only)","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"messageId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the message to react to"},"reaction":{"type":"string","required":true,"visibility":"user-or-llm","description":"Reaction type: love, like, dislike, laugh, emphasize, or question"}}},"agentphone_release_number":{"id":"agentphone_release_number","name":"Release Phone Number","description":"Release (delete) a phone number. This action is irreversible.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"numberId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the phone number to release"}}},"agentphone_send_message":{"id":"agentphone_send_message","name":"Send Message","description":"Send an outbound SMS or iMessage from an AgentPhone agent","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"agentId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Agent sending the message"},"toNumber":{"type":"string","required":true,"visibility":"user-or-llm","description":"Recipient phone number in E.164 format (e.g. +14155551234)"},"body":{"type":"string","required":true,"visibility":"user-or-llm","description":"Message text to send"},"mediaUrl":{"type":"string","required":false,"visibility":"user-or-llm","description":"Optional URL of an image, video, or file to attach"},"numberId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Phone number ID to send from. If omitted, the agent\'s first assigned number is used."}}},"agentphone_update_contact":{"id":"agentphone_update_contact","name":"Update Contact","description":"Update a contact\'s fields","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"contactId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Contact ID"},"phoneNumber":{"type":"string","required":false,"visibility":"user-or-llm","description":"New phone number in E.164 format"},"name":{"type":"string","required":false,"visibility":"user-or-llm","description":"New contact name"},"email":{"type":"string","required":false,"visibility":"user-or-llm","description":"New email address"},"notes":{"type":"string","required":false,"visibility":"user-or-llm","description":"New freeform notes"}}},"agentphone_update_conversation":{"id":"agentphone_update_conversation","name":"Update Conversation","description":"Update conversation metadata (stored state). Pass null to clear existing metadata.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"AgentPhone API key"},"conversationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Conversation ID"},"metadata":{"type":"json","required":false,"visibility":"user-or-llm","description":"Custom key-value metadata to store on the conversation. Pass null to clear existing metadata."}}},"agiloft_async_status":{"id":"agiloft_async_status","name":"Agiloft Async Status","description":"Check whether an asynchronous Agiloft call, such as a run action button, has completed.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table the asynchronous call was made against"},"callbackId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Callback ID returned by the asynchronous call, e.g. from Run Action Button"}}},"agiloft_attach_file":{"id":"agiloft_attach_file","name":"Agiloft Attach File","description":"Attach a file to a field in an Agiloft record.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\")"},"recordId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the record to attach the file to"},"fieldName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the attachment field"},"file":{"type":"file","required":true,"visibility":"user-or-llm","description":"File to attach"},"fileName":{"type":"string","required":false,"visibility":"user-or-llm","description":"Name to assign to the file (defaults to original file name)"},"overwrite":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Replace the contents of the field instead of adding another file to it"}}},"agiloft_attachment_info":{"id":"agiloft_attachment_info","name":"Agiloft Attachment Info","description":"Get information about file attachments on a record field.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\")"},"recordId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the record to check attachments on"},"fieldName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the attachment field to inspect"}}},"agiloft_create_record":{"id":"agiloft_create_record","name":"Agiloft Create Record","description":"Create a new record in an Agiloft table.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\", \\"contacts.employees\\")"},"data":{"type":"string","required":true,"visibility":"user-or-llm","description":"Record field values as a JSON object (e.g., {\\"first_name\\": \\"John\\", \\"status\\": \\"Active\\"})"}}},"agiloft_delete_record":{"id":"agiloft_delete_record","name":"Agiloft Delete Record","description":"Delete a record from an Agiloft table.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\", \\"contacts.employees\\")"},"recordId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the record to delete"},"substituteIds":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated IDs of records that adopt the dependants of the deleted record. Read only when the delete rule is REPLACE_WITH_ANOTHER."},"deleteRule":{"type":"string","required":false,"visibility":"user-or-llm","description":"How to treat records that depend on this one: ERROR_IF_DEPENDANTS (default — fails rather than cascading), APPLY_DELETE_WHERE_POSSIBLE, DELETE_WHERE_POSSIBLE_OTHERWISE_UNLINK, APPLY_UNLINK, UNLINK_WHERE_POSSIBLE_OTHERWISE_DELETE, or REPLACE_WITH_ANOTHER"}}},"agiloft_get_choice_line_id":{"id":"agiloft_get_choice_line_id","name":"Agiloft Get Choice Line ID","description":"Resolve the internal numeric ID of a choice-list value, for use in EWSelect WHERE clauses against choice fields.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"case\\", \\"contracts\\")"},"fieldName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Choice field name (e.g., \\"priority\\", \\"status\\")"},"value":{"type":"string","required":true,"visibility":"user-or-llm","description":"Choice display value to resolve (e.g., \\"High\\", \\"Active\\")"}}},"agiloft_list_tables":{"id":"agiloft_list_tables","name":"Agiloft List Tables","description":"List the tables and fields in an Agiloft knowledge base, to discover the logical names other operations need.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":false,"visibility":"user-or-llm","description":"Logical name of a single table to describe (e.g., \\"contacts\\"). Leave empty to list every table in the knowledge base."},"includeLinkedInfo":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the source table and column behind each linked field"},"skipColumnsInfo":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Return table names only, omitting field details, for a much smaller response"}}},"agiloft_lock_record":{"id":"agiloft_lock_record","name":"Agiloft Lock Record","description":"Lock, unlock, or check the lock status of an Agiloft record.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\")"},"recordId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the record to lock, unlock, or check"},"lockAction":{"type":"string","required":true,"visibility":"user-or-llm","description":"Action to perform: \\"lock\\", \\"unlock\\", or \\"check\\""},"force":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Unlock only: release a lock held by another user."}}},"agiloft_nlp_search":{"id":"agiloft_nlp_search","name":"Agiloft Natural Language Search","description":"Search Agiloft records by describing what you want in plain language, such as \\"active NDAs submitted last month\\".","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"nlpQuery":{"type":"string","required":true,"visibility":"user-or-llm","description":"The request in plain language, e.g. \\"Show me open, high-priority contracts\\". Structured field filters are not accepted — use Search Records for those."},"fields":{"type":"string","required":true,"visibility":"user-or-llm","description":"Comma-separated field names to return, e.g. \\"id, contract_title1, company_name\\""},"page":{"type":"string","required":false,"visibility":"user-or-llm","description":"Page number, starting from 0"},"limit":{"type":"string","required":false,"visibility":"user-or-llm","description":"Records per page"}}},"agiloft_read_record":{"id":"agiloft_read_record","name":"Agiloft Read Record","description":"Read a record by ID from an Agiloft table.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\", \\"contacts.employees\\")"},"recordId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the record to read"},"fields":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated list of field names to include in the response"}}},"agiloft_remove_attachment":{"id":"agiloft_remove_attachment","name":"Agiloft Remove Attachment","description":"Remove an attached file from a field in an Agiloft record.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\")"},"recordId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the record containing the attachment"},"fieldName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the attachment field"},"position":{"type":"string","required":true,"visibility":"user-or-llm","description":"Position index of the file to remove (starting from 0)"}}},"agiloft_retrieve_attachment":{"id":"agiloft_retrieve_attachment","name":"Agiloft Retrieve Attachment","description":"Download an attached file from an Agiloft record field.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\")"},"recordId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the record containing the attachment"},"fieldName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the attachment field"},"position":{"type":"string","required":true,"visibility":"user-or-llm","description":"Position index of the file in the field (starting from 0)"}}},"agiloft_run_action_button":{"id":"agiloft_run_action_button","name":"Agiloft Run Action Button","description":"Run an action button on an Agiloft record, such as an approval or send-for-signature step.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\", \\"case\\")"},"recordId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the record to run the action button on"},"actionButtonField":{"type":"string","required":true,"visibility":"user-or-llm","description":"Logical name of the field holding the action button (e.g., \\"ab_field\\")"}}},"agiloft_saved_search":{"id":"agiloft_saved_search","name":"Agiloft Saved Search","description":"List the saved searches defined for an Agiloft table.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Logical table name to list saved searches for (e.g., \\"contract\\")"}}},"agiloft_search_records":{"id":"agiloft_search_records","name":"Agiloft Search Records","description":"Search for records in an Agiloft table using a query.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name to search in (e.g., \\"contracts\\", \\"contacts.employees\\")"},"query":{"type":"string","required":false,"visibility":"user-or-llm","description":"Ad hoc EWSearch query. Combine conditions with && (and) or || (or) and quote every value — e.g. \\"summary~=\'test\'&&priority=\'High\'\\". Required unless a saved search is given."},"search":{"type":"string","required":false,"visibility":"user-or-llm","description":"Label of a saved search defined on the table (e.g., \\"C: Status is Closed\\"). Can be combined with a query to narrow it further."},"fields":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated list of field names to include in the results"},"page":{"type":"string","required":false,"visibility":"user-or-llm","description":"Page number for paginated results (starting from 0)"},"limit":{"type":"string","required":false,"visibility":"user-or-llm","description":"Maximum number of records to return per page. Agiloft treats 0 as \\"all records\\", so leave it unset or use a positive value to keep result sizes bounded."}}},"agiloft_select_records":{"id":"agiloft_select_records","name":"Agiloft Select Records","description":"Select record IDs matching a SQL WHERE clause from an Agiloft table.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\", \\"contacts.employees\\")"},"where":{"type":"string","required":true,"visibility":"user-or-llm","description":"SQL WHERE clause using database column names (e.g., \\"summary like \'%new%\'\\" or \\"assigned_person=\'John Doe\'\\"). EWSelect has no page size and returns every matching ID, so append a database limit such as \\"limit 0,200\\" to bound the result."}}},"agiloft_update_record":{"id":"agiloft_update_record","name":"Agiloft Update Record","description":"Update an existing record in an Agiloft table.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\", \\"contacts.employees\\")"},"recordId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the record to update"},"data":{"type":"string","required":true,"visibility":"user-or-llm","description":"Updated field values as a JSON object (e.g., {\\"status\\": \\"Active\\", \\"priority\\": \\"High\\"})"}}},"agiloft_upsert_record":{"id":"agiloft_upsert_record","name":"Agiloft Upsert Record","description":"Create an Agiloft record, or update it when a record already matches the given fields.","version":"1.0.0","params":{"instanceUrl":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft instance URL (e.g., https://mycompany.agiloft.com)"},"knowledgeBase":{"type":"string","required":true,"visibility":"user-only","description":"Knowledge base name"},"login":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft username"},"password":{"type":"string","required":true,"visibility":"user-only","description":"Agiloft password"},"table":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table name (e.g., \\"contracts\\", \\"contacts.employees\\")"},"match":{"type":"string","required":true,"visibility":"user-or-llm","description":"Field used to find an existing record (e.g., \\"ext_id\\"). Pick something that identifies a record uniquely — if more than one record matches, Agiloft writes nothing and returns a conflict."},"async":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Queue the write instead of waiting for it. Returns a callback ID instead of a record ID; pass that to Async Status to poll the result."},"data":{"type":"string","required":true,"visibility":"user-or-llm","description":"Field values as a JSON object. On create these populate the new record; on update only the supplied fields change."}}},"ahrefs_anchors":{"id":"ahrefs_anchors","name":"Ahrefs Anchors","description":"Get the anchor text distribution for a target domain or URL\'s backlinks, showing how many links and referring domains use each anchor text.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\" or \\"https://example.com/page\\""},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match)"},"history":{"type":"string","required":false,"visibility":"user-or-llm","description":"Historical scope: \\"live\\" (currently live), \\"all_time\\" (default, includes lost backlinks), or \\"since:YYYY-MM-DD\\" (backlinks found since a date)"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_backlinks":{"id":"ahrefs_backlinks","name":"Ahrefs Backlinks","description":"Get a list of backlinks pointing to a target domain or URL. Returns details about each backlink including source URL, anchor text, and domain rating.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\" or \\"https://example.com/page\\""},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: \\"domain\\""},"history":{"type":"string","required":false,"visibility":"user-or-llm","description":"Historical scope: \\"live\\" (currently live backlinks), \\"all_time\\" (default, includes lost backlinks), or \\"since:YYYY-MM-DD\\" (backlinks found since a date)."},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_backlinks_stats":{"id":"ahrefs_backlinks_stats","name":"Ahrefs Backlinks Stats","description":"Get backlink and referring domain totals for a target domain or URL, both currently live and across all time.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\" or \\"https://example.com/page\\""},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: \\"domain\\""},"date":{"type":"string","required":false,"visibility":"user-only","description":"Date to report metrics on, in YYYY-MM-DD format (defaults to today)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_batch_analysis":{"id":"ahrefs_batch_analysis","name":"Ahrefs Batch Analysis","description":"Get bulk SEO metrics (Domain Rating, backlinks, referring domains, organic traffic, and more) for multiple domains or URLs in a single request. Useful for comparing many competitors at once.","version":"1.0.0","params":{"targets":{"type":"string","required":true,"visibility":"user-or-llm","description":"Comma-separated list of domains or URLs to analyze. Example: \\"example.com,competitor.com\\""},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode applied to every target: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match)"},"protocol":{"type":"string","required":false,"visibility":"user-or-llm","description":"Protocol applied to every target: \\"both\\" (default), \\"http\\", or \\"https\\""},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Country code for traffic data. Example: \\"us\\", \\"gb\\", \\"de\\" (default: \\"us\\")"},"volumeMode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Search volume calculation: \\"monthly\\" or \\"average\\" (default: \\"monthly\\")"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_broken_backlinks":{"id":"ahrefs_broken_backlinks","name":"Ahrefs Broken Backlinks","description":"Get a list of broken backlinks pointing to a target domain or URL. Useful for identifying link reclamation opportunities.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\" or \\"https://example.com/page\\""},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: \\"domain\\""},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_domain_rating":{"id":"ahrefs_domain_rating","name":"Ahrefs Domain Rating","description":"Get the Domain Rating (DR) and Ahrefs Rank for a target domain. Domain Rating shows the strength of a website\'s backlink profile on a scale from 0 to 100.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain to analyze (e.g., example.com)"},"date":{"type":"string","required":false,"visibility":"user-only","description":"Date for historical data in YYYY-MM-DD format (defaults to today)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_domain_rating_history":{"id":"ahrefs_domain_rating_history","name":"Ahrefs Domain Rating History","description":"Get the historical Domain Rating (DR) trend for a target domain or URL over a date range, grouped daily, weekly, or monthly.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\""},"dateFrom":{"type":"string","required":true,"visibility":"user-only","description":"Start date of the historical period, in YYYY-MM-DD format"},"dateTo":{"type":"string","required":false,"visibility":"user-only","description":"End date of the historical period, in YYYY-MM-DD format (defaults to today)"},"historyGrouping":{"type":"string","required":false,"visibility":"user-or-llm","description":"Time interval for grouping data points: \\"daily\\", \\"weekly\\", or \\"monthly\\" (default: \\"monthly\\")"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_keyword_overview":{"id":"ahrefs_keyword_overview","name":"Ahrefs Keyword Overview","description":"Get detailed metrics for a keyword including search volume, keyword difficulty, CPC, clicks, and traffic potential.","version":"1.0.0","params":{"keyword":{"type":"string","required":true,"visibility":"user-or-llm","description":"The keyword to analyze"},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Country code for keyword data. Example: \\"us\\", \\"gb\\", \\"de\\" (default: \\"us\\")"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_keywords_history":{"id":"ahrefs_keywords_history","name":"Ahrefs Keywords History","description":"Get the historical organic keyword ranking distribution for a target domain or URL over a date range: how many keywords rank in each position bucket at each point in time.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\""},"dateFrom":{"type":"string","required":true,"visibility":"user-only","description":"Start date of the historical period, in YYYY-MM-DD format"},"dateTo":{"type":"string","required":false,"visibility":"user-only","description":"End date of the historical period, in YYYY-MM-DD format (defaults to today)"},"historyGrouping":{"type":"string","required":false,"visibility":"user-or-llm","description":"Time interval for grouping data points: \\"daily\\", \\"weekly\\", or \\"monthly\\" (default: \\"monthly\\")"},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Country code for search results. Example: \\"us\\", \\"gb\\", \\"de\\" (default: \\"us\\")"},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_metrics":{"id":"ahrefs_metrics","name":"Ahrefs Metrics","description":"Get a one-call organic and paid search overview for a target domain or URL: organic traffic, organic keywords, paid traffic, paid keywords, and estimated traffic cost.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\""},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Country code for traffic data. Example: \\"us\\", \\"gb\\", \\"de\\""},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: \\"domain\\""},"date":{"type":"string","required":false,"visibility":"user-only","description":"Date to report metrics on, in YYYY-MM-DD format (defaults to today)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_metrics_history":{"id":"ahrefs_metrics_history","name":"Ahrefs Metrics History","description":"Get the historical organic and paid traffic trend for a target domain or URL over a date range: organic traffic/cost and paid traffic/cost at each point in time.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\""},"dateFrom":{"type":"string","required":true,"visibility":"user-only","description":"Start date of the historical period, in YYYY-MM-DD format"},"dateTo":{"type":"string","required":false,"visibility":"user-only","description":"End date of the historical period, in YYYY-MM-DD format (defaults to today)"},"volumeMode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Search volume calculation: \\"monthly\\" or \\"average\\" (default: \\"monthly\\")"},"historyGrouping":{"type":"string","required":false,"visibility":"user-or-llm","description":"Time interval for grouping data points: \\"daily\\", \\"weekly\\", or \\"monthly\\" (default: \\"monthly\\")"},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Country code for traffic data. Example: \\"us\\", \\"gb\\", \\"de\\" (default: \\"us\\")"},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_organic_competitors":{"id":"ahrefs_organic_competitors","name":"Ahrefs Organic Competitors","description":"Get domains that compete with a target domain or URL for the same organic keywords, ranked by keyword overlap.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\""},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Country code for search results. Example: \\"us\\", \\"gb\\", \\"de\\" (default: \\"us\\")"},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: \\"domain\\""},"date":{"type":"string","required":false,"visibility":"user-only","description":"Date to report metrics on, in YYYY-MM-DD format (defaults to today)"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_organic_keywords":{"id":"ahrefs_organic_keywords","name":"Ahrefs Organic Keywords","description":"Get organic keywords that a target domain or URL ranks for in Google search results. Returns keyword details including search volume, ranking position, and estimated traffic.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\" or \\"https://example.com/page\\""},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Country code for search results. Example: \\"us\\", \\"gb\\", \\"de\\" (default: \\"us\\")"},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: \\"domain\\""},"date":{"type":"string","required":false,"visibility":"user-only","description":"Date to report metrics on, in YYYY-MM-DD format (defaults to today)"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_paid_pages":{"id":"ahrefs_paid_pages","name":"Ahrefs Paid Pages","description":"Get a target domain\'s pages that receive paid search traffic, sorted by estimated paid traffic. Returns page URLs with their paid traffic, keyword counts, and estimated spend.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\""},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Country code for traffic data. Example: \\"us\\", \\"gb\\", \\"de\\" (default: \\"us\\")"},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match)"},"date":{"type":"string","required":false,"visibility":"user-only","description":"Date to report metrics on, in YYYY-MM-DD format (defaults to today)"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_rank_tracker_competitors_overview":{"id":"ahrefs_rank_tracker_competitors_overview","name":"Ahrefs Rank Tracker Competitors Overview","description":"Get competitor rankings for the keywords tracked in an Ahrefs Rank Tracker project: each tracked keyword\'s volume and difficulty alongside every competitor\'s position, traffic, and traffic value. This endpoint is free and does not consume API units.","version":"1.0.0","params":{"projectId":{"type":"number","required":true,"visibility":"user-or-llm","description":"The Rank Tracker project ID (found in the project URL in Ahrefs)"},"date":{"type":"string","required":true,"visibility":"user-only","description":"Date to report rankings for, in YYYY-MM-DD format"},"device":{"type":"string","required":true,"visibility":"user-or-llm","description":"Rankings device type: \\"desktop\\" or \\"mobile\\""},"dateCompared":{"type":"string","required":false,"visibility":"user-only","description":"Comparison date in YYYY-MM-DD format, to compute position/traffic deltas"},"volumeMode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Search volume calculation: \\"monthly\\" or \\"average\\" (default: \\"monthly\\")"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_rank_tracker_competitors_stats":{"id":"ahrefs_rank_tracker_competitors_stats","name":"Ahrefs Rank Tracker Competitors Stats","description":"Get aggregate competitor stats for an Ahrefs Rank Tracker project: each competitor\'s traffic, traffic value, average position, and share of voice across all tracked keywords. This endpoint is free and does not consume API units.","version":"1.0.0","params":{"projectId":{"type":"number","required":true,"visibility":"user-or-llm","description":"The Rank Tracker project ID (found in the project URL in Ahrefs)"},"date":{"type":"string","required":true,"visibility":"user-only","description":"Date to report metrics for, in YYYY-MM-DD format"},"device":{"type":"string","required":true,"visibility":"user-or-llm","description":"Rankings device type: \\"desktop\\" or \\"mobile\\""},"volumeMode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Search volume calculation: \\"monthly\\" or \\"average\\" (default: \\"monthly\\")"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_rank_tracker_overview":{"id":"ahrefs_rank_tracker_overview","name":"Ahrefs Rank Tracker Overview","description":"Get ranking overview metrics for the keywords tracked in an Ahrefs Rank Tracker project: position, search volume, keyword difficulty, and estimated traffic. This endpoint is free and does not consume API units.","version":"1.0.0","params":{"projectId":{"type":"number","required":true,"visibility":"user-or-llm","description":"The Rank Tracker project ID (found in the project URL in Ahrefs)"},"date":{"type":"string","required":true,"visibility":"user-only","description":"Date to report rankings for, in YYYY-MM-DD format"},"device":{"type":"string","required":true,"visibility":"user-or-llm","description":"Rankings device type: \\"desktop\\" or \\"mobile\\""},"dateCompared":{"type":"string","required":false,"visibility":"user-only","description":"Comparison date in YYYY-MM-DD format, to compute position/traffic deltas"},"volumeMode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Search volume calculation: \\"monthly\\" or \\"average\\" (default: \\"monthly\\")"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_rank_tracker_serp_overview":{"id":"ahrefs_rank_tracker_serp_overview","name":"Ahrefs Rank Tracker SERP Overview","description":"Get the full SERP (search engine results page) for a keyword tracked in an Ahrefs Rank Tracker project, including every ranking URL with its position, title, and authority metrics. This endpoint is free and does not consume API units.","version":"1.0.0","params":{"projectId":{"type":"number","required":true,"visibility":"user-or-llm","description":"The Rank Tracker project ID (found in the project URL in Ahrefs)"},"keyword":{"type":"string","required":true,"visibility":"user-or-llm","description":"The tracked keyword to retrieve SERP data for"},"country":{"type":"string","required":true,"visibility":"user-or-llm","description":"Country code for the tracked keyword. Example: \\"us\\", \\"gb\\", \\"de\\""},"device":{"type":"string","required":true,"visibility":"user-or-llm","description":"Rankings device type: \\"desktop\\" or \\"mobile\\""},"topPositions":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of top organic positions to return (defaults to all available)"},"date":{"type":"string","required":false,"visibility":"user-only","description":"Timestamp to return the last available SERP Overview at, in YYYY-MM-DDThh:mm:ss format"},"locationId":{"type":"number","required":false,"visibility":"user-or-llm","description":"Location ID of the tracked keyword, if tracked at a specific location"},"languageCode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Language code of the tracked keyword"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_refdomains_history":{"id":"ahrefs_refdomains_history","name":"Ahrefs Referring Domains History","description":"Get the historical referring domains trend for a target domain or URL over a date range, grouped daily, weekly, or monthly.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\""},"dateFrom":{"type":"string","required":true,"visibility":"user-only","description":"Start date of the historical period, in YYYY-MM-DD format"},"dateTo":{"type":"string","required":false,"visibility":"user-only","description":"End date of the historical period, in YYYY-MM-DD format (defaults to today)"},"historyGrouping":{"type":"string","required":false,"visibility":"user-or-llm","description":"Time interval for grouping data points: \\"daily\\", \\"weekly\\", or \\"monthly\\" (default: \\"monthly\\")"},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_referring_domains":{"id":"ahrefs_referring_domains","name":"Ahrefs Referring Domains","description":"Get a list of domains that link to a target domain or URL. Returns unique referring domains with their domain rating, backlink counts, and discovery dates.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain or URL to analyze. Example: \\"example.com\\" or \\"https://example.com/page\\""},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: \\"domain\\""},"history":{"type":"string","required":false,"visibility":"user-or-llm","description":"Historical scope: \\"live\\" (currently live), \\"all_time\\" (default, includes lost domains), or \\"since:YYYY-MM-DD\\" (domains found since a date)."},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_related_terms":{"id":"ahrefs_related_terms","name":"Ahrefs Related Terms","description":"Get keyword ideas related to a seed keyword: terms the same top-ranking pages also rank for (\\"also rank for\\") or also discuss (\\"also talk about\\"), with volume, difficulty, and CPC.","version":"1.0.0","params":{"keyword":{"type":"string","required":true,"visibility":"user-or-llm","description":"The seed keyword to find related terms for"},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Country code for keyword data. Example: \\"us\\", \\"gb\\", \\"de\\" (default: \\"us\\")"},"terms":{"type":"string","required":false,"visibility":"user-or-llm","description":"Type of related keywords to return: \\"also_rank_for\\", \\"also_talk_about\\", or \\"all\\" (default: \\"all\\")"},"viewFor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Whether to derive related terms from the top 10 or top 100 ranking pages (default: \\"top_10\\")"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_site_audit_page_explorer":{"id":"ahrefs_site_audit_page_explorer","name":"Ahrefs Site Audit Page Explorer","description":"Get crawled pages from an Ahrefs Site Audit project with health and SEO metrics: HTTP status, title, link counts, backlinks, indexability, and traffic. Optionally filter to pages affected by a specific issue.","version":"1.0.0","params":{"projectId":{"type":"number","required":true,"visibility":"user-or-llm","description":"The Site Audit project ID (found in the project URL in Ahrefs)"},"date":{"type":"string","required":false,"visibility":"user-only","description":"Crawl date in YYYY-MM-DDThh:mm:ss format (defaults to the most recent crawl)"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"offset":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of results to skip, for pagination"},"issueId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Only return pages affected by this issue ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"ahrefs_top_pages":{"id":"ahrefs_top_pages","name":"Ahrefs Top Pages","description":"Get the top pages of a target domain sorted by organic traffic. Returns page URLs with their traffic, keyword counts, and estimated traffic value.","version":"1.0.0","params":{"target":{"type":"string","required":true,"visibility":"user-or-llm","description":"The target domain to analyze. Example: \\"example.com\\""},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Country code for traffic data. Example: \\"us\\", \\"gb\\", \\"de\\" (default: \\"us\\")"},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: \\"domain\\""},"date":{"type":"string","required":false,"visibility":"user-only","description":"Date to report metrics on, in YYYY-MM-DD format (defaults to today)"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of results to return. Example: 50 (default: 1000)"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ahrefs API Key"}}},"airtable_create_records":{"id":"airtable_create_records","name":"Airtable Create Records","description":"Write new records to an Airtable table","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token"},"baseId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Airtable base ID (starts with \\"app\\", e.g., \\"appXXXXXXXXXXXXXX\\")"},"tableId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table ID (starts with \\"tbl\\") or table name"},"records":{"type":"json","required":true,"visibility":"user-or-llm","description":"Array of records to create, each with a `fields` object"},"typecast":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"When true, Airtable automatically converts string values to the field type"}},"oauth":{"required":true,"provider":"airtable"}},"airtable_delete_records":{"id":"airtable_delete_records","name":"Airtable Delete Records","description":"Delete one or more records from an Airtable table by ID","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token"},"baseId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Airtable base ID (starts with \\"app\\", e.g., \\"appXXXXXXXXXXXXXX\\")"},"tableId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table ID (starts with \\"tbl\\") or table name"},"recordIds":{"type":"json","required":true,"visibility":"user-or-llm","description":"Array of record IDs to delete (each starts with \\"rec\\", e.g., [\\"recXXXXXXXXXXXXXX\\"]). Pass a single-element array to delete one record."}},"oauth":{"required":true,"provider":"airtable"}},"airtable_get_base_schema":{"id":"airtable_get_base_schema","name":"Airtable Get Base Schema","description":"Get the schema of all tables, fields, and views in an Airtable base","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token"},"baseId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Airtable base ID (starts with \\"app\\", e.g., \\"appXXXXXXXXXXXXXX\\")"}},"oauth":{"required":true,"provider":"airtable"}},"airtable_get_record":{"id":"airtable_get_record","name":"Airtable Get Record","description":"Retrieve a single record from an Airtable table by its ID","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token"},"baseId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Airtable base ID (starts with \\"app\\", e.g., \\"appXXXXXXXXXXXXXX\\")"},"tableId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table ID (starts with \\"tbl\\") or table name"},"recordId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Record ID to retrieve (starts with \\"rec\\", e.g., \\"recXXXXXXXXXXXXXX\\")"}},"oauth":{"required":true,"provider":"airtable"}},"airtable_list_bases":{"id":"airtable_list_bases","name":"Airtable List Bases","description":"List all bases the authenticated user has access to","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token"},"offset":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pagination offset for retrieving additional bases"}},"oauth":{"required":true,"provider":"airtable"}},"airtable_list_records":{"id":"airtable_list_records","name":"Airtable List Records","description":"Read records from an Airtable table","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token"},"baseId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Airtable base ID (starts with \\"app\\", e.g., \\"appXXXXXXXXXXXXXX\\")"},"tableId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table ID (starts with \\"tbl\\") or table name"},"maxRecords":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of records to return (default: all records)"},"filterFormula":{"type":"string","required":false,"visibility":"user-or-llm","description":"Formula to filter records (e.g., \\"({Field Name} = \'Value\')\\")"}},"oauth":{"required":true,"provider":"airtable"}},"airtable_list_tables":{"id":"airtable_list_tables","name":"Airtable List Tables","description":"List all tables and their schema in an Airtable base","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token"},"baseId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Airtable base ID (starts with \\"app\\", e.g., \\"appXXXXXXXXXXXXXX\\")"}},"oauth":{"required":true,"provider":"airtable"}},"airtable_update_multiple_records":{"id":"airtable_update_multiple_records","name":"Airtable Update Multiple Records","description":"Update multiple existing records in an Airtable table","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token"},"baseId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Airtable base ID (starts with \\"app\\", e.g., \\"appXXXXXXXXXXXXXX\\")"},"tableId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table ID (starts with \\"tbl\\") or table name"},"records":{"type":"json","required":true,"visibility":"user-or-llm","description":"Array of records to update, each with an `id` and a `fields` object"},"typecast":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"When true, Airtable automatically converts string values to the field type"}},"oauth":{"required":true,"provider":"airtable"}},"airtable_update_record":{"id":"airtable_update_record","name":"Airtable Update Record","description":"Update an existing record in an Airtable table by ID","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token"},"baseId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Airtable base ID (starts with \\"app\\", e.g., \\"appXXXXXXXXXXXXXX\\")"},"tableId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table ID (starts with \\"tbl\\") or table name"},"recordId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Record ID to update (starts with \\"rec\\", e.g., \\"recXXXXXXXXXXXXXX\\")"},"fields":{"type":"json","required":true,"visibility":"user-or-llm","description":"An object containing the field names and their new values"},"typecast":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"When true, Airtable automatically converts string values to the field type"}},"oauth":{"required":true,"provider":"airtable"}},"airtable_upsert_records":{"id":"airtable_upsert_records","name":"Airtable Upsert Records","description":"Update existing records or create new ones in an Airtable table, matching on the specified merge fields","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token"},"baseId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Airtable base ID (starts with \\"app\\", e.g., \\"appXXXXXXXXXXXXXX\\")"},"tableId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Table ID (starts with \\"tbl\\") or table name"},"records":{"type":"json","required":true,"visibility":"user-or-llm","description":"Array of records to upsert, each with a `fields` object"},"fieldsToMergeOn":{"type":"json","required":true,"visibility":"user-or-llm","description":"Array of field names used to match existing records (max 3). A record is updated when all merge fields match, otherwise it is created. Example: [\\"Name\\"]"},"typecast":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"When true, Airtable automatically converts string values to the field type"}},"oauth":{"required":true,"provider":"airtable"}},"airweave_search":{"id":"airweave_search","name":"Airweave Search","description":"Search your synced data collections using Airweave. Supports semantic search with hybrid, neural, or keyword retrieval strategies. Optionally generate AI-powered answers from search results.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Airweave API Key for authentication"},"collectionId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The readable ID of the collection to search"},"query":{"type":"string","required":true,"visibility":"user-or-llm","description":"The search query text"},"limit":{"type":"number","required":false,"visibility":"user-only","description":"Maximum number of results to return (default: 100)"},"retrievalStrategy":{"type":"string","required":false,"visibility":"user-or-llm","description":"Retrieval strategy: hybrid (default), neural, or keyword"},"expandQuery":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Generate query variations to improve recall"},"rerank":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Reorder results for improved relevance using LLM"},"generateAnswer":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Generate a natural-language answer to the query"}}},"algolia_add_record":{"id":"algolia_add_record","name":"Algolia Add Record","description":"Add or replace a record in an Algolia index","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Admin API Key"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index"},"objectID":{"type":"string","required":false,"visibility":"user-or-llm","description":"Object ID for the record (auto-generated if not provided)"},"record":{"type":"json","required":true,"visibility":"user-or-llm","description":"JSON object representing the record to add"}}},"algolia_batch_operations":{"id":"algolia_batch_operations","name":"Algolia Batch Operations","description":"Perform batch add, update, partial update, or delete operations on records in an Algolia index","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Admin API Key"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index"},"requests":{"type":"json","required":true,"visibility":"user-or-llm","description":"Array of batch operations. Each item has \\"action\\" (addObject, updateObject, partialUpdateObject, partialUpdateObjectNoCreate, deleteObject, delete, clear) and \\"body\\" (the record data; must include objectID for update/delete; use an empty object {} for the index-level delete/clear actions)"}}},"algolia_browse_records":{"id":"algolia_browse_records","name":"Algolia Browse Records","description":"Browse and iterate over all records in an Algolia index using cursor pagination","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia API Key (must have browse ACL)"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index to browse"},"query":{"type":"string","required":false,"visibility":"user-or-llm","description":"Search query to filter browsed records"},"filters":{"type":"string","required":false,"visibility":"user-or-llm","description":"Filter string to narrow down results"},"attributesToRetrieve":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated list of attributes to retrieve"},"hitsPerPage":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of hits per page (default: 1000, max: 1000)"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous browse response for pagination"},"aroundLatLng":{"type":"string","required":false,"visibility":"user-or-llm","description":"Coordinates for geo-search (e.g., \\"40.71,-74.01\\")"},"aroundRadius":{"type":"string","required":false,"visibility":"user-or-llm","description":"Maximum radius in meters for geo-search, or \\"all\\" for unlimited"},"insideBoundingBox":{"type":"json","required":false,"visibility":"user-or-llm","description":"Bounding box coordinates as [[lat1, lng1, lat2, lng2]] for geo-search"},"insidePolygon":{"type":"json","required":false,"visibility":"user-or-llm","description":"Polygon coordinates as [[lat1, lng1, lat2, lng2, lat3, lng3, ...]] for geo-search"}}},"algolia_clear_records":{"id":"algolia_clear_records","name":"Algolia Clear Records","description":"Clear all records from an Algolia index while keeping settings, synonyms, and rules","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Admin API Key (must have deleteIndex ACL)"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index to clear"}}},"algolia_copy_move_index":{"id":"algolia_copy_move_index","name":"Algolia Copy/Move Index","description":"Copy or move an Algolia index to a new destination","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Admin API Key"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the source index"},"operation":{"type":"string","required":true,"visibility":"user-or-llm","description":"Operation to perform: \\"copy\\" or \\"move\\""},"destination":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the destination index"},"scope":{"type":"json","required":false,"visibility":"user-or-llm","description":"Array of scopes to copy (only for \\"copy\\" operation): [\\"settings\\", \\"synonyms\\", \\"rules\\"]. Omit to copy everything including records."}}},"algolia_delete_by_filter":{"id":"algolia_delete_by_filter","name":"Algolia Delete By Filter","description":"Delete all records matching a filter from an Algolia index","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Admin API Key (must have deleteIndex ACL)"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index"},"filters":{"type":"string","required":false,"visibility":"user-or-llm","description":"Filter expression to match records for deletion (e.g., \\"category:outdated\\")"},"facetFilters":{"type":"json","required":false,"visibility":"user-or-llm","description":"Array of facet filters (e.g., [\\"brand:Acme\\"])"},"numericFilters":{"type":"json","required":false,"visibility":"user-or-llm","description":"Array of numeric filters (e.g., [\\"price > 100\\"])"},"tagFilters":{"type":"json","required":false,"visibility":"user-or-llm","description":"Array of tag filters using the _tags attribute (e.g., [\\"published\\"])"},"aroundLatLng":{"type":"string","required":false,"visibility":"user-or-llm","description":"Coordinates for geo-search filter (e.g., \\"40.71,-74.01\\")"},"aroundRadius":{"type":"string","required":false,"visibility":"user-or-llm","description":"Maximum radius in meters for geo-search, or \\"all\\" for unlimited"},"insideBoundingBox":{"type":"json","required":false,"visibility":"user-or-llm","description":"Bounding box coordinates as [[lat1, lng1, lat2, lng2]] for geo-search filter"},"insidePolygon":{"type":"json","required":false,"visibility":"user-or-llm","description":"Polygon coordinates as [[lat1, lng1, lat2, lng2, lat3, lng3, ...]] for geo-search filter"}}},"algolia_delete_index":{"id":"algolia_delete_index","name":"Algolia Delete Index","description":"Delete an entire Algolia index and all its records","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Admin API Key (must have deleteIndex ACL)"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index to delete"}}},"algolia_delete_record":{"id":"algolia_delete_record","name":"Algolia Delete Record","description":"Delete a record by objectID from an Algolia index","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Admin API Key"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index"},"objectID":{"type":"string","required":true,"visibility":"user-or-llm","description":"The objectID of the record to delete"}}},"algolia_get_record":{"id":"algolia_get_record","name":"Algolia Get Record","description":"Get a record by objectID from an Algolia index","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia API Key"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index"},"objectID":{"type":"string","required":true,"visibility":"user-or-llm","description":"The objectID of the record to retrieve"},"attributesToRetrieve":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated list of attributes to retrieve"}}},"algolia_get_records":{"id":"algolia_get_records","name":"Algolia Get Records","description":"Retrieve multiple records by objectID from one or more Algolia indices","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia API Key"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Default index name for all requests"},"requests":{"type":"json","required":true,"visibility":"user-or-llm","description":"Array of objects specifying records to retrieve. Each must have \\"objectID\\" and optionally \\"indexName\\" and \\"attributesToRetrieve\\"."}}},"algolia_get_settings":{"id":"algolia_get_settings","name":"Algolia Get Settings","description":"Retrieve the settings of an Algolia index","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia API Key"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index"}}},"algolia_get_task_status":{"id":"algolia_get_task_status","name":"Algolia Get Task Status","description":"Check whether an Algolia indexing task has finished publishing","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia API Key"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index the task ran against"},"taskID":{"type":"number","required":true,"visibility":"user-or-llm","description":"The taskID returned by a previous write operation"}}},"algolia_list_indices":{"id":"algolia_list_indices","name":"Algolia List Indices","description":"List all indices in an Algolia application","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia API Key"},"page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Page number for paginating indices (default: not paginated)"},"hitsPerPage":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of indices per page (default: 100)"}}},"algolia_partial_update_record":{"id":"algolia_partial_update_record","name":"Algolia Partial Update Record","description":"Partially update a record in an Algolia index without replacing it entirely","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Admin API Key"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index"},"objectID":{"type":"string","required":true,"visibility":"user-or-llm","description":"The objectID of the record to update"},"attributes":{"type":"json","required":true,"visibility":"user-or-llm","description":"JSON object with attributes to update. Supports built-in operations like {\\"stock\\": {\\"_operation\\": \\"Decrement\\", \\"value\\": 1}}"},"createIfNotExists":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Whether to create the record if it does not exist (default: true)"}}},"algolia_search":{"id":"algolia_search","name":"Algolia Search","description":"Search an Algolia index","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia API Key"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index to search"},"query":{"type":"string","required":true,"visibility":"user-or-llm","description":"Search query text"},"hitsPerPage":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of hits per page (default: 20)"},"page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Page number to retrieve (default: 0)"},"filters":{"type":"string","required":false,"visibility":"user-or-llm","description":"Filter string (e.g., \\"category:electronics AND price < 100\\")"},"attributesToRetrieve":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated list of attributes to retrieve"},"facets":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated list of facet attribute names to retrieve counts for (use \\"*\\" for all)"},"getRankingInfo":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Whether to include detailed ranking information in each hit"},"aroundLatLng":{"type":"string","required":false,"visibility":"user-or-llm","description":"Coordinates for geo-search (e.g., \\"40.71,-74.01\\")"},"aroundRadius":{"type":"string","required":false,"visibility":"user-or-llm","description":"Maximum radius in meters for geo-search, or \\"all\\" for unlimited"},"insideBoundingBox":{"type":"json","required":false,"visibility":"user-or-llm","description":"Bounding box coordinates as [[lat1, lng1, lat2, lng2]] for geo-search"},"insidePolygon":{"type":"json","required":false,"visibility":"user-or-llm","description":"Polygon coordinates as [[lat1, lng1, lat2, lng2, lat3, lng3, ...]] for geo-search"}}},"algolia_update_settings":{"id":"algolia_update_settings","name":"Algolia Update Settings","description":"Update the settings of an Algolia index","version":"1.0","params":{"applicationId":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Application ID"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Algolia Admin API Key (must have editSettings ACL)"},"indexName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the Algolia index"},"settings":{"type":"json","required":true,"visibility":"user-or-llm","description":"JSON object with settings to update (e.g., {\\"searchableAttributes\\": [\\"name\\", \\"description\\"], \\"customRanking\\": [\\"desc(popularity)\\"]})"},"forwardToReplicas":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Whether to apply changes to replica indices (default: false)"}}},"amplitude_event_segmentation":{"id":"amplitude_event_segmentation","name":"Amplitude Event Segmentation","description":"Query event analytics data with segmentation. Get event counts, uniques, averages, and more.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"secretKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude Secret Key"},"eventType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Event type name to analyze"},"start":{"type":"string","required":true,"visibility":"user-or-llm","description":"Start date in YYYYMMDD format"},"end":{"type":"string","required":true,"visibility":"user-or-llm","description":"End date in YYYYMMDD format"},"metric":{"type":"string","required":false,"visibility":"user-or-llm","description":"Metric type: uniques, totals, pct_dau, average, histogram, sums, value_avg, or formula (default: uniques)"},"interval":{"type":"string","required":false,"visibility":"user-or-llm","description":"Time interval: 1 (daily), 7 (weekly), or 30 (monthly)"},"groupBy":{"type":"string","required":false,"visibility":"user-or-llm","description":"Property name to group by (prefix custom user properties with \\"gp:\\")"},"groupBy2":{"type":"string","required":false,"visibility":"user-or-llm","description":"Second property name to group by (prefix custom user properties with \\"gp:\\")"},"limit":{"type":"string","required":false,"visibility":"user-or-llm","description":"Maximum number of group-by values (max 1000)"},"filters":{"type":"string","required":false,"visibility":"user-or-llm","description":"JSON array of filter objects applied to the event, e.g. [{\\"subprop_type\\":\\"event\\",\\"subprop_key\\":\\"city\\",\\"subprop_op\\":\\"is\\",\\"subprop_value\\":[\\"San Francisco\\"]}]"},"formula":{"type":"string","required":false,"visibility":"user-or-llm","description":"Required when metric is \\"formula\\", e.g. \\"UNIQUES(A)/UNIQUES(B)\\""},"segment":{"type":"string","required":false,"visibility":"user-or-llm","description":"JSON segment definition(s) applied to the query"},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"amplitude_funnels":{"id":"amplitude_funnels","name":"Amplitude Funnels","description":"Analyze conversion rates and drop-off between a sequence of events.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"secretKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude Secret Key"},"events":{"type":"string","required":true,"visibility":"user-or-llm","description":"JSON array of event objects, one per funnel step in order, e.g. [{\\"event_type\\":\\"signup\\"},{\\"event_type\\":\\"purchase\\"}]"},"start":{"type":"string","required":true,"visibility":"user-or-llm","description":"Start date in YYYYMMDD format"},"end":{"type":"string","required":true,"visibility":"user-or-llm","description":"End date in YYYYMMDD format"},"mode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Funnel ordering: \\"ordered\\", \\"unordered\\", or \\"sequential\\" (default: ordered)"},"userType":{"type":"string","required":false,"visibility":"user-or-llm","description":"User type: \\"new\\" or \\"active\\" (default: active)"},"interval":{"type":"string","required":false,"visibility":"user-or-llm","description":"Time interval: -300000 (real-time), -3600000 (hourly), 1 (daily), 7 (weekly), or 30 (monthly)"},"conversionWindowSeconds":{"type":"string","required":false,"visibility":"user-or-llm","description":"Conversion window in seconds (default: 2592000, i.e. 30 days)"},"groupBy":{"type":"string","required":false,"visibility":"user-or-llm","description":"Property to group by (limit: one; prefix custom properties with \\"gp:\\")"},"limit":{"type":"string","required":false,"visibility":"user-or-llm","description":"Maximum number of group-by values (default: 100, max: 1000)"},"segment":{"type":"string","required":false,"visibility":"user-or-llm","description":"JSON segment definition(s) applied to the query"},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"amplitude_get_active_users":{"id":"amplitude_get_active_users","name":"Amplitude Get Active Users","description":"Get active or new user counts over a date range from the Dashboard REST API.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"secretKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude Secret Key"},"start":{"type":"string","required":true,"visibility":"user-or-llm","description":"Start date in YYYYMMDD format"},"end":{"type":"string","required":true,"visibility":"user-or-llm","description":"End date in YYYYMMDD format"},"metric":{"type":"string","required":false,"visibility":"user-or-llm","description":"Metric type: \\"active\\" or \\"new\\" (default: active)"},"interval":{"type":"string","required":false,"visibility":"user-or-llm","description":"Time interval: 1 (daily), 7 (weekly), or 30 (monthly)"},"groupBy":{"type":"string","required":false,"visibility":"user-or-llm","description":"Property name to group by"},"segment":{"type":"string","required":false,"visibility":"user-or-llm","description":"JSON segment definition(s) applied to the query"},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"amplitude_get_revenue":{"id":"amplitude_get_revenue","name":"Amplitude Get Revenue","description":"Get revenue LTV data including ARPU, ARPPU, total revenue, and paying user counts.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"secretKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude Secret Key"},"start":{"type":"string","required":true,"visibility":"user-or-llm","description":"Start date in YYYYMMDD format"},"end":{"type":"string","required":true,"visibility":"user-or-llm","description":"End date in YYYYMMDD format"},"metric":{"type":"string","required":false,"visibility":"user-or-llm","description":"Metric: 0 (ARPU), 1 (ARPPU), 2 (Total Revenue), 3 (Paying Users)"},"interval":{"type":"string","required":false,"visibility":"user-or-llm","description":"Time interval: 1 (daily), 7 (weekly), or 30 (monthly)"},"groupBy":{"type":"string","required":false,"visibility":"user-or-llm","description":"Property name to group by (limit: one)"},"segment":{"type":"string","required":false,"visibility":"user-or-llm","description":"JSON segment definition(s) applied to the query"},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"amplitude_group_identify":{"id":"amplitude_group_identify","name":"Amplitude Group Identify","description":"Set group-level properties in Amplitude. Supports $set, $setOnce, $add, $append, $unset operations.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"groupType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Group classification (e.g., \\"company\\", \\"org_id\\")"},"groupValue":{"type":"string","required":true,"visibility":"user-or-llm","description":"Specific group identifier (e.g., \\"Acme Corp\\")"},"groupProperties":{"type":"string","required":true,"visibility":"user-or-llm","description":"JSON object of group properties. Use operations like $set, $setOnce, $add, $append, $unset."},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"amplitude_identify_user":{"id":"amplitude_identify_user","name":"Amplitude Identify User","description":"Set user properties in Amplitude using the Identify API. Supports $set, $setOnce, $add, $append, $unset operations.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"userId":{"type":"string","required":false,"visibility":"user-or-llm","description":"User ID (required if no device_id)"},"deviceId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Device ID (required if no user_id)"},"userProperties":{"type":"string","required":true,"visibility":"user-or-llm","description":"JSON object of user properties. Use operations like $set, $setOnce, $add, $append, $unset."},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"amplitude_list_events":{"id":"amplitude_list_events","name":"Amplitude List Events","description":"List all event types in the Amplitude project with their weekly totals and unique counts.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"secretKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude Secret Key"},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"amplitude_realtime_active_users":{"id":"amplitude_realtime_active_users","name":"Amplitude Real-time Active Users","description":"Get real-time active user counts at 5-minute granularity for the last 2 days.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"secretKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude Secret Key"},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"amplitude_retention":{"id":"amplitude_retention","name":"Amplitude Retention","description":"Measure how many users return to perform an action after a starting action.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"secretKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude Secret Key"},"startEvent":{"type":"string","required":true,"visibility":"user-or-llm","description":"JSON starting event object, e.g. {\\"event_type\\":\\"_new\\"} or {\\"event_type\\":\\"_active\\"}"},"returnEvent":{"type":"string","required":true,"visibility":"user-or-llm","description":"JSON returning event object, e.g. {\\"event_type\\":\\"_all\\"} or {\\"event_type\\":\\"_active\\"}"},"start":{"type":"string","required":true,"visibility":"user-or-llm","description":"Start date in YYYYMMDD format"},"end":{"type":"string","required":true,"visibility":"user-or-llm","description":"End date in YYYYMMDD format"},"retentionMode":{"type":"string","required":false,"visibility":"user-or-llm","description":"Retention type: \\"bracket\\", \\"rolling\\", or \\"n-day\\" (default: n-day)"},"retentionBrackets":{"type":"string","required":false,"visibility":"user-or-llm","description":"Required when Retention Mode is \\"bracket\\". Day ranges, e.g. [[0,4]]"},"interval":{"type":"string","required":false,"visibility":"user-or-llm","description":"Time interval: 1 (daily), 7 (weekly), or 30 (monthly)"},"groupBy":{"type":"string","required":false,"visibility":"user-or-llm","description":"Property to group by (limit: one; prefix custom properties with \\"gp:\\")"},"segment":{"type":"string","required":false,"visibility":"user-or-llm","description":"JSON segment definition(s) applied to the query"},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"amplitude_send_event":{"id":"amplitude_send_event","name":"Amplitude Send Event","description":"Track an event in Amplitude using the HTTP V2 API.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"userId":{"type":"string","required":false,"visibility":"user-or-llm","description":"User ID (required if no device_id)"},"deviceId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Device ID (required if no user_id)"},"eventType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the event (e.g., \\"page_view\\", \\"purchase\\")"},"eventProperties":{"type":"string","required":false,"visibility":"user-or-llm","description":"JSON object of custom event properties"},"userProperties":{"type":"string","required":false,"visibility":"user-or-llm","description":"JSON object of user properties to set (supports $set, $setOnce, $add, $append, $unset)"},"time":{"type":"string","required":false,"visibility":"user-or-llm","description":"Event timestamp in milliseconds since epoch"},"sessionId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Session start time in milliseconds since epoch"},"insertId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Unique ID for deduplication (within 7-day window)"},"appVersion":{"type":"string","required":false,"visibility":"user-or-llm","description":"Application version string"},"platform":{"type":"string","required":false,"visibility":"user-or-llm","description":"Platform (e.g., \\"Web\\", \\"iOS\\", \\"Android\\")"},"country":{"type":"string","required":false,"visibility":"user-or-llm","description":"Two-letter country code"},"language":{"type":"string","required":false,"visibility":"user-or-llm","description":"Language code (e.g., \\"en\\")"},"ip":{"type":"string","required":false,"visibility":"user-or-llm","description":"IP address for geo-location"},"price":{"type":"string","required":false,"visibility":"user-or-llm","description":"Price of the item purchased"},"quantity":{"type":"string","required":false,"visibility":"user-or-llm","description":"Quantity of items purchased"},"revenue":{"type":"string","required":false,"visibility":"user-or-llm","description":"Revenue amount"},"productId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Product identifier"},"revenueType":{"type":"string","required":false,"visibility":"user-or-llm","description":"Revenue type (e.g., \\"purchase\\", \\"refund\\")"},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"amplitude_user_activity":{"id":"amplitude_user_activity","name":"Amplitude User Activity","description":"Get the event stream for a specific user by their Amplitude ID.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"secretKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude Secret Key"},"amplitudeId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Amplitude internal user ID"},"offset":{"type":"string","required":false,"visibility":"user-or-llm","description":"Offset for pagination (default 0)"},"limit":{"type":"string","required":false,"visibility":"user-or-llm","description":"Maximum number of events to return (default 1000, max 1000)"},"direction":{"type":"string","required":false,"visibility":"user-or-llm","description":"Sort direction: \\"latest\\" or \\"earliest\\" (default: latest)"},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"amplitude_user_profile":{"id":"amplitude_user_profile","name":"Amplitude User Profile","description":"Get a user profile including properties, cohort memberships, and computed properties. Not available for EU data-residency projects.","version":"1.0.0","params":{"secretKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude Secret Key"},"userId":{"type":"string","required":false,"visibility":"user-or-llm","description":"External user ID (required if no device_id)"},"deviceId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Device ID (required if no user_id)"},"getAmpProps":{"type":"string","required":false,"visibility":"user-or-llm","description":"Include Amplitude user properties (true/false, default: false)"},"getCohortIds":{"type":"string","required":false,"visibility":"user-or-llm","description":"Include cohort IDs the user belongs to (true/false, default: false)"},"getComputations":{"type":"string","required":false,"visibility":"user-or-llm","description":"Include computed user properties (true/false, default: false)"}}},"amplitude_user_search":{"id":"amplitude_user_search","name":"Amplitude User Search","description":"Search for a user by User ID, Device ID, or Amplitude ID using the Dashboard REST API.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude API Key"},"secretKey":{"type":"string","required":true,"visibility":"user-only","description":"Amplitude Secret Key"},"user":{"type":"string","required":true,"visibility":"user-or-llm","description":"User ID, Device ID, or Amplitude ID to search for"},"dataResidency":{"type":"string","required":false,"visibility":"user-or-llm","description":"Data residency region: \\"us\\" (default) or \\"eu\\""}}},"apify_get_dataset_items":{"id":"apify_get_dataset_items","name":"APIFY Get Dataset Items","description":"Retrieve items stored in an APIFY dataset","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"APIFY API token from console.apify.com/account#/integrations"},"datasetId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Dataset ID to read items from. Example: \\"9RnD3Pql2vGZkc5H5\\""},"itemLimit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Max items to return (1-250000). Default: all items. Example: 500"},"offset":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to skip at the start. Default: 0"},"fields":{"type":"string","required":false,"visibility":"user-or-llm","description":"Comma-separated list of fields to include. Example: \\"title,url,price\\""}}},"apify_get_run":{"id":"apify_get_run","name":"APIFY Get Run","description":"Get the status and details of an APIFY actor run","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"APIFY API token from console.apify.com/account#/integrations"},"runId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Actor run ID to fetch. Example: \\"HG7ML7M8z78YcAPEB\\""}}},"apify_run_actor_async":{"id":"apify_run_actor_async","name":"APIFY Run Actor (Async)","description":"Run an APIFY actor asynchronously with polling for long-running tasks","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"APIFY API token from console.apify.com/account#/integrations"},"actorId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Actor ID or username/actor-name. Examples: \\"apify/web-scraper\\", \\"janedoe/my-actor\\", \\"moJRLRc85AitArpNN\\""},"input":{"type":"string","required":false,"visibility":"user-or-llm","description":"Actor input as JSON string. Example: {\\"startUrls\\": [{\\"url\\": \\"https://example.com\\"}], \\"maxPages\\": 10}"},"waitForFinish":{"type":"number","required":false,"visibility":"user-or-llm","description":"Initial wait time in seconds (0-60) before polling starts. Example: 30"},"itemLimit":{"type":"number","required":false,"default":100,"visibility":"user-or-llm","description":"Max dataset items to fetch (1-250000). Default: 100. Example: 500"},"memory":{"type":"number","required":false,"visibility":"user-or-llm","description":"Memory in megabytes allocated for the actor run (128-32768). Example: 1024 for 1GB, 2048 for 2GB"},"timeout":{"type":"number","required":false,"visibility":"user-or-llm","description":"Timeout in seconds for the actor run. Example: 300 for 5 minutes, 3600 for 1 hour"},"build":{"type":"string","required":false,"visibility":"user-or-llm","description":"Actor build to run. Examples: \\"latest\\", \\"beta\\", \\"1.2.3\\", \\"build-tag-name\\""}}},"apify_run_actor_sync":{"id":"apify_run_actor_sync","name":"APIFY Run Actor (Sync)","description":"Run an APIFY actor synchronously and get results (max 5 minutes)","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"APIFY API token from console.apify.com/account#/integrations"},"actorId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Actor ID or username/actor-name. Examples: \\"apify/web-scraper\\", \\"janedoe/my-actor\\", \\"moJRLRc85AitArpNN\\""},"input":{"type":"string","required":false,"visibility":"user-or-llm","description":"Actor input as JSON string. Example: {\\"startUrls\\": [{\\"url\\": \\"https://example.com\\"}], \\"maxPages\\": 10}"},"memory":{"type":"number","required":false,"visibility":"user-or-llm","description":"Memory in megabytes allocated for the actor run (128-32768). Example: 1024 for 1GB, 2048 for 2GB"},"timeout":{"type":"number","required":false,"visibility":"user-or-llm","description":"Timeout in seconds for the actor run. Example: 300 for 5 minutes, 3600 for 1 hour"},"build":{"type":"string","required":false,"visibility":"user-or-llm","description":"Actor build to run. Examples: \\"latest\\", \\"beta\\", \\"1.2.3\\", \\"build-tag-name\\""}}},"apify_run_task":{"id":"apify_run_task","name":"APIFY Run Task","description":"Run a saved APIFY actor task synchronously and get dataset items (max 5 minutes)","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"APIFY API token from console.apify.com/account#/integrations"},"taskId":{"type":"string","required":true,"visibility":"user-or-llm","description":"Task ID or username/task-name. Examples: \\"janedoe/my-task\\", \\"moJRLRc85AitArpNN\\""},"input":{"type":"string","required":false,"visibility":"user-or-llm","description":"JSON string that overrides the task\'s saved input. Example: {\\"startUrls\\": [{\\"url\\": \\"https://example.com\\"}]}"},"itemLimit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Max dataset items to return (1-250000). Example: 500"},"memory":{"type":"number","required":false,"visibility":"user-or-llm","description":"Memory in megabytes allocated for the run (128-32768). Example: 1024 for 1GB"},"timeout":{"type":"number","required":false,"visibility":"user-or-llm","description":"Timeout in seconds for the run. Example: 300 for 5 minutes"},"build":{"type":"string","required":false,"visibility":"user-or-llm","description":"Actor build to run. Examples: \\"latest\\", \\"beta\\", \\"1.2.3\\""}}},"apollo_account_bulk_create":{"id":"apollo_account_bulk_create","name":"Apollo Bulk Create Accounts","description":"Create up to 100 accounts at once in your Apollo database. Set run_dedupe=true to deduplicate by domain, organization_id, and name. Master key required.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"},"accounts":{"type":"array","required":true,"visibility":"user-or-llm","description":"Array of accounts to create (max 100). Each account should include a name, and may optionally include domain, phone, phone_status_cd, raw_address, owner_id, linkedin_url, facebook_url, twitter_url, salesforce_id, and hubspot_id."},"append_label_names":{"type":"array","required":false,"visibility":"user-only","description":"Array of label names to add to ALL accounts in this request"},"run_dedupe":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"When true, performs aggressive deduplication by domain, organization_id, and name (defaults to false)"}}},"apollo_account_bulk_update":{"id":"apollo_account_bulk_update","name":"Apollo Bulk Update Accounts","description":"Update up to 1000 existing accounts at once in your Apollo database (higher limit than contacts!). Each account must include an id field. Master key required.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"},"account_ids":{"type":"array","required":false,"visibility":"user-or-llm","description":"Array of account IDs to update with the same values (max 1000). Use with name/owner_id for uniform updates. Use either this OR account_attributes."},"name":{"type":"string","required":false,"visibility":"user-or-llm","description":"When using account_ids, apply this name to all accounts"},"owner_id":{"type":"string","required":false,"visibility":"user-or-llm","description":"When using account_ids, apply this owner to all accounts"},"account_stage_id":{"type":"string","required":false,"visibility":"user-or-llm","description":"When using account_ids, apply this account stage to all accounts"},"account_attributes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Array of account objects with individual updates (each must include id). Example: [{\\"id\\": \\"acc1\\", \\"name\\": \\"Acme\\", \\"owner_id\\": \\"u1\\", \\"account_stage_id\\": \\"s1\\", \\"typed_custom_fields\\": {\\"field_id\\": \\"value\\"}}]"},"async":{"type":"boolean","required":false,"visibility":"user-only","description":"When true, processes the update asynchronously. Only supported when using account_ids; returns 422 if used with account_attributes."}}},"apollo_account_create":{"id":"apollo_account_create","name":"Apollo Create Account","description":"Create a new account (company) in your Apollo database","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Company name (e.g., \\"Acme Corporation\\")"},"domain":{"type":"string","required":false,"visibility":"user-or-llm","description":"Company domain without www. prefix (e.g., \\"acme.com\\")"},"phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Primary phone number for the account"},"owner_id":{"type":"string","required":false,"visibility":"user-only","description":"Apollo user ID of the account owner"},"account_stage_id":{"type":"string","required":false,"visibility":"user-only","description":"Apollo ID for the account stage to assign this account to"},"raw_address":{"type":"string","required":false,"visibility":"user-or-llm","description":"Corporate location (e.g., \\"San Francisco, CA, USA\\")"},"typed_custom_fields":{"type":"json","required":false,"visibility":"user-only","description":"Custom field values as { custom_field_id: value } map"}}},"apollo_account_search":{"id":"apollo_account_search","name":"Apollo Search Accounts","description":"Search your team\'s accounts in Apollo. Display limit: 50,000 records (100 records per page, 500 pages max). Use filters to narrow results. Master key required.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"},"q_organization_name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Filter accounts by organization name (partial-match search)"},"account_stage_ids":{"type":"array","required":false,"visibility":"user-only","description":"Filter by account stage IDs"},"account_label_ids":{"type":"array","required":false,"visibility":"user-only","description":"Filter by account label IDs"},"sort_by_field":{"type":"string","required":false,"visibility":"user-or-llm","description":"Sort field: \\"account_last_activity_date\\", \\"account_created_at\\", or \\"account_updated_at\\""},"sort_ascending":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Sort ascending when true. Defaults to descending."},"page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Page number for pagination (e.g., 1, 2, 3)"},"per_page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Results per page, max 100 (e.g., 25, 50, 100)"}}},"apollo_account_update":{"id":"apollo_account_update","name":"Apollo Update Account","description":"Update an existing account in your Apollo database","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"account_id":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the account to update (e.g., \\"acc_abc123\\")"},"name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Company name (e.g., \\"Acme Corporation\\")"},"domain":{"type":"string","required":false,"visibility":"user-or-llm","description":"Company domain (e.g., \\"acme.com\\")"},"phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Company phone number"},"owner_id":{"type":"string","required":false,"visibility":"user-only","description":"Apollo user ID of the account owner"},"account_stage_id":{"type":"string","required":false,"visibility":"user-only","description":"Apollo ID for the account stage to assign this account to"},"raw_address":{"type":"string","required":false,"visibility":"user-or-llm","description":"Corporate location (e.g., \\"San Francisco, CA, USA\\")"},"typed_custom_fields":{"type":"json","required":false,"visibility":"user-only","description":"Custom field values as { custom_field_id: value } map"}}},"apollo_contact_bulk_create":{"id":"apollo_contact_bulk_create","name":"Apollo Bulk Create Contacts","description":"Create up to 100 contacts at once in your Apollo database. Supports deduplication to prevent creating duplicate contacts. Master key required.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"},"contacts":{"type":"array","required":true,"visibility":"user-or-llm","description":"Array of contacts to create (max 100). Each contact may include first_name, last_name, email, title, organization_name, account_id, owner_id, contact_stage_id, linkedin_url, phone (single string) or phone_numbers (array of {raw_number, position}), contact_emails, typed_custom_fields, and CRM IDs (salesforce_contact_id, hubspot_id, team_id) for cross-system matching"},"append_label_names":{"type":"array","required":false,"visibility":"user-or-llm","description":"Label names to add to all contacts in this request (e.g., [\\"Hot Lead\\"])"},"run_dedupe":{"type":"boolean","required":false,"visibility":"user-only","description":"Enable deduplication to prevent creating duplicate contacts. When true, existing contacts are returned without modification"}}},"apollo_contact_bulk_update":{"id":"apollo_contact_bulk_update","name":"Apollo Bulk Update Contacts","description":"Update up to 100 existing contacts at once in your Apollo database. Each contact must include an id field. Master key required.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"},"contact_ids":{"type":"array","required":false,"visibility":"user-or-llm","description":"Array of contact IDs to update. Must be paired with an object-form contact_attributes specifying the fields to apply uniformly to all listed contacts."},"contact_attributes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Required. Either an array of per-contact updates (each with id) — used standalone — or a single object of attributes to apply to all contact_ids. Supported fields: owner_id, email, organization_name, title, first_name, last_name, account_id, present_raw_address, linkedin_url, typed_custom_fields"},"async":{"type":"boolean","required":false,"visibility":"user-only","description":"Force asynchronous processing. Automatically enabled for >100 contacts"}}},"apollo_contact_create":{"id":"apollo_contact_create","name":"Apollo Create Contact","description":"Create a new contact in your Apollo database","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"first_name":{"type":"string","required":true,"visibility":"user-or-llm","description":"First name of the contact"},"last_name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Last name of the contact"},"email":{"type":"string","required":false,"visibility":"user-or-llm","description":"Email address of the contact"},"title":{"type":"string","required":false,"visibility":"user-or-llm","description":"Job title (e.g., \\"VP of Sales\\", \\"Software Engineer\\")"},"account_id":{"type":"string","required":false,"visibility":"user-or-llm","description":"Apollo account ID to associate with (e.g., \\"acc_abc123\\")"},"owner_id":{"type":"string","required":false,"visibility":"user-only","description":"User ID of the contact owner (accepted by Apollo but not officially documented for POST /contacts)"},"organization_name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Name of the contact\'s employer (e.g., \\"Apollo\\")"},"website_url":{"type":"string","required":false,"visibility":"user-or-llm","description":"Corporate website URL (e.g., \\"https://www.apollo.io/\\")"},"label_names":{"type":"array","required":false,"visibility":"user-or-llm","description":"Lists/labels to add the contact to (e.g., [\\"Prospects\\"])"},"contact_stage_id":{"type":"string","required":false,"visibility":"user-or-llm","description":"Apollo ID for the contact stage"},"present_raw_address":{"type":"string","required":false,"visibility":"user-or-llm","description":"Personal location for the contact (e.g., \\"Atlanta, United States\\")"},"direct_phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Primary phone number"},"corporate_phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Work/office phone number"},"mobile_phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Mobile phone number"},"home_phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Home phone number"},"other_phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Alternative phone number"},"typed_custom_fields":{"type":"json","required":false,"visibility":"user-or-llm","description":"Custom field values keyed by custom field ID"},"run_dedupe":{"type":"boolean","required":false,"visibility":"user-only","description":"When true, Apollo deduplicates against existing contacts"}}},"apollo_contact_search":{"id":"apollo_contact_search","name":"Apollo Search Contacts","description":"Search your team\'s contacts in Apollo","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"q_keywords":{"type":"string","required":false,"visibility":"user-or-llm","description":"Keywords to search for"},"contact_stage_ids":{"type":"array","required":false,"visibility":"user-only","description":"Filter by contact stage IDs"},"contact_label_ids":{"type":"array","required":false,"visibility":"user-only","description":"Filter by Apollo label IDs (lists)"},"sort_by_field":{"type":"string","required":false,"visibility":"user-only","description":"Sort field: contact_last_activity_date, contact_email_last_opened_at, contact_email_last_clicked_at, contact_created_at, or contact_updated_at"},"sort_ascending":{"type":"boolean","required":false,"visibility":"user-only","description":"When true, sort ascending. Must be used together with sort_by_field"},"page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Page number for pagination (e.g., 1, 2, 3)"},"per_page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Results per page, max 100 (e.g., 25, 50, 100)"}}},"apollo_contact_update":{"id":"apollo_contact_update","name":"Apollo Update Contact","description":"Update an existing contact in your Apollo database","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"contact_id":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the contact to update (e.g., \\"con_abc123\\")"},"first_name":{"type":"string","required":false,"visibility":"user-or-llm","description":"First name of the contact"},"last_name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Last name of the contact"},"email":{"type":"string","required":false,"visibility":"user-or-llm","description":"Email address"},"title":{"type":"string","required":false,"visibility":"user-or-llm","description":"Job title (e.g., \\"VP of Sales\\", \\"Software Engineer\\")"},"account_id":{"type":"string","required":false,"visibility":"user-or-llm","description":"Apollo account ID (e.g., \\"acc_abc123\\")"},"owner_id":{"type":"string","required":false,"visibility":"user-only","description":"User ID of the contact owner (accepted by Apollo but not officially documented for PATCH /contacts/{id})"},"organization_name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Name of the contact\'s employer (e.g., \\"Apollo\\")"},"website_url":{"type":"string","required":false,"visibility":"user-or-llm","description":"Corporate website URL (e.g., \\"https://www.apollo.io/\\")"},"label_names":{"type":"array","required":false,"visibility":"user-or-llm","description":"Lists/labels to add the contact to (e.g., [\\"Prospects\\"])"},"contact_stage_id":{"type":"string","required":false,"visibility":"user-or-llm","description":"Apollo ID for the contact stage"},"present_raw_address":{"type":"string","required":false,"visibility":"user-or-llm","description":"Personal location for the contact (e.g., \\"Atlanta, United States\\")"},"direct_phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Primary phone number"},"corporate_phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Work/office phone number"},"mobile_phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Mobile phone number"},"home_phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Home phone number"},"other_phone":{"type":"string","required":false,"visibility":"user-or-llm","description":"Alternative phone number"},"typed_custom_fields":{"type":"json","required":false,"visibility":"user-or-llm","description":"Custom field values keyed by custom field ID"}}},"apollo_email_accounts":{"id":"apollo_email_accounts","name":"Apollo Get Email Accounts","description":"Get list of team\'s linked email accounts in Apollo","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"}}},"apollo_opportunity_create":{"id":"apollo_opportunity_create","name":"Apollo Create Opportunity","description":"Create a new deal for an account in your Apollo database (master key required)","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the opportunity/deal (e.g., \\"Enterprise License - Q1\\")"},"account_id":{"type":"string","required":false,"visibility":"user-or-llm","description":"ID of the account this opportunity belongs to (e.g., \\"acc_abc123\\")"},"amount":{"type":"string","required":false,"visibility":"user-or-llm","description":"Monetary value as a plain number string with no commas or currency symbols"},"opportunity_stage_id":{"type":"string","required":false,"visibility":"user-only","description":"ID of the opportunity stage"},"owner_id":{"type":"string","required":false,"visibility":"user-only","description":"User ID of the opportunity owner"},"closed_date":{"type":"string","required":false,"visibility":"user-or-llm","description":"Expected close date in YYYY-MM-DD format"},"typed_custom_fields":{"type":"json","required":false,"visibility":"user-only","description":"Custom field values as { custom_field_id: value } map"}}},"apollo_opportunity_get":{"id":"apollo_opportunity_get","name":"Apollo Get Opportunity","description":"Retrieve complete details of a specific deal/opportunity by ID","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"opportunity_id":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the opportunity to retrieve (e.g., \\"opp_abc123\\")"}}},"apollo_opportunity_search":{"id":"apollo_opportunity_search","name":"Apollo Search Opportunities","description":"Search and list all deals/opportunities in your team\'s Apollo account","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"sort_by_field":{"type":"string","required":false,"visibility":"user-or-llm","description":"Sort field: \\"amount\\", \\"is_closed\\", or \\"is_won\\""},"page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Page number for pagination (e.g., 1, 2, 3)"},"per_page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Results per page, max 100 (e.g., 25, 50, 100)"}}},"apollo_opportunity_update":{"id":"apollo_opportunity_update","name":"Apollo Update Opportunity","description":"Update an existing deal/opportunity in your Apollo database","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"opportunity_id":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the opportunity to update (e.g., \\"opp_abc123\\")"},"name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Name of the opportunity/deal (e.g., \\"Enterprise License - Q1\\")"},"amount":{"type":"string","required":false,"visibility":"user-or-llm","description":"Monetary value as a plain number string with no commas or currency symbols"},"opportunity_stage_id":{"type":"string","required":false,"visibility":"user-only","description":"ID of the opportunity stage"},"owner_id":{"type":"string","required":false,"visibility":"user-only","description":"User ID of the opportunity owner"},"closed_date":{"type":"string","required":false,"visibility":"user-or-llm","description":"Expected close date in YYYY-MM-DD format"},"typed_custom_fields":{"type":"json","required":false,"visibility":"user-only","description":"Custom field values as { custom_field_id: value } map"}}},"apollo_organization_bulk_enrich":{"id":"apollo_organization_bulk_enrich","name":"Apollo Bulk Organization Enrichment","description":"Enrich data for up to 10 organizations at once using Apollo","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"domains":{"type":"array","required":true,"visibility":"user-or-llm","description":"Array of company domains to enrich (max 10, no www. or @, e.g., [\\"apollo.io\\", \\"stripe.com\\"])"}}},"apollo_organization_enrich":{"id":"apollo_organization_enrich","name":"Apollo Organization Enrichment","description":"Enrich data for a single organization using Apollo","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"domain":{"type":"string","required":true,"visibility":"user-or-llm","description":"Company domain (e.g., \\"apollo.io\\", \\"acme.com\\")"}}},"apollo_organization_search":{"id":"apollo_organization_search","name":"Apollo Organization Search","description":"Search Apollo\'s database for companies using filters","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"organization_locations":{"type":"array","required":false,"visibility":"user-or-llm","description":"Company HQ locations (cities, US states, or countries)"},"organization_not_locations":{"type":"array","required":false,"visibility":"user-or-llm","description":"Exclude companies whose HQ is in these locations"},"organization_num_employees_ranges":{"type":"array","required":false,"visibility":"user-or-llm","description":"Employee count ranges as \\"min,max\\" strings (e.g., [\\"1,10\\", \\"250,500\\", \\"10000,20000\\"])"},"q_organization_keyword_tags":{"type":"array","required":false,"visibility":"user-or-llm","description":"Industry or keyword tags"},"q_organization_name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Organization name to search for (e.g., \\"Acme\\", \\"TechCorp\\")"},"organization_ids":{"type":"array","required":false,"visibility":"user-or-llm","description":"Apollo organization IDs to include (e.g., [\\"5e66b6381e05b4008c8331b8\\"])"},"q_organization_domains_list":{"type":"array","required":false,"visibility":"user-or-llm","description":"Domain names to filter by (no www. or @, up to 1,000)"},"page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Page number for pagination (e.g., 1, 2, 3)"},"per_page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Results per page, max 100 (e.g., 25, 50, 100)"}}},"apollo_people_bulk_enrich":{"id":"apollo_people_bulk_enrich","name":"Apollo Bulk People Enrichment","description":"Enrich data for up to 10 people at once using Apollo","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"people":{"type":"array","required":true,"visibility":"user-or-llm","description":"Array of people to enrich (max 10)"},"reveal_personal_emails":{"type":"boolean","required":false,"visibility":"user-only","description":"Reveal personal email addresses (uses credits)"},"reveal_phone_number":{"type":"boolean","required":false,"visibility":"user-only","description":"Reveal phone numbers (uses credits, requires webhook_url)"},"webhook_url":{"type":"string","required":false,"visibility":"user-only","description":"Webhook URL for async phone number delivery (required when reveal_phone_number is true)"}}},"apollo_people_enrich":{"id":"apollo_people_enrich","name":"Apollo People Enrichment","description":"Enrich data for a single person using Apollo","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"first_name":{"type":"string","required":false,"visibility":"user-or-llm","description":"First name of the person"},"last_name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Last name of the person"},"name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Full name of the person (alternative to first_name/last_name)"},"id":{"type":"string","required":false,"visibility":"user-or-llm","description":"Apollo ID for the person"},"hashed_email":{"type":"string","required":false,"visibility":"user-or-llm","description":"MD5 or SHA-256 hashed email"},"email":{"type":"string","required":false,"visibility":"user-or-llm","description":"Email address of the person"},"organization_name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Company name where the person works"},"domain":{"type":"string","required":false,"visibility":"user-or-llm","description":"Company domain (e.g., \\"apollo.io\\", \\"acme.com\\")"},"linkedin_url":{"type":"string","required":false,"visibility":"user-or-llm","description":"LinkedIn profile URL"},"reveal_personal_emails":{"type":"boolean","required":false,"visibility":"user-only","description":"Reveal personal email addresses (uses credits)"},"reveal_phone_number":{"type":"boolean","required":false,"visibility":"user-only","description":"Reveal phone numbers (uses credits, requires webhook_url)"},"webhook_url":{"type":"string","required":false,"visibility":"user-only","description":"Webhook URL for async phone number delivery (required when reveal_phone_number is true)"}}},"apollo_people_search":{"id":"apollo_people_search","name":"Apollo People Search","description":"Search Apollo\'s database for people using demographic filters","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key"},"person_titles":{"type":"array","required":false,"visibility":"user-or-llm","description":"Job titles to search for (e.g., [\\"CEO\\", \\"VP of Sales\\"])"},"include_similar_titles":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Whether to return people with job titles similar to person_titles"},"person_locations":{"type":"array","required":false,"visibility":"user-or-llm","description":"Locations to search in (e.g., [\\"San Francisco, CA\\", \\"New York, NY\\"])"},"person_seniorities":{"type":"array","required":false,"visibility":"user-or-llm","description":"Seniority levels (one of: owner, founder, c_suite, partner, vp, head, director, manager, senior, entry, intern)"},"organization_ids":{"type":"array","required":false,"visibility":"user-or-llm","description":"Apollo organization IDs to filter by (e.g., [\\"5e66b6381e05b4008c8331b8\\"])"},"organization_names":{"type":"array","required":false,"visibility":"user-or-llm","description":"Company names to search within (legacy filter)"},"organization_locations":{"type":"array","required":false,"visibility":"user-or-llm","description":"Headquarters locations of the people\'s current employer (e.g., [\'texas\', \'tokyo\', \'spain\'])"},"q_organization_domains_list":{"type":"array","required":false,"visibility":"user-or-llm","description":"Employer domain names (e.g., [\\"apollo.io\\", \\"microsoft.com\\"]) — up to 1,000, no www. or @"},"organization_num_employees_ranges":{"type":"array","required":false,"visibility":"user-or-llm","description":"Employee count ranges for the person\'s current employer. Each entry is \\"min,max\\" (e.g., [\\"1,10\\", \\"250,500\\", \\"10000,20000\\"])"},"contact_email_status":{"type":"array","required":false,"visibility":"user-or-llm","description":"Email statuses to filter by: \\"verified\\", \\"unverified\\", \\"likely to engage\\", \\"unavailable\\""},"q_keywords":{"type":"string","required":false,"visibility":"user-or-llm","description":"Keywords to search for"},"page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Page number for pagination, default 1 (e.g., 1, 2, 3)"},"per_page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Results per page, default 25, max 100 (e.g., 25, 50, 100)"}}},"apollo_sequence_add_contacts":{"id":"apollo_sequence_add_contacts","name":"Apollo Add Contacts to Sequence","description":"Add contacts to an Apollo sequence","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"},"sequence_id":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the sequence to add contacts to (e.g., \\"seq_abc123\\")"},"contact_ids":{"type":"array","required":false,"visibility":"user-or-llm","description":"Array of contact IDs to add to the sequence (e.g., [\\"con_abc123\\", \\"con_def456\\"]). Either contact_ids or label_names must be provided."},"label_names":{"type":"array","required":false,"visibility":"user-or-llm","description":"Array of label names to identify contacts to add to the sequence. Either contact_ids or label_names must be provided."},"send_email_from_email_account_id":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the email account to send from. Use the Get Email Accounts operation to look this up."},"send_email_from_email_address":{"type":"string","required":false,"visibility":"user-only","description":"Specific email address to send from within the email account."},"sequence_no_email":{"type":"boolean","required":false,"visibility":"user-only","description":"Add contacts even if they have no email address"},"sequence_unverified_email":{"type":"boolean","required":false,"visibility":"user-only","description":"Add contacts with unverified email addresses"},"sequence_job_change":{"type":"boolean","required":false,"visibility":"user-only","description":"Add contacts who recently changed jobs"},"sequence_active_in_other_campaigns":{"type":"boolean","required":false,"visibility":"user-only","description":"Add contacts active in other campaigns"},"sequence_finished_in_other_campaigns":{"type":"boolean","required":false,"visibility":"user-only","description":"Add contacts who finished other campaigns"},"sequence_same_company_in_same_campaign":{"type":"boolean","required":false,"visibility":"user-only","description":"Add contacts even if others from the same company are in the sequence"},"contacts_without_ownership_permission":{"type":"boolean","required":false,"visibility":"user-only","description":"Add contacts without ownership permission"},"add_if_in_queue":{"type":"boolean","required":false,"visibility":"user-only","description":"Add contacts even if they are in the queue"},"contact_verification_skipped":{"type":"boolean","required":false,"visibility":"user-only","description":"Skip contact verification when adding"},"user_id":{"type":"string","required":false,"visibility":"user-only","description":"ID of the user performing the action"},"status":{"type":"string","required":false,"visibility":"user-only","description":"Initial status for added contacts: \\"active\\" or \\"paused\\""},"auto_unpause_at":{"type":"string","required":false,"visibility":"user-only","description":"ISO 8601 datetime to automatically unpause contacts"}}},"apollo_sequence_search":{"id":"apollo_sequence_search","name":"Apollo Search Sequences","description":"Search for sequences/campaigns in your team\'s Apollo account (master key required)","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"},"q_name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Search sequences by name (e.g., \\"Outbound Q1\\", \\"Follow-up\\")"},"page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Page number for pagination (e.g., 1, 2, 3)"},"per_page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Results per page, max 100 (e.g., 25, 50, 100)"}}},"apollo_task_create":{"id":"apollo_task_create","name":"Apollo Create Task","description":"Create one or more tasks in Apollo (one task per contact_id, master key required)","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"},"user_id":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the Apollo user the task is assigned to"},"contact_ids":{"type":"array","required":true,"visibility":"user-or-llm","description":"Array of contact IDs. One task is created per contact."},"priority":{"type":"string","required":false,"visibility":"user-or-llm","description":"Task priority: \\"high\\", \\"medium\\", or \\"low\\" (defaults to \\"medium\\")"},"due_at":{"type":"string","required":true,"visibility":"user-or-llm","description":"Due date/time in ISO 8601 format (e.g., \\"2024-12-31T23:59:59Z\\")"},"type":{"type":"string","required":true,"visibility":"user-or-llm","description":"Task type: \\"call\\", \\"outreach_manual_email\\", \\"linkedin_step_connect\\", \\"linkedin_step_message\\", \\"linkedin_step_view_profile\\", \\"linkedin_step_interact_post\\", or \\"action_item\\""},"status":{"type":"string","required":true,"visibility":"user-or-llm","description":"Task status: \\"scheduled\\", \\"completed\\", or \\"skipped\\""},"note":{"type":"string","required":false,"visibility":"user-or-llm","description":"Free-form note providing context for the task"}}},"apollo_task_search":{"id":"apollo_task_search","name":"Apollo Search Tasks","description":"Search for tasks in Apollo","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"},"sort_by_field":{"type":"string","required":false,"visibility":"user-or-llm","description":"Sort field: \\"task_due_at\\" or \\"task_priority\\""},"open_factor_names":{"type":"array","required":false,"visibility":"user-or-llm","description":"Filter by status. Common values: [\\"task_types\\"] for open tasks, [\\"task_completed_at\\"] for completed tasks."},"page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Page number for pagination (e.g., 1, 2, 3)"},"per_page":{"type":"number","required":false,"visibility":"user-or-llm","description":"Results per page, max 100 (e.g., 25, 50, 100)"}}},"appconfig_create_application":{"id":"appconfig_create_application","name":"AppConfig Create Application","description":"Create an application in AWS AppConfig","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the application to create"},"description":{"type":"string","required":false,"visibility":"user-or-llm","description":"Description of the application"}}},"appconfig_create_configuration_profile":{"id":"appconfig_create_configuration_profile","name":"AppConfig Create Configuration Profile","description":"Create a configuration profile in an AWS AppConfig application","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID to create the configuration profile in"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the configuration profile"},"locationUri":{"type":"string","required":true,"visibility":"user-or-llm","description":"Where the configuration is stored. Use \\"hosted\\" for AppConfig-hosted configurations, or an SSM/S3 URI"},"description":{"type":"string","required":false,"visibility":"user-or-llm","description":"Description of the configuration profile"},"retrievalRoleArn":{"type":"string","required":false,"visibility":"user-or-llm","description":"ARN of an IAM role to retrieve the configuration (required for non-hosted URIs)"},"type":{"type":"string","required":false,"visibility":"user-or-llm","description":"Profile type: AWS.Freeform (default) or AWS.AppConfig.FeatureFlags"}}},"appconfig_create_environment":{"id":"appconfig_create_environment","name":"AppConfig Create Environment","description":"Create an environment for an AWS AppConfig application","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID to create the environment in"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the environment to create"},"description":{"type":"string","required":false,"visibility":"user-or-llm","description":"Description of the environment"}}},"appconfig_create_hosted_configuration_version":{"id":"appconfig_create_hosted_configuration_version","name":"AppConfig Create Hosted Configuration Version","description":"Create a new hosted configuration version for an AppConfig configuration profile","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the configuration profile"},"configurationProfileId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The configuration profile ID to add the version to"},"content":{"type":"string","required":true,"visibility":"user-or-llm","description":"The configuration content (e.g., a JSON or YAML document)"},"contentType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Content type of the configuration (e.g., application/json, text/plain)"},"description":{"type":"string","required":false,"visibility":"user-or-llm","description":"Description of the configuration version"},"latestVersionNumber":{"type":"number","required":false,"visibility":"user-or-llm","description":"The version number of the latest version, used for optimistic concurrency"},"versionLabel":{"type":"string","required":false,"visibility":"user-or-llm","description":"A user-defined label for the configuration version"}}},"appconfig_delete_application":{"id":"appconfig_delete_application","name":"AppConfig Delete Application","description":"Delete an AWS AppConfig application","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID to delete"}}},"appconfig_delete_configuration_profile":{"id":"appconfig_delete_configuration_profile","name":"AppConfig Delete Configuration Profile","description":"Delete an AWS AppConfig configuration profile","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the configuration profile"},"configurationProfileId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The configuration profile ID to delete"}}},"appconfig_delete_environment":{"id":"appconfig_delete_environment","name":"AppConfig Delete Environment","description":"Delete an AWS AppConfig environment","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the environment"},"environmentId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The environment ID to delete"}}},"appconfig_delete_hosted_configuration_version":{"id":"appconfig_delete_hosted_configuration_version","name":"AppConfig Delete Hosted Configuration Version","description":"Delete a specific hosted configuration version from an AppConfig profile","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the configuration profile"},"configurationProfileId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The configuration profile ID that owns the version"},"versionNumber":{"type":"number","required":true,"visibility":"user-or-llm","description":"The version number to delete"}}},"appconfig_get_application":{"id":"appconfig_get_application","name":"AppConfig Get Application","description":"Get details about a single AWS AppConfig application","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID to retrieve"}}},"appconfig_get_configuration":{"id":"appconfig_get_configuration","name":"AppConfig Get Configuration","description":"Retrieve the latest deployed configuration for an AppConfig application, environment, and profile","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID or name to retrieve configuration for"},"environmentId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The environment ID or name to retrieve configuration for"},"configurationProfileId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The configuration profile ID or name to retrieve"}}},"appconfig_get_configuration_profile":{"id":"appconfig_get_configuration_profile","name":"AppConfig Get Configuration Profile","description":"Get details about a single AWS AppConfig configuration profile","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the configuration profile"},"configurationProfileId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The configuration profile ID to retrieve"}}},"appconfig_get_deployment":{"id":"appconfig_get_deployment","name":"AppConfig Get Deployment","description":"Get details about a specific AWS AppConfig deployment","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID of the deployment"},"environmentId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The environment ID of the deployment"},"deploymentNumber":{"type":"number","required":true,"visibility":"user-or-llm","description":"The sequence number of the deployment"}}},"appconfig_get_environment":{"id":"appconfig_get_environment","name":"AppConfig Get Environment","description":"Get details about a single AWS AppConfig environment","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the environment"},"environmentId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The environment ID to retrieve"}}},"appconfig_get_hosted_configuration_version":{"id":"appconfig_get_hosted_configuration_version","name":"AppConfig Get Hosted Configuration Version","description":"Retrieve a specific hosted configuration version from an AppConfig profile","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the configuration profile"},"configurationProfileId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The configuration profile ID to read the version from"},"versionNumber":{"type":"number","required":true,"visibility":"user-or-llm","description":"The version number to retrieve"}}},"appconfig_list_applications":{"id":"appconfig_list_applications","name":"AppConfig List Applications","description":"List applications in AWS AppConfig","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"maxResults":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of applications to return (1-50)"},"nextToken":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pagination token from a previous response"}}},"appconfig_list_configuration_profiles":{"id":"appconfig_list_configuration_profiles","name":"AppConfig List Configuration Profiles","description":"List configuration profiles for an AWS AppConfig application","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the configuration profiles"},"maxResults":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of configuration profiles to return (1-50)"},"nextToken":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pagination token from a previous response"}}},"appconfig_list_deployment_strategies":{"id":"appconfig_list_deployment_strategies","name":"AppConfig List Deployment Strategies","description":"List deployment strategies available in AWS AppConfig","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"maxResults":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of deployment strategies to return (1-50)"},"nextToken":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pagination token from a previous response"}}},"appconfig_list_deployments":{"id":"appconfig_list_deployments","name":"AppConfig List Deployments","description":"List deployments for an AWS AppConfig environment","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID of the deployments"},"environmentId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The environment ID of the deployments"},"maxResults":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of deployments to return (1-50)"},"nextToken":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pagination token from a previous response"}}},"appconfig_list_environments":{"id":"appconfig_list_environments","name":"AppConfig List Environments","description":"List environments for an AWS AppConfig application","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the environments"},"maxResults":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of environments to return (1-50)"},"nextToken":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pagination token from a previous response"}}},"appconfig_list_hosted_configuration_versions":{"id":"appconfig_list_hosted_configuration_versions","name":"AppConfig List Hosted Configuration Versions","description":"List hosted configuration versions for an AWS AppConfig configuration profile","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the configuration profile"},"configurationProfileId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The configuration profile ID to list versions for"},"maxResults":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of versions to return (1-50)"},"nextToken":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pagination token from a previous response"}}},"appconfig_start_deployment":{"id":"appconfig_start_deployment","name":"AppConfig Start Deployment","description":"Start deploying a configuration version to an AWS AppConfig environment","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID to deploy in"},"environmentId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The environment ID to deploy to"},"deploymentStrategyId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The deployment strategy ID to use"},"configurationProfileId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The configuration profile ID to deploy"},"configurationVersion":{"type":"string","required":true,"visibility":"user-or-llm","description":"The configuration version to deploy"},"description":{"type":"string","required":false,"visibility":"user-or-llm","description":"Description of the deployment"}}},"appconfig_stop_deployment":{"id":"appconfig_stop_deployment","name":"AppConfig Stop Deployment","description":"Stop an in-progress AWS AppConfig deployment","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID of the deployment"},"environmentId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The environment ID of the deployment"},"deploymentNumber":{"type":"number","required":true,"visibility":"user-or-llm","description":"The sequence number of the deployment to stop"}}},"appconfig_update_application":{"id":"appconfig_update_application","name":"AppConfig Update Application","description":"Update the name or description of an AWS AppConfig application","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID to update"},"name":{"type":"string","required":false,"visibility":"user-or-llm","description":"New name for the application"},"description":{"type":"string","required":false,"visibility":"user-or-llm","description":"New description for the application"}}},"appconfig_update_configuration_profile":{"id":"appconfig_update_configuration_profile","name":"AppConfig Update Configuration Profile","description":"Update the name, description, or retrieval role of an AppConfig configuration profile","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the configuration profile"},"configurationProfileId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The configuration profile ID to update"},"name":{"type":"string","required":false,"visibility":"user-or-llm","description":"New name for the configuration profile"},"description":{"type":"string","required":false,"visibility":"user-or-llm","description":"New description for the configuration profile"},"retrievalRoleArn":{"type":"string","required":false,"visibility":"user-or-llm","description":"New ARN of the IAM role used to retrieve the configuration"}}},"appconfig_update_environment":{"id":"appconfig_update_environment","name":"AppConfig Update Environment","description":"Update the name or description of an AWS AppConfig environment","version":"1.0","params":{"region":{"type":"string","required":true,"visibility":"user-only","description":"AWS region (e.g., us-east-1)"},"accessKeyId":{"type":"string","required":true,"visibility":"user-only","description":"AWS access key ID"},"secretAccessKey":{"type":"string","required":true,"visibility":"user-only","description":"AWS secret access key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The application ID that owns the environment"},"environmentId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The environment ID to update"},"name":{"type":"string","required":false,"visibility":"user-or-llm","description":"New name for the environment"},"description":{"type":"string","required":false,"visibility":"user-or-llm","description":"New description for the environment"}}},"arxiv_get_author_papers":{"id":"arxiv_get_author_papers","name":"ArXiv Get Author Papers","description":"Search for papers by a specific author on ArXiv.","version":"1.0.0","params":{"authorName":{"type":"string","required":true,"visibility":"user-or-llm","description":"Author name to search for"},"maxResults":{"type":"number","required":false,"visibility":"user-only","description":"Maximum number of results to return (default: 10, max: 2000)"}}},"arxiv_get_paper":{"id":"arxiv_get_paper","name":"ArXiv Get Paper","description":"Get detailed information about a specific ArXiv paper by its ID.","version":"1.0.0","params":{"paperId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ArXiv paper ID (e.g., \\"1706.03762\\")"}}},"arxiv_search":{"id":"arxiv_search","name":"ArXiv Search","description":"Search for academic papers on ArXiv by keywords, authors, titles, or other fields.","version":"1.0.0","params":{"searchQuery":{"type":"string","required":true,"visibility":"user-or-llm","description":"The search query to execute"},"searchField":{"type":"string","required":false,"visibility":"user-only","description":"Field to search in: all, ti (title), au (author), abs (abstract), co (comment), jr (journal), cat (category), rn (report number)"},"maxResults":{"type":"number","required":false,"visibility":"user-only","description":"Maximum number of results to return (default: 10, max: 2000)"},"sortBy":{"type":"string","required":false,"visibility":"user-only","description":"Sort by: relevance, lastUpdatedDate, submittedDate (default: relevance)"},"sortOrder":{"type":"string","required":false,"visibility":"user-only","description":"Sort order: ascending, descending (default: descending)"}}},"asana_add_comment":{"id":"asana_add_comment","name":"Asana Add Comment","description":"Add a comment (story) to an Asana task","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"taskGid":{"type":"string","required":true,"visibility":"user-or-llm","description":"Asana task GID (numeric string)"},"text":{"type":"string","required":true,"visibility":"user-or-llm","description":"The text content of the comment"}},"oauth":{"required":true,"provider":"asana"}},"asana_add_followers":{"id":"asana_add_followers","name":"Asana Add Followers","description":"Add one or more followers to an Asana task","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"taskGid":{"type":"string","required":true,"visibility":"user-or-llm","description":"GID of the Asana task (numeric string)"},"followers":{"type":"array","required":true,"visibility":"user-or-llm","description":"Array of user GIDs to add as followers to the task"}},"oauth":{"required":true,"provider":"asana"}},"asana_create_project":{"id":"asana_create_project","name":"Asana Create Project","description":"Create a new project in an Asana workspace","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"workspace":{"type":"string","required":true,"visibility":"user-or-llm","description":"Asana workspace GID (numeric string) where the project will be created"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the project"},"notes":{"type":"string","required":false,"visibility":"user-or-llm","description":"Notes or description for the project"}},"oauth":{"required":true,"provider":"asana"}},"asana_create_section":{"id":"asana_create_section","name":"Asana Create Section","description":"Create a new section in an Asana project","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"projectGid":{"type":"string","required":true,"visibility":"user-or-llm","description":"GID of the Asana project (numeric string) to add the section to"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the section"}},"oauth":{"required":true,"provider":"asana"}},"asana_create_subtask":{"id":"asana_create_subtask","name":"Asana Create Subtask","description":"Create a subtask under an existing Asana task","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"taskGid":{"type":"string","required":true,"visibility":"user-or-llm","description":"GID of the parent Asana task (numeric string)"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the subtask"},"notes":{"type":"string","required":false,"visibility":"user-or-llm","description":"Notes or description for the subtask"},"assignee":{"type":"string","required":false,"visibility":"user-or-llm","description":"User GID to assign the subtask to"},"due_on":{"type":"string","required":false,"visibility":"user-or-llm","description":"Due date in YYYY-MM-DD format"}},"oauth":{"required":true,"provider":"asana"}},"asana_create_task":{"id":"asana_create_task","name":"Asana Create Task","description":"Create a new task in Asana","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"workspace":{"type":"string","required":true,"visibility":"user-or-llm","description":"Asana workspace GID (numeric string) where the task will be created"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the task"},"notes":{"type":"string","required":false,"visibility":"user-or-llm","description":"Notes or description for the task"},"assignee":{"type":"string","required":false,"visibility":"user-or-llm","description":"User GID to assign the task to"},"due_on":{"type":"string","required":false,"visibility":"user-or-llm","description":"Due date in YYYY-MM-DD format"}},"oauth":{"required":true,"provider":"asana"}},"asana_delete_task":{"id":"asana_delete_task","name":"Asana Delete Task","description":"Delete an Asana task by its GID (moves it to the trash)","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"taskGid":{"type":"string","required":true,"visibility":"user-or-llm","description":"GID of the Asana task to delete (numeric string)"}},"oauth":{"required":true,"provider":"asana"}},"asana_get_project":{"id":"asana_get_project","name":"Asana Get Project","description":"Retrieve a single Asana project by its GID","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"projectGid":{"type":"string","required":true,"visibility":"user-or-llm","description":"Asana project GID (numeric string) to retrieve"}},"oauth":{"required":true,"provider":"asana"}},"asana_get_projects":{"id":"asana_get_projects","name":"Asana Get Projects","description":"Retrieve all projects from an Asana workspace","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"workspace":{"type":"string","required":true,"visibility":"user-or-llm","description":"Asana workspace GID (numeric string) to retrieve projects from"}},"oauth":{"required":true,"provider":"asana"}},"asana_get_task":{"id":"asana_get_task","name":"Asana Get Task","description":"Retrieve a single task by GID or get multiple tasks with filters","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"taskGid":{"type":"string","required":false,"visibility":"user-or-llm","description":"The globally unique identifier (GID) of the task. If not provided, will get multiple tasks."},"workspace":{"type":"string","required":false,"visibility":"user-or-llm","description":"Asana workspace GID (numeric string) to filter tasks (required when not using taskGid)"},"project":{"type":"string","required":false,"visibility":"user-or-llm","description":"Asana project GID (numeric string) to filter tasks"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of tasks to return (default: 50)"}},"oauth":{"required":true,"provider":"asana"}},"asana_list_sections":{"id":"asana_list_sections","name":"Asana List Sections","description":"List all sections in an Asana project","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"projectGid":{"type":"string","required":true,"visibility":"user-or-llm","description":"GID of the Asana project (numeric string) to list sections from"}},"oauth":{"required":true,"provider":"asana"}},"asana_list_workspaces":{"id":"asana_list_workspaces","name":"Asana List Workspaces","description":"List all Asana workspaces and organizations the authenticated user belongs to","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"}},"oauth":{"required":true,"provider":"asana"}},"asana_search_tasks":{"id":"asana_search_tasks","name":"Asana Search Tasks","description":"Search for tasks in an Asana workspace","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"workspace":{"type":"string","required":true,"visibility":"user-or-llm","description":"Asana workspace GID (numeric string) to search tasks in"},"text":{"type":"string","required":false,"visibility":"user-or-llm","description":"Text to search for in task names"},"assignee":{"type":"string","required":false,"visibility":"user-or-llm","description":"Filter tasks by assignee user GID"},"projects":{"type":"array","required":false,"visibility":"user-or-llm","description":"Array of Asana project GIDs (numeric strings) to filter tasks by"},"completed":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Filter by completion status"}},"oauth":{"required":true,"provider":"asana"}},"asana_update_task":{"id":"asana_update_task","name":"Asana Update Task","description":"Update an existing task in Asana","version":"1.0.0","params":{"accessToken":{"type":"string","required":true,"visibility":"hidden","description":"OAuth access token for Asana"},"taskGid":{"type":"string","required":true,"visibility":"user-or-llm","description":"Asana task GID (numeric string) of the task to update"},"name":{"type":"string","required":false,"visibility":"user-or-llm","description":"Updated name for the task"},"notes":{"type":"string","required":false,"visibility":"user-or-llm","description":"Updated notes or description for the task"},"assignee":{"type":"string","required":false,"visibility":"user-or-llm","description":"Updated assignee user GID"},"completed":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Mark task as completed or not completed"},"due_on":{"type":"string","required":false,"visibility":"user-or-llm","description":"Updated due date in YYYY-MM-DD format"}},"oauth":{"required":true,"provider":"asana"}},"ashby_add_candidate_tag":{"id":"ashby_add_candidate_tag","name":"Ashby Add Candidate Tag","description":"Adds a tag to a candidate in Ashby and returns the updated candidate.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ashby API Key"},"candidateId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The UUID of the candidate to add the tag to"},"tagId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The UUID of the tag to add"}}},"ashby_anonymize_candidate":{"id":"ashby_anonymize_candidate","name":"Ashby Anonymize Candidate","description":"Strips personally identifiable information from a candidate in Ashby. This does not delete the candidate - the record and its applications remain, with the PII removed. Ashby exposes no candidate deletion endpoint; true deletion is UI-only, restricted by role, and limited to a 10-day window. Requires the candidatesWrite permission.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ashby API Key"},"candidateId":{"type":"string","required":true,"visibility":"user-or-llm","description":"UUID of the candidate to anonymize"}}},"ashby_change_application_source":{"id":"ashby_change_application_source","name":"Ashby Change Application Source","description":"Changes the source attributed to an existing application, so programmatically created applications report correctly on the recruiting side. Requires the candidatesWrite permission.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ashby API Key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"UUID of the application whose source should change"},"sourceId":{"type":"string","required":false,"visibility":"user-or-llm","description":"UUID of the source to attribute the application to, as returned by List Sources. Omit only when unsetSource is true."},"unsetSource":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Set true to deliberately clear the application source. Required to unset, so that a missing or empty sourceId cannot wipe attribution by accident."}}},"ashby_change_application_stage":{"id":"ashby_change_application_stage","name":"Ashby Change Application Stage","description":"Moves an application to a different interview stage. Requires an archive reason when moving to an Archived stage.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ashby API Key"},"applicationId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The UUID of the application to update the stage of"},"interviewStageId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The UUID of the interview stage to move the application to"},"archiveReasonId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Archive reason UUID. Required when moving to an Archived stage, ignored otherwise"}}},"ashby_create_application":{"id":"ashby_create_application","name":"Ashby Create Application","description":"Creates a new application for a candidate on a job. Optionally specify interview plan, stage, source, and credited user.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ashby API Key"},"candidateId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The UUID of the candidate to consider for the job"},"jobId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The UUID of the job to consider the candidate for"},"interviewPlanId":{"type":"string","required":false,"visibility":"user-or-llm","description":"UUID of the interview plan to use (defaults to the job default plan)"},"interviewStageId":{"type":"string","required":false,"visibility":"user-or-llm","description":"UUID of the interview stage to place the application in (defaults to first Lead stage)"},"sourceId":{"type":"string","required":false,"visibility":"user-or-llm","description":"UUID of the source to set on the application"},"creditedToUserId":{"type":"string","required":false,"visibility":"user-or-llm","description":"UUID of the user the application is credited to"},"createdAt":{"type":"string","required":false,"visibility":"user-or-llm","description":"ISO 8601 timestamp to set as the application creation date (defaults to now)"}}},"ashby_create_candidate":{"id":"ashby_create_candidate","name":"Ashby Create Candidate","description":"Creates a new candidate record in Ashby.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ashby API Key"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"The candidate full name"},"email":{"type":"string","required":false,"visibility":"user-or-llm","description":"Primary email address for the candidate"},"phoneNumber":{"type":"string","required":false,"visibility":"user-or-llm","description":"Primary phone number for the candidate"},"linkedInUrl":{"type":"string","required":false,"visibility":"user-or-llm","description":"LinkedIn profile URL"},"githubUrl":{"type":"string","required":false,"visibility":"user-or-llm","description":"GitHub profile URL"},"website":{"type":"string","required":false,"visibility":"user-or-llm","description":"Personal website URL"},"sourceId":{"type":"string","required":false,"visibility":"user-or-llm","description":"UUID of the source to attribute the candidate to"},"creditedToUserId":{"type":"string","required":false,"visibility":"user-or-llm","description":"UUID of the Ashby user to credit with sourcing this candidate"},"createdAt":{"type":"string","required":false,"visibility":"user-or-llm","description":"Backdated creation timestamp in ISO 8601 (e.g. 2024-01-01T00:00:00Z). Defaults to now."},"alternateEmailAddresses":{"type":"json","required":false,"visibility":"user-or-llm","description":"Array of additional email address strings to add to the candidate, e.g. [\\"a@x.com\\",\\"b@y.com\\"]"}}},"ashby_create_note":{"id":"ashby_create_note","name":"Ashby Create Note","description":"Creates a note on a candidate in Ashby. Supports plain text and HTML content (bold, italic, underline, links, lists, code).","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ashby API Key"},"candidateId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The UUID of the candidate to add the note to"},"note":{"type":"string","required":true,"visibility":"user-or-llm","description":"The note content. If noteType is text/html, supports: , , , ,