diff --git a/apps/docs/content/docs/integrations/athena.mdx b/apps/docs/content/docs/integrations/athena.mdx index 23663e485cd..cd1d60fcf46 100644 --- a/apps/docs/content/docs/integrations/athena.mdx +++ b/apps/docs/content/docs/integrations/athena.mdx @@ -38,6 +38,10 @@ Start an SQL query execution in AWS Athena | `executionParameters` | json | No | Values for ? placeholders in a parameterized query or EXECUTE statement, applied in order. Pass a JSON array of strings \(e.g. \["2024-01-01", "US"\]\); a plain comma-separated list is also accepted when no value contains a comma | | `resultReuseEnabled` | boolean | No | Reuse a previous result of the same query instead of re-scanning data \(default: false\) | | `resultReuseMaxAgeInMinutes` | number | No | Maximum age in minutes of a previous result eligible for reuse \(0-10080, default: 60\) | +| `encryptionOption` | string | No | Encryption for the query results in S3: SSE_S3, SSE_KMS, or CSE_KMS. Overridden when the workgroup enforces its own settings | +| `kmsKey` | string | No | KMS key ARN or ID used when encryptionOption is SSE_KMS or CSE_KMS | +| `expectedBucketOwner` | string | No | AWS account ID expected to own the output location bucket; the query fails if it does not | +| `clientRequestToken` | string | No | Idempotency token \(32-128 characters\). Repeating a request with the same token returns the original query execution instead of starting a new one | #### Output @@ -80,6 +84,14 @@ Get the status and details of an Athena query execution | `queryQueueTimeInMillis` | number | Time the query spent in queue in milliseconds | | `totalExecutionTimeInMillis` | number | Total execution time in milliseconds | | `outputLocation` | string | S3 location of query results | +| `servicePreProcessingTimeInMillis` | number | Time Athena spent preprocessing the query before submitting it, in milliseconds | +| `serviceProcessingTimeInMillis` | number | Time Athena spent finalizing and publishing results after execution, in milliseconds | +| `dataManifestLocation` | string | S3 location of the manifest file listing files written by the query | +| `reusedPreviousResult` | boolean | Whether the query reused a previous result instead of scanning data | +| `athenaError` | json | Failure details for a FAILED query \(errorCategory: 1 system, 2 user, 3 other; errorType; retryable; errorMessage\) | +| `executionParameters` | array | Values supplied for the query's ? placeholders | +| `substatementType` | string | Kind of query statement that was run \(e.g., SELECT, INSERT, CREATE_TABLE\) | +| `engineVersion` | json | Engine version used \(selectedEngineVersion, effectiveEngineVersion\) | @@ -102,10 +114,10 @@ Retrieve the results of a completed Athena query execution | Parameter | Type | Description | | --------- | ---- | ----------- | -| `columns` | array | Column metadata \(name and type\) | +| `columns` | array | Column metadata \(name, type, label, precision, scale, nullable, caseSensitive\) | | `rows` | array | Result rows as key-value objects | | `nextToken` | string | Pagination token for next page of results | -| `updateCount` | number | Number of rows affected \(for INSERT/UPDATE statements\) | +| `updateCount` | number | Number of rows inserted or updated by a CREATE TABLE AS SELECT, INSERT INTO, or UPDATE statement | @@ -188,6 +200,14 @@ Get the status and details of up to 50 Athena query executions in one call | ↳ `queryQueueTimeInMillis` | number | Time the query spent in queue in milliseconds | | ↳ `totalExecutionTimeInMillis` | number | Total execution time in milliseconds | | ↳ `outputLocation` | string | S3 location of query results | +| ↳ `servicePreProcessingTimeInMillis` | number | Time Athena spent preprocessing the query before submitting it, in milliseconds | +| ↳ `serviceProcessingTimeInMillis` | number | Time Athena spent finalizing and publishing results after execution, in milliseconds | +| ↳ `dataManifestLocation` | string | S3 location of the manifest file listing files written by the query | +| ↳ `reusedPreviousResult` | boolean | Whether the query reused a previous result instead of scanning data | +| ↳ `athenaError` | json | Failure details for a FAILED query \(errorCategory: 1 system, 2 user, 3 other; errorType; retryable; errorMessage\) | +| ↳ `executionParameters` | array | Values supplied for the query's ? placeholders | +| ↳ `substatementType` | string | Kind of query statement that was run \(e.g., SELECT, INSERT, CREATE_TABLE\) | +| ↳ `engineVersion` | json | Engine version used \(selectedEngineVersion, effectiveEngineVersion\) | | `unprocessedQueryExecutionIds` | array | Query execution IDs that could not be retrieved, with error details | | ↳ `queryExecutionId` | string | Query execution ID | | ↳ `errorCode` | string | Error code | diff --git a/apps/docs/content/docs/integrations/cloudformation.mdx b/apps/docs/content/docs/integrations/cloudformation.mdx index 87814805465..68d0f959991 100644 --- a/apps/docs/content/docs/integrations/cloudformation.mdx +++ b/apps/docs/content/docs/integrations/cloudformation.mdx @@ -36,7 +36,7 @@ List and describe CloudFormation stacks | Parameter | Type | Description | | --------- | ---- | ----------- | -| `stacks` | array | List of CloudFormation stacks with status, outputs, and tags | +| `stacks` | array | List of CloudFormation stacks \(stackName, stackId, stackStatus, stackStatusReason, detailedStatus, creationTime, lastUpdatedTime, deletionTime, description, enableTerminationProtection, driftInformation, outputs \[\{outputKey, outputValue, description, exportName\}\], tags, parameters \[\{parameterKey, parameterValue, usePreviousValue, resolvedValue\}\], capabilities, changeSetId, roleArn, parentId, rootId, notificationArns, timeoutInMinutes, disableRollback, deletionMode, retainExceptOnCreate\) | @@ -58,6 +58,8 @@ Create a new CloudFormation stack from a template | `tags` | json | No | Tags to apply to the stack and its resources \(e.g., \[\{"key": "env", "value": "prod"\}\]\) | | `onFailure` | string | No | Action to take on creation failure: ROLLBACK \(default\), DELETE, or DO_NOTHING | | `timeoutInMinutes` | number | No | Amount of time before the stack creation times out and rolls back | +| `roleArn` | string | No | ARN of an IAM service role CloudFormation assumes for stack operations \(defaults to the caller credentials or the role previously used for the stack\) | +| `enableTerminationProtection` | boolean | No | Whether to enable termination protection on the new stack \(default false\) | #### Output @@ -84,6 +86,7 @@ Update an existing CloudFormation stack with a new or previous template | `parameters` | json | No | Template input parameters \(e.g., \[\{"parameterKey": "InstanceType", "parameterValue": "t3.micro"\}\]\) | | `capabilities` | string | No | Comma-separated capabilities to acknowledge \(CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPAND\) | | `tags` | json | No | Tags to apply to the stack and its resources \(e.g., \[\{"key": "env", "value": "prod"\}\]\) | +| `roleArn` | string | No | ARN of an IAM service role CloudFormation assumes for stack operations \(defaults to the caller credentials or the role previously used for the stack\) | #### Output @@ -155,6 +158,8 @@ Preview the changes a stack create or update would make before applying them | `capabilities` | string | No | Comma-separated capabilities to acknowledge \(CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPAND\) | | `changeSetType` | string | No | CREATE \(default, new stack\), UPDATE \(existing stack\), or IMPORT \(import existing resources\) | | `description` | string | No | Description of the change set for reference | +| `tags` | json | No | Tags to apply to the stack and its resources when the change set executes \(e.g., \[\{"key": "env", "value": "prod"\}\]\) | +| `roleArn` | string | No | ARN of an IAM service role CloudFormation assumes for stack operations \(defaults to the caller credentials or the role previously used for the stack\) | #### Output @@ -178,6 +183,7 @@ View the resource changes a change set would make and its execution status | `awsRegion` | string | Yes | AWS region \(e.g., us-east-1\) | | `changeSetName` | string | Yes | Name or ARN of the change set to describe | | `stackName` | string | No | Name or ID of the stack the change set belongs to \(required if changeSetName is not an ARN\) | +| `nextToken` | string | No | Pagination token from a previous call to fetch the next page of changes | #### Output @@ -193,7 +199,16 @@ View the resource changes a change set would make and its execution status | `statusReason` | string | Reason for the current status, particularly if failed | | `creationTime` | number | Timestamp the change set was created | | `capabilities` | array | Capabilities required to execute the change set | -| `changes` | array | List of resource changes \(action, logical/physical resource ID, resource type, replacement\) | +| `changes` | array | List of resource changes \(action, logicalResourceId, physicalResourceId, resourceType, replacement, type, policyAction, scope, changeSetId, details \[\{attribute, name, requiresRecreation, evaluation, changeSource, causingEntity\}\]\) | +| `parameters` | array | Stack parameters for the change set \(parameterKey, parameterValue, usePreviousValue, resolvedValue\) | +| `tags` | array | Tags associated with the change set \(key, value\) | +| `notificationArns` | array | SNS topic ARNs that receive stack event notifications | +| `includeNestedStacks` | boolean | Whether change sets were created for nested stacks | +| `parentChangeSetId` | string | ID of the parent change set, for nested change sets | +| `rootChangeSetId` | string | ID of the top-level change set, for nested change sets | +| `onStackFailure` | string | Behavior when stack operations fail \(DO_NOTHING, ROLLBACK, DELETE\) | +| `importExistingResources` | boolean | Whether the change set imports resources that already exist | +| `nextToken` | string | Pagination token for the next page of changes, if more remain | @@ -306,7 +321,7 @@ Get the event history for a CloudFormation stack | Parameter | Type | Description | | --------- | ---- | ----------- | -| `events` | array | List of stack events with resource status and timestamps | +| `events` | array | List of stack events \(stackId, eventId, stackName, operationId, logicalResourceId, physicalResourceId, resourceType, resourceStatus, resourceStatusReason, detailedStatus, resourceProperties, clientRequestToken, hookType, hookStatus, hookStatusReason, hookInvocationPoint, hookFailureMode, timestamp\) | @@ -352,7 +367,7 @@ Get a summary of a template or deployed stack: resource types, required capabili | Parameter | Type | Description | | --------- | ---- | ----------- | | `description` | string | Template description | -| `parameters` | array | Template parameters with types, defaults, and descriptions | +| `parameters` | array | Template parameters \(parameterKey, defaultValue, parameterType, noEcho, description, allowedValues\) | | `capabilities` | array | Required capabilities \(e.g., CAPABILITY_IAM\) | | `capabilitiesReason` | string | Reason capabilities are required | | `resourceTypes` | array | AWS resource types declared in the template \(e.g., AWS::S3::Bucket\) | diff --git a/apps/docs/content/docs/integrations/cloudwatch.mdx b/apps/docs/content/docs/integrations/cloudwatch.mdx index 96f9907f869..c346e46fc86 100644 --- a/apps/docs/content/docs/integrations/cloudwatch.mdx +++ b/apps/docs/content/docs/integrations/cloudwatch.mdx @@ -48,6 +48,7 @@ Run a CloudWatch Log Insights query against one or more log groups | ↳ `recordsMatched` | number | Number of log records that matched the query | | ↳ `recordsScanned` | number | Total log records scanned | | `status` | string | Query completion status \(Complete, Failed, Cancelled, or Timeout\) | +| `queryId` | string | ID of the Logs Insights query | @@ -69,6 +70,7 @@ Search log events across all streams in a log group by filter pattern and time r | `endTime` | number | No | End time as Unix epoch seconds | | `startFromHead` | boolean | No | Return the earliest matching events first instead of the latest | | `limit` | number | No | Maximum number of events to return | +| `nextToken` | string | No | Pagination token from a previous call to continue where it stopped | #### Output @@ -79,6 +81,8 @@ Search log events across all streams in a log group by filter pattern and time r | ↳ `timestamp` | number | Event timestamp in epoch milliseconds | | ↳ `message` | string | Log event message | | ↳ `ingestionTime` | number | Ingestion time in epoch milliseconds | +| ↳ `eventId` | string | Unique ID of the log event | +| `nextToken` | string | Token to fetch the next page of matching events, if more remain | @@ -125,6 +129,7 @@ Retrieve log events from a specific CloudWatch log stream | `startTime` | number | No | Start time as Unix epoch seconds | | `endTime` | number | No | End time as Unix epoch seconds | | `limit` | number | No | Maximum number of events to return | +| `nextToken` | string | No | Token from a previous call \(nextForwardToken or nextBackwardToken\) to page through the stream | #### Output @@ -134,6 +139,8 @@ Retrieve log events from a specific CloudWatch log stream | ↳ `timestamp` | number | Event timestamp in epoch milliseconds | | ↳ `message` | string | Log event message | | ↳ `ingestionTime` | number | Ingestion time in epoch milliseconds | +| `nextForwardToken` | string | Token for the next, newer page of events \(returns the same token when the end of the stream is reached\) | +| `nextBackwardToken` | string | Token for the previous, older page of events | @@ -234,6 +241,8 @@ Get statistics for a CloudWatch metric over a time range | `period` | number | Yes | Granularity in seconds \(e.g., 60, 300, 3600\) | | `statistics` | array | Yes | Statistics to retrieve \(Average, Sum, Minimum, Maximum, SampleCount\) | | `dimensions` | string | No | Dimensions as JSON \(e.g., \{"InstanceId": "i-1234"\}\) | +| `extendedStatistics` | array | No | Percentile statistics to retrieve \(e.g., \["p99", "p95"\]\). AWS accepts either Statistics or ExtendedStatistics, so when set these are requested instead of statistics | +| `unit` | string | No | Only return data reported with this unit \(e.g., Percent, Milliseconds\). Omit to return all units | #### Output @@ -248,6 +257,7 @@ Get statistics for a CloudWatch metric over a time range | ↳ `maximum` | number | Maximum statistic value | | ↳ `sampleCount` | number | Sample count statistic value | | ↳ `unit` | string | Unit of the metric | +| ↳ `extendedStatistics` | json | Percentile values keyed by statistic \(e.g., \{"p99": 120.5\}\) | @@ -296,6 +306,7 @@ List and filter CloudWatch alarms | `stateValue` | string | No | Filter by alarm state \(OK, ALARM, INSUFFICIENT_DATA\) | | `alarmType` | string | No | Filter by alarm type \(MetricAlarm, CompositeAlarm\) | | `limit` | number | No | Maximum number of alarms to return | +| `nextToken` | string | No | Pagination token from a previous call | #### Output @@ -309,7 +320,29 @@ List and filter CloudWatch alarms | ↳ `metricName` | string | Metric name \(MetricAlarm only\) | | ↳ `namespace` | string | Metric namespace \(MetricAlarm only\) | | ↳ `threshold` | number | Threshold value \(MetricAlarm only\) | +| ↳ `comparisonOperator` | string | Comparison operator \(MetricAlarm only\) | +| ↳ `evaluationPeriods` | number | Number of periods evaluated \(MetricAlarm only\) | | ↳ `stateUpdatedTimestamp` | number | Epoch ms when state last changed | +| ↳ `alarmType` | string | MetricAlarm or CompositeAlarm | +| ↳ `alarmDescription` | string | Alarm description | +| ↳ `actionsEnabled` | boolean | Whether actions run on state changes | +| ↳ `alarmActions` | array | ARNs of actions run on ALARM | +| ↳ `okActions` | array | ARNs of actions run on OK | +| ↳ `insufficientDataActions` | array | ARNs of actions run on INSUFFICIENT_DATA | +| ↳ `stateReasonData` | string | Machine-readable JSON explaining the state | +| ↳ `stateTransitionedTimestamp` | number | Epoch ms when the state value last changed | +| ↳ `alarmConfigurationUpdatedTimestamp` | number | Epoch ms when the alarm configuration last changed | +| ↳ `statistic` | string | Statistic evaluated \(MetricAlarm only\) | +| ↳ `extendedStatistic` | string | Percentile statistic evaluated \(MetricAlarm only\) | +| ↳ `dimensions` | array | Metric dimensions as \{name, value\} \(MetricAlarm only\) | +| ↳ `period` | number | Evaluation period in seconds \(MetricAlarm only\) | +| ↳ `unit` | string | Metric unit \(MetricAlarm only\) | +| ↳ `datapointsToAlarm` | number | Breaching datapoints needed to alarm \(MetricAlarm only\) | +| ↳ `treatMissingData` | string | How missing data is treated \(MetricAlarm only\) | +| ↳ `thresholdMetricId` | string | ID of the metric-math threshold query \(anomaly detection alarms\) | +| ↳ `metrics` | array | Metric-math queries \[\{id, expression, label, returnData, period, accountId, metricStat\}\] \(MetricAlarm only\) | +| ↳ `alarmRule` | string | Rule expression \(CompositeAlarm only\) | +| `nextToken` | string | Pagination token for the next page of alarms | @@ -341,6 +374,8 @@ Retrieve state-change and configuration history for CloudWatch alarms | ↳ `timestamp` | number | Epoch ms when the history item occurred | | ↳ `historyItemType` | string | ConfigurationUpdate, StateUpdate, Action, or contributor variants | | ↳ `historySummary` | string | Human-readable summary of the event | +| ↳ `historyData` | string | JSON string with event details \(e.g., old and new state with reason data for StateUpdate\) | +| ↳ `alarmContributorId` | string | ID of the alarm contributor, for contributor history items | diff --git a/apps/docs/content/docs/integrations/dynamodb.mdx b/apps/docs/content/docs/integrations/dynamodb.mdx index 0aaae67b69a..5dd359e6d18 100644 --- a/apps/docs/content/docs/integrations/dynamodb.mdx +++ b/apps/docs/content/docs/integrations/dynamodb.mdx @@ -33,6 +33,8 @@ Get an item from a DynamoDB table by primary key | `tableName` | string | Yes | DynamoDB table name \(e.g., "Users", "Orders"\) | | `key` | json | Yes | Primary key of the item to retrieve \(e.g., \{"pk": "USER#123"\} or \{"pk": "ORDER#456", "sk": "ITEM#789"\}\) | | `consistentRead` | boolean | No | Use strongly consistent read | +| `projectionExpression` | string | No | Attributes to retrieve \(e.g., "pk, #name, email"\). Returns all attributes if omitted | +| `expressionAttributeNames` | json | No | Attribute name mappings for reserved words used in projectionExpression \(e.g., \{"#name": "name"\}\) | #### Output @@ -59,6 +61,7 @@ Put an item into a DynamoDB table | `conditionExpression` | string | No | Condition that must be met for the put to succeed \(e.g., "attribute_not_exists\(pk\)" to prevent overwrites\) | | `expressionAttributeNames` | json | No | Attribute name mappings for reserved words used in conditionExpression \(e.g., \{"#name": "name"\}\) | | `expressionAttributeValues` | json | No | Expression attribute values used in conditionExpression \(e.g., \{":expected": "value"\}\) | +| `returnValues` | string | No | Set to "ALL_OLD" to return the item this put replaced as attributes \(default: "NONE"\) | #### Output @@ -66,6 +69,7 @@ Put an item into a DynamoDB table | --------- | ---- | ----------- | | `message` | string | Operation status message | | `item` | json | Created item | +| `attributes` | json | Item that was replaced, when returnValues is ALL_OLD \(null if no item existed\) | @@ -89,6 +93,8 @@ Query items from a DynamoDB table using key conditions | `limit` | number | No | Maximum number of items to return \(e.g., 10, 50, 100\) | | `exclusiveStartKey` | json | No | Pagination token from a previous query's lastEvaluatedKey to continue fetching results | | `scanIndexForward` | boolean | No | Sort order for the sort key: true for ascending \(default\), false for descending | +| `projectionExpression` | string | No | Attributes to retrieve \(e.g., "pk, sk, #name, email"\) | +| `consistentRead` | boolean | No | Use a strongly consistent read \(default: false\). Not supported on global secondary indexes | #### Output @@ -97,6 +103,7 @@ Query items from a DynamoDB table using key conditions | `message` | string | Operation status message | | `items` | array | Array of items returned | | `count` | number | Number of items returned | +| `scannedCount` | number | Number of items evaluated before the filter expression was applied | | `lastEvaluatedKey` | json | Pagination token to pass as exclusiveStartKey to fetch the next page of results | @@ -119,6 +126,10 @@ Scan all items in a DynamoDB table | `expressionAttributeValues` | json | No | Expression attribute values \(e.g., \{":minAge": 18, ":status": "active"\}\) | | `limit` | number | No | Maximum number of items to return \(e.g., 10, 50, 100\) | | `exclusiveStartKey` | json | No | Pagination token from a previous scan's lastEvaluatedKey to continue fetching results | +| `indexName` | string | No | Secondary index to scan instead of the table \(e.g., "GSI1"\) | +| `consistentRead` | boolean | No | Use a strongly consistent read \(default: false\). Not supported on global secondary indexes | +| `segment` | number | No | Segment to scan in a parallel scan \(0 to totalSegments - 1\). Requires totalSegments | +| `totalSegments` | number | No | Total number of segments in a parallel scan \(1-1000000\). Requires segment | #### Output @@ -127,6 +138,7 @@ Scan all items in a DynamoDB table | `message` | string | Operation status message | | `items` | array | Array of items returned | | `count` | number | Number of items returned | +| `scannedCount` | number | Number of items evaluated before the filter expression was applied | | `lastEvaluatedKey` | json | Pagination token to pass as exclusiveStartKey to fetch the next page of results | @@ -148,13 +160,14 @@ Update an item in a DynamoDB table | `expressionAttributeNames` | json | No | Attribute name mappings for reserved words \(e.g., \{"#name": "name", "#count": "count"\}\) | | `expressionAttributeValues` | json | No | Expression attribute values \(e.g., \{":name": "John", ":age": 30, ":inc": 1\}\) | | `conditionExpression` | string | No | Condition that must be met for the update to succeed \(e.g., "attribute_exists\(pk\)" or "version = :expectedVersion"\) | +| `returnValues` | string | No | Which attributes to return as item: "ALL_NEW" \(default\), "UPDATED_NEW", "ALL_OLD", "UPDATED_OLD", or "NONE" | #### Output | Parameter | Type | Description | | --------- | ---- | ----------- | | `message` | string | Operation status message | -| `item` | json | Updated item with all attributes | +| `item` | json | Item attributes selected by returnValues \(all attributes after the update by default\) | @@ -174,12 +187,14 @@ Delete an item from a DynamoDB table | `conditionExpression` | string | No | Condition that must be met for the delete to succeed \(e.g., "attribute_exists\(pk\)"\) | | `expressionAttributeNames` | json | No | Attribute name mappings for reserved words used in conditionExpression \(e.g., \{"#status": "status"\}\) | | `expressionAttributeValues` | json | No | Expression attribute values used in conditionExpression \(e.g., \{":status": "active"\}\) | +| `returnValues` | string | No | Set to "ALL_OLD" to return the deleted item as attributes \(default: "NONE"\) | #### Output | Parameter | Type | Description | | --------- | ---- | ----------- | | `message` | string | Operation status message | +| `attributes` | json | Deleted item, when returnValues is ALL_OLD \(null if no item existed\) | @@ -202,7 +217,7 @@ Introspect DynamoDB to list tables or get detailed schema information for a spec | --------- | ---- | ----------- | | `message` | string | Operation status message | | `tables` | array | List of table names in the region | -| `tableDetails` | json | Detailed schema information for a specific table | +| `tableDetails` | json | Detailed schema for a specific table \(tableName, tableStatus, keySchema, attributeDefinitions, globalSecondaryIndexes, localSecondaryIndexes, itemCount, tableSizeBytes, billingMode, tableArn, creationDateTime, deletionProtectionEnabled, streamEnabled, streamViewType, latestStreamArn\) | diff --git a/apps/docs/content/docs/integrations/ec2.mdx b/apps/docs/content/docs/integrations/ec2.mdx index 1065a8b4368..108abc67de4 100644 --- a/apps/docs/content/docs/integrations/ec2.mdx +++ b/apps/docs/content/docs/integrations/ec2.mdx @@ -63,7 +63,12 @@ List EC2 instances with their state, type, networking, and tags | ↳ `instanceId` | string | Instance ID | | ↳ `instanceType` | string | Instance type \(e.g., t3.micro\) | | ↳ `state` | string | Instance state \(pending, running, stopping, stopped, shutting-down, terminated\) | +| ↳ `stateCode` | number | Numeric state code \(0 pending, 16 running, 32 shutting-down, 48 terminated, 64 stopping, 80 stopped\) | | ↳ `stateReason` | string | Reason for the most recent state transition | +| ↳ `stateReasonCode` | string | Code for the most recent state change \(e.g., Client.UserInitiatedShutdown\) | +| ↳ `stateTransitionReason` | string | Reason for the most recent state transition, including when it happened | +| ↳ `reservationId` | string | Reservation ID the instance was launched in | +| ↳ `ownerId` | string | AWS account ID that owns the reservation | | ↳ `launchTime` | string | Launch time \(ISO 8601\) | | ↳ `availabilityZone` | string | Availability Zone | | ↳ `vpcId` | string | VPC ID | @@ -75,11 +80,36 @@ List EC2 instances with their state, type, networking, and tags | ↳ `imageId` | string | AMI ID used to launch the instance | | ↳ `keyName` | string | Key pair name | | ↳ `platformDetails` | string | Platform details \(e.g., Linux/UNIX, Windows\) | +| ↳ `platform` | string | Set to Windows for Windows instances; null for Linux/UNIX | | ↳ `architecture` | string | CPU architecture | | ↳ `iamInstanceProfileArn` | string | ARN of the attached IAM instance profile | +| ↳ `ipv6Address` | string | Primary IPv6 address | +| ↳ `tenancy` | string | Placement tenancy \(default, dedicated, host\) | +| ↳ `instanceLifecycle` | string | Lifecycle type \(e.g., spot, scheduled, capacity-block\); null for On-Demand | +| ↳ `spotInstanceRequestId` | string | Spot Instance request ID | +| ↳ `monitoringState` | string | Detailed monitoring state \(disabled, disabling, enabled, pending\) | +| ↳ `ebsOptimized` | boolean | Whether the instance is EBS-optimized | +| ↳ `rootDeviceName` | string | Root device name \(e.g., /dev/xvda\) | +| ↳ `rootDeviceType` | string | Root device type \(ebs or instance-store\) | +| ↳ `metadataHttpTokens` | string | IMDS token requirement; required means IMDSv2 only, optional allows IMDSv1 | | ↳ `securityGroups` | array | Attached security groups | | ↳ `groupId` | string | Security group ID | | ↳ `groupName` | string | Security group name | +| ↳ `blockDeviceMappings` | array | Attached EBS volumes | +| ↳ `deviceName` | string | Device name \(e.g., /dev/sdh\) | +| ↳ `volumeId` | string | EBS volume ID | +| ↳ `status` | string | Attachment state \(attaching, attached, detaching, detached\) | +| ↳ `attachTime` | string | Attach time \(ISO 8601\) | +| ↳ `deleteOnTermination` | boolean | Whether the volume is deleted when the instance terminates | +| ↳ `networkInterfaces` | array | Attached network interfaces | +| ↳ `networkInterfaceId` | string | Network interface ID | +| ↳ `subnetId` | string | Subnet ID | +| ↳ `vpcId` | string | VPC ID | +| ↳ `privateIpAddress` | string | Primary private IPv4 address | +| ↳ `publicIp` | string | Associated public IPv4 address | +| ↳ `macAddress` | string | MAC address | +| ↳ `status` | string | Interface status \(available, associated, attaching, in-use, detaching\) | +| ↳ `deviceIndex` | number | Device index on the instance \(0 is the primary interface\) | diff --git a/apps/docs/content/docs/integrations/iam.mdx b/apps/docs/content/docs/integrations/iam.mdx index 68ed7f380d5..f4f8f6b7e3f 100644 --- a/apps/docs/content/docs/integrations/iam.mdx +++ b/apps/docs/content/docs/integrations/iam.mdx @@ -90,6 +90,8 @@ Create a new IAM user | `region` | string | Yes | AWS region \(e.g., us-east-1\) | | `userName` | string | Yes | Name for the new IAM user \(1-64 characters\) | | `path` | string | No | Path for the user \(e.g., /division_abc/\), defaults to / | +| `permissionsBoundary` | string | No | ARN of a managed policy to set as the user permissions boundary | +| `tags` | string | No | JSON object of up to 50 tag key/value pairs to attach to the new user | #### Output @@ -101,6 +103,8 @@ Create a new IAM user | `arn` | string | The ARN of the created user | | `path` | string | The path of the created user | | `createDate` | string | Date the user was created | +| `permissionsBoundaryArn` | string | ARN of the permissions boundary policy set on the user | +| `tags` | json | Tags attached to the user \(key, value pairs\) | @@ -178,6 +182,8 @@ Get detailed information about an IAM role | `assumeRolePolicyDocument` | string | The trust policy document \(JSON\) | | `roleLastUsedDate` | string | Date the role was last used | | `roleLastUsedRegion` | string | AWS region where the role was last used | +| `permissionsBoundaryArn` | string | ARN of the permissions boundary policy set on the role | +| `tags` | json | Tags attached to the role \(key, value pairs\) | @@ -197,6 +203,8 @@ Create a new IAM role with a trust policy | `description` | string | No | Description of the role | | `path` | string | No | Path for the role \(e.g., /application/\), defaults to / | | `maxSessionDuration` | number | No | Maximum session duration in seconds \(3600-43200, default 3600\) | +| `permissionsBoundary` | string | No | ARN of a managed policy to set as the role permissions boundary | +| `tags` | string | No | JSON object of up to 50 tag key/value pairs to attach to the new role | #### Output @@ -208,6 +216,8 @@ Create a new IAM role with a trust policy | `arn` | string | The ARN of the created role | | `path` | string | The path of the created role | | `createDate` | string | Date the role was created | +| `permissionsBoundaryArn` | string | ARN of the permissions boundary policy set on the role | +| `tags` | json | Tags attached to the role \(key, value pairs\) | @@ -336,6 +346,7 @@ List managed IAM policies | `pathPrefix` | string | No | Path prefix to filter policies | | `maxItems` | number | No | Maximum number of policies to return \(1-1000, default 100\) | | `marker` | string | No | Pagination marker from a previous request | +| `policyUsageFilter` | string | No | Filter by how the policy is used. Must be exactly one of: PermissionsPolicy, PermissionsBoundary | #### Output diff --git a/apps/docs/content/docs/integrations/identity_center.mdx b/apps/docs/content/docs/integrations/identity_center.mdx index 5655532ee83..2287f68e7ba 100644 --- a/apps/docs/content/docs/integrations/identity_center.mdx +++ b/apps/docs/content/docs/integrations/identity_center.mdx @@ -164,6 +164,13 @@ Look up a user in the Identity Store by email address | `userName` | string | Username in the Identity Store | | `displayName` | string | Display name of the user | | `email` | string | Email address of the user | +| `givenName` | string | Given \(first\) name, or null when the Identity Store omits it | +| `familyName` | string | Family \(last\) name, or null when the Identity Store omits it | +| `userStatus` | string | Account status \(ENABLED or DISABLED\) | +| `title` | string | Job title of the user | +| `externalIds` | array | External identity provider IDs linked to the user | +| ↳ `issuer` | string | Identity provider that issued the ID | +| ↳ `id` | string | Identifier at the issuer | @@ -191,6 +198,8 @@ Resolve an Identity Store user ID to the user behind it. Use to turn the princip | `email` | string | Primary email address, or null when the user has no email attribute | | `userStatus` | string | Account status \(ENABLED or DISABLED\), or null when the Identity Store omits it | | `title` | string | Job title, or null when the Identity Store omits it | +| `givenName` | string | Given \(first\) name, or null when the Identity Store omits it | +| `familyName` | string | Family \(last\) name, or null when the Identity Store omits it | | `externalIds` | array | External identity provider IDs linked to the user | | ↳ `issuer` | string | Identity provider that issued the ID | | ↳ `id` | string | Identifier at the issuer | @@ -218,6 +227,9 @@ Look up a group in the Identity Store by display name | `groupId` | string | Identity Store group ID \(use as principalId\) | | `displayName` | string | Display name of the group | | `description` | string | Group description | +| `externalIds` | array | External identity provider IDs linked to the group | +| ↳ `issuer` | string | Identity provider that issued the ID | +| ↳ `id` | string | Identifier at the issuer | @@ -450,6 +462,7 @@ List every account and permission set a specific user or group is assigned. Use | `principalType` | string | Yes | Type of principal: USER or GROUP | | `maxResults` | number | No | Maximum number of assignments to return \(1-100\) | | `nextToken` | string | No | Pagination token from a previous request | +| `accountId` | string | No | Only return assignments in this 12-digit AWS account ID | #### Output diff --git a/apps/docs/content/docs/integrations/lambda.mdx b/apps/docs/content/docs/integrations/lambda.mdx index bce1356987f..11b03c06ae2 100644 --- a/apps/docs/content/docs/integrations/lambda.mdx +++ b/apps/docs/content/docs/integrations/lambda.mdx @@ -58,6 +58,7 @@ Invoke a Lambda function synchronously for its response payload, asynchronously | `logType` | string | No | Set to Tail to return the last 4 KB of the execution log | | `clientContext` | string | No | Base64-encoded JSON passed to the function in the client context object \(max 3,583 bytes\) | | `qualifier` | string | No | Version number or alias name to act on. Omit to target the function itself | +| `tenantId` | string | No | Tenant identifier for a function with tenant isolation enabled \(required by those functions, rejected by others\) | #### Output @@ -116,7 +117,7 @@ Get a function's configuration, code location, tags, and reserved concurrency | --------- | ---- | ----------- | | `configuration` | json | The function's configuration \(ARN, runtime, handler, memory, state, layers, VPC, and logging settings\) | | `tagsError` | json | Why the tags could not be read, when a partial tag-read failure occurred | -| `code` | json | Presigned download URL for the deployment package, or the container image URI | +| `code` | json | Deployment package location \(repositoryType, location presigned download URL, imageUri, resolvedImageUri, sourceKmsKeyArn, and error when the code cannot be retrieved\) | | `tags` | json | The function's tags | | `reservedConcurrentExecutions` | number | Concurrency reserved for this function, if any | @@ -250,6 +251,8 @@ Update a function's settings such as memory, timeout, role, and environment vari | `snapStartApplyOn` | string | No | Set to PublishedVersions to snapshot the initialized environment when a version is published | | `logFormat` | string | No | Format the function sends CloudWatch logs in | | `logGroup` | string | No | CloudWatch log group the function sends logs to | +| `applicationLogLevel` | string | No | Minimum application log level sent to CloudWatch: TRACE, DEBUG, INFO, WARN, ERROR, or FATAL. Requires the JSON log format | +| `systemLogLevel` | string | No | Minimum system log level sent to CloudWatch: DEBUG, INFO, or WARN. Requires the JSON log format | | `revisionId` | string | No | Update the resource only if its current revision ID matches this value | #### Output diff --git a/apps/docs/content/docs/integrations/rds.mdx b/apps/docs/content/docs/integrations/rds.mdx index 493311bd8ad..e676b851c44 100644 --- a/apps/docs/content/docs/integrations/rds.mdx +++ b/apps/docs/content/docs/integrations/rds.mdx @@ -34,6 +34,7 @@ Execute a SELECT query on Amazon RDS using the Data API | `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials | | `database` | string | No | Database name to connect to \(e.g., mydb, production_db\) | | `query` | string | Yes | SQL SELECT query to execute \(e.g., SELECT * FROM users WHERE status = :status\) | +| `parameters` | json | No | Values bound to :name placeholders in the query, so input never needs to be spliced into the SQL. Either an object \(e.g., \{"status": "active", "id": 5\}\) or an array of \{name, value, typeHint\} entries, where typeHint is DATE, DECIMAL, JSON, TIME, TIMESTAMP, or UUID \(e.g., \[\{"name": "id", "value": "6f1c...", "typeHint": "UUID"\}\]\) | #### Output @@ -69,6 +70,7 @@ Insert data into an Amazon RDS table using the Data API | `message` | string | Operation status message | | `rows` | array | Array of inserted rows | | `rowCount` | number | Number of rows inserted | +| `generatedFields` | array | Values generated by the insert, such as auto-increment IDs \(Aurora MySQL only\) | @@ -142,6 +144,7 @@ Execute raw SQL on Amazon RDS using the Data API | `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials | | `database` | string | No | Database name to connect to \(e.g., mydb, production_db\) | | `query` | string | Yes | Raw SQL query to execute \(e.g., CREATE TABLE users \(id SERIAL PRIMARY KEY, name VARCHAR\(255\)\)\) | +| `parameters` | json | No | Values bound to :name placeholders in the query, so input never needs to be spliced into the SQL. Either an object \(e.g., \{"status": "active", "id": 5\}\) or an array of \{name, value, typeHint\} entries, where typeHint is DATE, DECIMAL, JSON, TIME, TIMESTAMP, or UUID \(e.g., \[\{"name": "id", "value": "6f1c...", "typeHint": "UUID"\}\]\) | #### Output @@ -150,6 +153,7 @@ Execute raw SQL on Amazon RDS using the Data API | `message` | string | Operation status message | | `rows` | array | Array of rows returned or affected | | `rowCount` | number | Number of rows affected | +| `generatedFields` | array | Values generated by the statement, such as auto-increment IDs \(Aurora MySQL only; use RETURNING on PostgreSQL\) | diff --git a/apps/docs/content/docs/integrations/s3.mdx b/apps/docs/content/docs/integrations/s3.mdx index 232b598899d..a5d5efd616f 100644 --- a/apps/docs/content/docs/integrations/s3.mdx +++ b/apps/docs/content/docs/integrations/s3.mdx @@ -36,6 +36,10 @@ Upload a file to an AWS S3 bucket | `content` | string | No | Text content to upload \(alternative to file\) | | `contentType` | string | No | Content-Type header \(auto-detected from file if not provided\) | | `acl` | string | No | Access control list \(e.g., private, public-read\) | +| `metadata` | json | No | User-defined object metadata stored as x-amz-meta-* headers, as a JSON object of string values \(e.g., \{"department": "finance"\}\) | +| `storageClass` | string | No | Storage class \(e.g., STANDARD, STANDARD_IA, INTELLIGENT_TIERING, GLACIER_IR\). Defaults to STANDARD. | +| `serverSideEncryption` | string | No | Server-side encryption algorithm: AES256, aws:kms, or aws:kms:dsse | +| `sseKmsKeyId` | string | No | KMS key ID or ARN to encrypt with when serverSideEncryption is aws:kms | #### Output @@ -43,7 +47,7 @@ Upload a file to an AWS S3 bucket | --------- | ---- | ----------- | | `url` | string | URL of the uploaded S3 object | | `uri` | string | S3 URI of the uploaded object \(s3://bucket/key\) | -| `metadata` | object | Upload metadata including ETag and location | +| `metadata` | object | Upload metadata: etag, location, key, bucket, versionId \(versioned buckets\), and serverSideEncryption | @@ -66,7 +70,7 @@ Retrieve an object from an AWS S3 bucket | --------- | ---- | ----------- | | `url` | string | Pre-signed URL for downloading the S3 object | | `file` | file | Downloaded file stored in execution files | -| `metadata` | object | File metadata including type, size, name, and last modified date | +| `metadata` | object | File metadata: fileType, size, name, lastModified, etag, versionId \(versioned buckets\), storageClass \(omitted by S3 for STANDARD\), serverSideEncryption, and userMetadata \(x-amz-meta-* values keyed without the prefix\) | @@ -85,6 +89,8 @@ List objects in an AWS S3 bucket | `prefix` | string | No | Prefix to filter objects \(e.g., folder/, images/2024/\) | | `maxKeys` | number | No | Maximum number of objects to return \(default: 1000\) | | `continuationToken` | string | No | Token for pagination from previous list response | +| `delimiter` | string | No | Character that groups keys \(usually /\). Keys sharing a prefix up to the delimiter are returned once in commonPrefixes instead of in objects, like folders. | +| `startAfter` | string | No | Key to start listing after \(e.g., folder/file-100.txt\) | #### Output @@ -95,6 +101,8 @@ List objects in an AWS S3 bucket | ↳ `size` | number | Object size in bytes | | ↳ `lastModified` | string | Last modified timestamp | | ↳ `etag` | string | Entity tag | +| ↳ `storageClass` | string | Storage class \(e.g., STANDARD, GLACIER\) | +| `commonPrefixes` | array | Folder-like prefixes grouped by the delimiter \(empty without a delimiter\) | | `metadata` | object | Listing metadata including pagination info | diff --git a/apps/docs/content/docs/integrations/secrets_manager.mdx b/apps/docs/content/docs/integrations/secrets_manager.mdx index 06e16ad4ee9..0193b0ba9df 100644 --- a/apps/docs/content/docs/integrations/secrets_manager.mdx +++ b/apps/docs/content/docs/integrations/secrets_manager.mdx @@ -41,7 +41,8 @@ Retrieve a secret value from AWS Secrets Manager | Parameter | Type | Description | | --------- | ---- | ----------- | | `name` | string | Name of the secret | -| `secretValue` | string | The decrypted secret value | +| `secretValue` | string | The decrypted secret value \(empty when the secret is stored as binary\) | +| `secretBinary` | string | Base64-encoded decrypted binary secret value, when stored as SecretBinary | | `arn` | string | ARN of the secret | | `versionId` | string | Version ID of the secret | | `versionStages` | array | Staging labels attached to this version | @@ -62,12 +63,16 @@ List secrets stored in AWS Secrets Manager | `region` | string | Yes | AWS region \(e.g., us-east-1\) | | `maxResults` | number | No | Maximum number of secrets to return \(1-100, default 100\) | | `nextToken` | string | No | Pagination token from a previous request | +| `filters` | json | No | Filters as an array of \{key, values\}. key is one of description, name, tag-key, tag-value, primary-region, owning-service, all \(e.g., \[\{"key":"name","values":\["prod/"\]\}\]\) | +| `sortOrder` | string | No | Sort order: asc or desc \(default asc\) | +| `sortBy` | string | No | Field to sort by: created-date, last-accessed-date, last-changed-date, or name \(default created-date\) | +| `includePlannedDeletion` | boolean | No | Include secrets scheduled for deletion \(default false\) | #### Output | Parameter | Type | Description | | --------- | ---- | ----------- | -| `secrets` | json | List of secrets with name, ARN, description, dates, rotation rules/window, and version-to-stage mappings | +| `secrets` | json | List of secrets with name, ARN, description, KMS key, rotation Lambda ARN, owning service, primary region, dates, tags, rotation rules/window, and version-to-stage mappings | | `nextToken` | string | Pagination token for the next page of results | | `count` | number | Number of secrets returned | @@ -87,6 +92,8 @@ Create a new secret in AWS Secrets Manager | `name` | string | Yes | Name of the secret to create | | `secretValue` | string | Yes | The secret value \(plain text or JSON string\) | | `description` | string | No | Description of the secret | +| `kmsKeyId` | string | No | ARN, key ID, or alias of the KMS key used to encrypt the secret \(defaults to aws/secretsmanager\) | +| `tags` | json | No | Tags to attach to the new secret, as an array of \{key, value\} pairs | #### Output @@ -113,6 +120,7 @@ Update the value of an existing secret in AWS Secrets Manager | `secretId` | string | Yes | The name or ARN of the secret to update | | `secretValue` | string | Yes | The new secret value \(plain text or JSON string\) | | `description` | string | No | Updated description of the secret | +| `kmsKeyId` | string | No | ARN, key ID, or alias of a new KMS key to encrypt the new secret version | #### Output diff --git a/apps/docs/content/docs/integrations/ses.mdx b/apps/docs/content/docs/integrations/ses.mdx index 3a9719dfd91..83c083bd13e 100644 --- a/apps/docs/content/docs/integrations/ses.mdx +++ b/apps/docs/content/docs/integrations/ses.mdx @@ -39,6 +39,8 @@ Send an email via AWS SES using simple or HTML content | `bccAddresses` | string | No | Comma-separated list of BCC email addresses | | `replyToAddresses` | string | No | Comma-separated list of reply-to email addresses | | `configurationSetName` | string | No | SES configuration set name for tracking | +| `fromName` | string | No | Friendly sender name shown with the From address \(e.g., Acme Support\) | +| `emailTags` | json | No | Message tags for filtering sending events, as a JSON array of \{"name", "value"\} objects \(letters, digits, _ and - only, up to 256 characters\) | #### Output @@ -65,7 +67,10 @@ Send an email using an SES email template with dynamic template data | `templateData` | string | Yes | JSON string of key-value pairs for template variable substitution | | `ccAddresses` | string | No | Comma-separated list of CC email addresses | | `bccAddresses` | string | No | Comma-separated list of BCC email addresses | +| `replyToAddresses` | string | No | Comma-separated list of reply-to email addresses | | `configurationSetName` | string | No | SES configuration set name for tracking | +| `fromName` | string | No | Friendly sender name shown with the From address \(e.g., Acme Support\) | +| `emailTags` | json | No | Message tags for filtering sending events, as a JSON array of \{"name", "value"\} objects \(letters, digits, _ and - only, up to 256 characters\) | #### Output @@ -88,9 +93,12 @@ Send emails to multiple recipients using an SES template with per-recipient data | `region` | string | Yes | AWS region \(e.g., us-east-1\) | | `fromAddress` | string | Yes | Verified sender email address | | `templateName` | string | Yes | Name of the SES email template to use | -| `destinations` | string | Yes | JSON array of destination objects with toAddresses \(string\[\]\) and optional templateData \(JSON string\); falls back to defaultTemplateData when omitted | +| `destinations` | string | Yes | JSON array of destination objects with toAddresses \(string\[\]\), optional ccAddresses and bccAddresses \(string\[\]\), and optional templateData \(JSON string\); templateData falls back to defaultTemplateData when omitted | | `defaultTemplateData` | string | No | Default JSON template data used when a destination does not specify its own | +| `replyToAddresses` | string | No | Comma-separated list of reply-to email addresses | | `configurationSetName` | string | No | SES configuration set name for tracking | +| `fromName` | string | No | Friendly sender name shown with the From address \(e.g., Acme Support\) | +| `emailTags` | json | No | Default message tags applied to every destination for filtering sending events, as a JSON array of \{"name", "value"\} objects \(letters, digits, _ and - only, up to 256 characters\) | #### Output @@ -146,6 +154,8 @@ Get SES account sending quota and status information | `max24HourSend` | number | Maximum emails allowed per 24-hour period | | `maxSendRate` | number | Maximum emails allowed per second | | `sentLast24Hours` | number | Number of emails sent in the last 24 hours | +| `productionAccessEnabled` | boolean | Whether the account has production access \(false while in the SES sandbox\) | +| `enforcementStatus` | string | Account sending status: HEALTHY, PROBATION, or SHUTDOWN | diff --git a/apps/docs/content/docs/integrations/sts.mdx b/apps/docs/content/docs/integrations/sts.mdx index d758e051a3f..20a2fb0f9ba 100644 --- a/apps/docs/content/docs/integrations/sts.mdx +++ b/apps/docs/content/docs/integrations/sts.mdx @@ -40,6 +40,7 @@ Assume an IAM role and receive temporary security credentials | `policyArns` | string | No | Comma-separated ARNs of up to 10 IAM managed policies to use as session policies | | `tags` | string | No | JSON object of up to 50 session tag key/value pairs for attribute-based access control | | `transitiveTagKeys` | string | No | Comma-separated tag keys that propagate through role chaining | +| `sourceIdentity` | string | No | Source identity to set on the role session \(2-64 characters; cannot start with aws:\) | #### Output diff --git a/apps/docs/content/docs/integrations/textract.mdx b/apps/docs/content/docs/integrations/textract.mdx index c2fce26bce1..2bc37fd068b 100644 --- a/apps/docs/content/docs/integrations/textract.mdx +++ b/apps/docs/content/docs/integrations/textract.mdx @@ -74,6 +74,11 @@ Parse documents using AWS Textract OCR and document analysis | `documentMetadata` | object | Metadata about the analyzed document | | ↳ `pages` | number | Number of pages in the document | | `modelVersion` | string | Version of the Textract model used for processing | +| `jobStatus` | string | Async job status: SUCCEEDED or PARTIAL_SUCCESS \(multi-page mode only\) | +| `statusMessage` | string | Why an async job only partially succeeded \(multi-page mode only\) | +| `warnings` | array | Async job warnings for pages Textract could not fully process | +| ↳ `errorCode` | string | Warning error code | +| ↳ `pages` | array | Page numbers the warning applies to | @@ -107,6 +112,11 @@ Extract structured invoice and receipt fields using AWS Textract AnalyzeExpense | `documentMetadata` | object | Metadata about the analyzed document | | ↳ `pages` | number | Number of pages in the document | | `modelVersion` | string | Version of the AnalyzeExpense model used \(multi-page/async only\) | +| `jobStatus` | string | Async job status: SUCCEEDED or PARTIAL_SUCCESS \(multi-page mode only\) | +| `statusMessage` | string | Why an async job only partially succeeded \(multi-page mode only\) | +| `warnings` | array | Async job warnings for pages Textract could not fully process | +| ↳ `errorCode` | string | Warning error code | +| ↳ `pages` | array | Page numbers the warning applies to | diff --git a/apps/sim/blocks/blocks/athena.ts b/apps/sim/blocks/blocks/athena.ts index 923de16a681..eb99711a3ca 100644 --- a/apps/sim/blocks/blocks/athena.ts +++ b/apps/sim/blocks/blocks/athena.ts @@ -341,6 +341,48 @@ Return ONLY a JSON array of strings — no explanations, no markdown code blocks }, mode: 'advanced', }, + { + id: 'encryptionOption', + title: 'Result Encryption', + type: 'dropdown', + options: [ + { label: 'Workgroup default', id: '' }, + { label: 'SSE-S3', id: 'SSE_S3' }, + { label: 'SSE-KMS', id: 'SSE_KMS' }, + { label: 'CSE-KMS', id: 'CSE_KMS' }, + ], + value: () => '', + condition: { field: 'operation', value: 'start_query' }, + mode: 'advanced', + }, + { + id: 'kmsKey', + title: 'KMS Key', + type: 'short-input', + placeholder: 'arn:aws:kms:us-east-1:123456789012:key/...', + condition: { + field: 'operation', + value: 'start_query', + and: { field: 'encryptionOption', value: ['SSE_KMS', 'CSE_KMS'] }, + }, + mode: 'advanced', + }, + { + id: 'expectedBucketOwner', + title: 'Expected Bucket Owner', + type: 'short-input', + placeholder: '123456789012', + condition: { field: 'operation', value: 'start_query' }, + mode: 'advanced', + }, + { + id: 'clientRequestToken', + title: 'Client Request Token', + type: 'short-input', + placeholder: 'Unique 32-128 character idempotency token', + condition: { field: 'operation', value: 'start_query' }, + mode: 'advanced', + }, { id: 'queryExecutionId', title: 'Query Execution ID', @@ -670,6 +712,12 @@ Return ONLY a JSON array of strings — no explanations, no markdown code blocks ...(resultReuseEnabled !== undefined && { resultReuseEnabled }), ...(resultReuseEnabled && resultReuseMaxAgeInMinutes !== undefined && { resultReuseMaxAgeInMinutes }), + ...(rest.encryptionOption && { encryptionOption: rest.encryptionOption }), + ...(rest.encryptionOption && + rest.encryptionOption !== 'SSE_S3' && + rest.kmsKey && { kmsKey: rest.kmsKey }), + ...(rest.expectedBucketOwner && { expectedBucketOwner: rest.expectedBucketOwner }), + ...(rest.clientRequestToken && { clientRequestToken: rest.clientRequestToken }), } case 'get_query_execution': @@ -1014,6 +1062,19 @@ Return ONLY a JSON array of strings — no explanations, no markdown code blocks description: 'Comma-separated prepared statement names (up to 256)', }, tableName: { type: 'string', description: 'Table name to get metadata for' }, + encryptionOption: { + type: 'string', + description: 'Query result encryption (SSE_S3, SSE_KMS, CSE_KMS)', + }, + kmsKey: { type: 'string', description: 'KMS key for SSE_KMS or CSE_KMS result encryption' }, + expectedBucketOwner: { + type: 'string', + description: 'Account ID expected to own the output location bucket', + }, + clientRequestToken: { + type: 'string', + description: 'Idempotency token for starting a query (32-128 characters)', + }, }, outputs: { queryExecutionId: { @@ -1081,9 +1142,38 @@ Return ONLY a JSON array of strings — no explanations, no markdown code blocks type: 'string', description: 'S3 location of query results', }, + servicePreProcessingTimeInMillis: { + type: 'number', + description: 'Time Athena spent preprocessing the query, in ms', + }, + serviceProcessingTimeInMillis: { + type: 'number', + description: 'Time Athena spent publishing results after execution, in ms', + }, + dataManifestLocation: { + type: 'string', + description: 'S3 location of the manifest of files written by the query', + }, + reusedPreviousResult: { + type: 'boolean', + description: 'Whether the query reused a previous result', + }, + athenaError: { + type: 'json', + description: + 'Failure details for a FAILED query (errorCategory, errorType, retryable, errorMessage)', + }, + executionParameters: { + type: 'array', + description: 'Values supplied for the query placeholders', + }, + substatementType: { + type: 'string', + description: 'Kind of statement that was run (e.g., SELECT, INSERT)', + }, columns: { type: 'array', - description: 'Column metadata (name and type)', + description: 'Column metadata (name, type, label, precision, scale, nullable, caseSensitive)', }, rows: { type: 'array', @@ -1212,7 +1302,7 @@ Return ONLY a JSON array of strings — no explanations, no markdown code blocks }, engineVersion: { type: 'json', - description: 'Workgroup engine version (selected and effective)', + description: 'Engine version of the workgroup or query execution (selected and effective)', }, identityCenterApplicationArn: { type: 'string', diff --git a/apps/sim/blocks/blocks/aws-stale-inputs.test.ts b/apps/sim/blocks/blocks/aws-stale-inputs.test.ts new file mode 100644 index 00000000000..971b6288c53 --- /dev/null +++ b/apps/sim/blocks/blocks/aws-stale-inputs.test.ts @@ -0,0 +1,96 @@ +/** + * The executor hands a tool `{ ...rawInputs, ...blockParams }`, so a subBlock value the + * block mapper leaves unassigned reaches the tool raw. These cases keep stored values + * from another operation, and empty table rows, out of requests. + */ +import { describe, expect, it } from 'vitest' +import { awsCloudformationCreateChangeSetContract } from '@/lib/api/contracts/tools/aws/cloudformation-create-change-set' +import { awsDynamodbScanContract } from '@/lib/api/contracts/tools/aws/dynamodb-scan' +import { awsIamCreateUserContract } from '@/lib/api/contracts/tools/aws/iam-create-user' +import { awsIamListPoliciesContract } from '@/lib/api/contracts/tools/aws/iam-list-policies' +import { awsSesSendTemplatedEmailContract } from '@/lib/api/contracts/tools/aws/ses-send-templated-email' +import { CloudFormationBlock } from '@/blocks/blocks/cloudformation' +import { DynamoDBBlock } from '@/blocks/blocks/dynamodb' +import { IAMBlock } from '@/blocks/blocks/iam' +import { SESBlock } from '@/blocks/blocks/ses' +import type { BlockConfig } from '@/blocks/types' +import { createChangeSetTool } from '@/tools/cloudformation/create_change_set' +import { scanTool } from '@/tools/dynamodb/scan' +import { createUserTool } from '@/tools/iam/create_user' +import { listPoliciesTool } from '@/tools/iam/list_policies' +import { sendTemplatedEmailTool } from '@/tools/ses/send_templated_email' + +const AWS = { region: 'us-east-1', accessKeyId: 'AKIAEXAMPLE', secretAccessKey: 'secret' } + +function executorParams(block: BlockConfig, inputs: Record) { + const mapped = block.tools.config?.params?.(inputs) ?? {} + return { ...inputs, ...mapped } as Record +} + +describe('AWS blocks keep stale subBlock values out of tool input', () => { + it('scan ignores the get consistentRead and query indexName values', () => { + const params = executorParams(DynamoDBBlock, { + ...AWS, + operation: 'scan', + tableName: 'orders', + consistentRead: 'false', + indexName: 'by-customer', + }) + const body = scanTool.operation.input(params as never) as Record + expect(body.indexName).toBeUndefined() + expect(awsDynamodbScanContract.body?.safeParse(body).success).toBe(true) + }) + + it('templated send ignores the send_email Reply-To', () => { + const params = executorParams(SESBlock, { + ...AWS, + operation: 'send_templated_email', + fromAddress: 'from@example.com', + toAddresses: 'to@example.com', + templateName: 'welcome', + templateData: '{}', + replyToAddresses: 'stale@example.com', + }) + const body = sendTemplatedEmailTool.operation.input(params as never) as Record + expect(body.replyToAddresses).toBeUndefined() + expect(awsSesSendTemplatedEmailContract.body?.safeParse(body).success).toBe(true) + }) + + it('create change set ignores the stack tags', () => { + const params = executorParams(CloudFormationBlock, { + awsRegion: 'us-east-1', + awsAccessKeyId: 'AKIAEXAMPLE', + awsSecretAccessKey: 'secret', + operation: 'create_change_set', + stackName: 'app', + changeSetName: 'cs-1', + templateBody: '{}', + tags: '[{"key":"team","value":"old"}]', + }) + const body = createChangeSetTool.operation.input(params as never) as Record + expect(body.tags).toBeUndefined() + expect(awsCloudformationCreateChangeSetContract.body?.safeParse(body).success).toBe(true) + }) + + it('create user accepts an untouched Tags table', () => { + const params = executorParams(IAMBlock, { + ...AWS, + operation: 'create_user', + userName: 'alice', + tags: [{ id: 'row-1', cells: { key: '', value: '' } }], + }) + const body = createUserTool.operation.input(params as never) + expect(awsIamCreateUserContract.body?.safeParse(body).success).toBe(true) + }) + + it('list policies with the All usage filter sends no filter', () => { + const params = executorParams(IAMBlock, { + ...AWS, + operation: 'list_policies', + policyUsageFilter: 'all', + }) + const body = listPoliciesTool.operation.input(params as never) as Record + expect(body.policyUsageFilter).toBeUndefined() + expect(awsIamListPoliciesContract.body?.safeParse(body).success).toBe(true) + }) +}) diff --git a/apps/sim/blocks/blocks/cloudformation.ts b/apps/sim/blocks/blocks/cloudformation.ts index 75c6b01007c..75eb9753de0 100644 --- a/apps/sim/blocks/blocks/cloudformation.ts +++ b/apps/sim/blocks/blocks/cloudformation.ts @@ -275,6 +275,48 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`, placeholder: 'Describe the tags to apply...', }, }, + { + id: 'changeSetTags', + title: 'Tags (JSON)', + type: 'code', + placeholder: '[\n {"key": "env", "value": "prod"}\n]', + condition: { field: 'operation', value: 'create_change_set' }, + mode: 'advanced', + wandConfig: { + enabled: true, + prompt: `Generate a CloudFormation stack tags JSON array based on the user's description. +Each item must be an object with "key" and "value" string fields. + +Return ONLY valid JSON - no explanations, no markdown code blocks.`, + placeholder: 'Describe the tags to apply...', + }, + }, + { + id: 'roleArn', + title: 'Service Role ARN', + type: 'short-input', + placeholder: 'arn:aws:iam::123456789012:role/cfn-deploy (optional)', + condition: { + field: 'operation', + value: ['create_stack', 'update_stack', 'create_change_set'], + }, + mode: 'advanced', + }, + { + id: 'enableTerminationProtection', + title: 'Termination Protection', + type: 'switch', + condition: { field: 'operation', value: 'create_stack' }, + mode: 'advanced', + }, + { + id: 'changeSetNextToken', + title: 'Next Token', + type: 'short-input', + placeholder: 'nextToken from a previous Describe Change Set call', + condition: { field: 'operation', value: 'describe_change_set' }, + mode: 'advanced', + }, { id: 'onFailure', title: 'On Failure', @@ -437,6 +479,11 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`, ...(parsedTimeoutInMinutes !== undefined && { timeoutInMinutes: parsedTimeoutInMinutes, }), + ...(rest.roleArn && { roleArn: rest.roleArn }), + ...((rest.enableTerminationProtection === true || + rest.enableTerminationProtection === 'true') && { + enableTerminationProtection: true, + }), } } @@ -457,6 +504,7 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`, ...(parameters && { parameters: parseJson(parameters, 'parameters') }), ...(rest.capabilities && { capabilities: rest.capabilities }), ...(tags && { tags: parseJson(tags, 'tags') }), + ...(rest.roleArn && { roleArn: rest.roleArn }), } } @@ -501,6 +549,8 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`, ...(rest.capabilities && { capabilities: rest.capabilities }), ...(rest.changeSetType && { changeSetType: rest.changeSetType }), ...(rest.changeSetDescription && { description: rest.changeSetDescription }), + tags: rest.changeSetTags ? parseJson(rest.changeSetTags, 'tags') : undefined, + ...(rest.roleArn && { roleArn: rest.roleArn }), } } @@ -512,6 +562,7 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`, awsSecretAccessKey, changeSetName: rest.changeSetName, ...(rest.stackName && { stackName: rest.stackName }), + ...(rest.changeSetNextToken && { nextToken: rest.changeSetNextToken }), } } @@ -637,6 +688,16 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`, parameters: { type: 'json', description: 'Stack input parameters' }, capabilities: { type: 'string', description: 'Comma-separated capabilities to acknowledge' }, tags: { type: 'json', description: 'Tags to apply to the stack' }, + changeSetTags: { type: 'json', description: 'Tags to apply through a change set' }, + roleArn: { type: 'string', description: 'IAM service role ARN CloudFormation assumes' }, + enableTerminationProtection: { + type: 'boolean', + description: 'Enable termination protection on a new stack', + }, + changeSetNextToken: { + type: 'string', + description: 'Pagination token for Describe Change Set changes', + }, onFailure: { type: 'string', description: 'Action to take on stack creation failure' }, timeoutInMinutes: { type: 'number', description: 'Stack creation timeout in minutes' }, retainResources: { @@ -652,7 +713,8 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`, outputs: { stacks: { type: 'array', - description: 'List of CloudFormation stacks with status, outputs, and tags', + description: + 'CloudFormation stacks [{stackName, stackId, stackStatus, stackStatusReason, detailedStatus, creationTime, lastUpdatedTime, deletionTime, description, outputs [{outputKey, outputValue, description, exportName}], parameters [{parameterKey, parameterValue, resolvedValue}], tags, capabilities, driftInformation, roleArn, parentId, rootId, changeSetId, notificationArns, timeoutInMinutes, disableRollback, enableTerminationProtection}]', }, resources: { type: 'array', @@ -660,7 +722,8 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`, }, events: { type: 'array', - description: 'Stack events with resource status and timestamps', + description: + 'Stack events [{eventId, logicalResourceId, physicalResourceId, resourceType, resourceStatus, resourceStatusReason, detailedStatus, resourceProperties, clientRequestToken, operationId, hook fields, timestamp}]', }, stackDriftDetectionId: { type: 'string', @@ -704,7 +767,8 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`, }, parameters: { type: 'array', - description: 'Template parameters', + description: + 'Template parameters (validate/template summary) or change set parameters (parameterKey, parameterValue, resolvedValue)', }, capabilities: { type: 'array', @@ -756,7 +820,40 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`, }, changes: { type: 'array', - description: 'List of resource changes a change set would make', + description: + 'Resource changes a change set would make [{action, logicalResourceId, physicalResourceId, resourceType, replacement, scope, details}]', + }, + tags: { + type: 'array', + description: 'Tags associated with the change set', + }, + notificationArns: { + type: 'array', + description: 'SNS topic ARNs for change set stack events', + }, + includeNestedStacks: { + type: 'boolean', + description: 'Whether change sets were created for nested stacks', + }, + parentChangeSetId: { + type: 'string', + description: 'Parent change set ID, for nested change sets', + }, + rootChangeSetId: { + type: 'string', + description: 'Top-level change set ID, for nested change sets', + }, + onStackFailure: { + type: 'string', + description: 'Behavior when change set stack operations fail', + }, + importExistingResources: { + type: 'boolean', + description: 'Whether the change set imports existing resources', + }, + nextToken: { + type: 'string', + description: 'Pagination token for the next page of change set changes', }, }, } diff --git a/apps/sim/blocks/blocks/cloudwatch.ts b/apps/sim/blocks/blocks/cloudwatch.ts index ccaf98917c8..83445492d2e 100644 --- a/apps/sim/blocks/blocks/cloudwatch.ts +++ b/apps/sim/blocks/blocks/cloudwatch.ts @@ -497,6 +497,22 @@ Return ONLY the filter pattern - no explanations, no extra text.`, columns: ['name', 'value'], condition: { field: 'operation', value: 'get_metric_statistics' }, }, + { + id: 'metricExtendedStatistics', + title: 'Percentile Statistics', + type: 'short-input', + placeholder: 'p99, p95 (requested instead of Statistics when set)', + condition: { field: 'operation', value: 'get_metric_statistics' }, + mode: 'advanced', + }, + { + id: 'metricStatisticsUnit', + title: 'Unit Filter', + type: 'short-input', + placeholder: 'e.g., Percent, Milliseconds (omit for all units)', + condition: { field: 'operation', value: 'get_metric_statistics' }, + mode: 'advanced', + }, { id: 'alarmNamePrefix', title: 'Alarm Name Prefix', @@ -651,6 +667,30 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`, mode: 'advanced', description: 'Unix epoch seconds. Defaults to now (mute starts immediately).', }, + { + id: 'filterNextToken', + title: 'Next Token', + type: 'short-input', + placeholder: 'nextToken from a previous Filter Log Events call', + condition: { field: 'operation', value: 'filter_log_events' }, + mode: 'advanced', + }, + { + id: 'logEventsNextToken', + title: 'Next Token', + type: 'short-input', + placeholder: 'nextForwardToken or nextBackwardToken from a previous call', + condition: { field: 'operation', value: 'get_log_events' }, + mode: 'advanced', + }, + { + id: 'alarmsNextToken', + title: 'Next Token', + type: 'short-input', + placeholder: 'nextToken from a previous Describe Alarms call', + condition: { field: 'operation', value: 'describe_alarms' }, + mode: 'advanced', + }, { id: 'limit', title: 'Limit', @@ -788,6 +828,7 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`, ...(startTime && { startTime: Number(startTime) }), ...(endTime && { endTime: Number(endTime) }), ...(parsedLimit !== undefined && { limit: parsedLimit }), + ...(rest.logEventsNextToken && { nextToken: rest.logEventsNextToken }), } } @@ -826,6 +867,7 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`, startFromHead: rest.startFromHead === 'true' || rest.startFromHead === true, }), ...(parsedLimit !== undefined && { limit: parsedLimit }), + ...(rest.filterNextToken && { nextToken: rest.filterNextToken }), } } @@ -892,6 +934,15 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`, endTime: Number(endTime), period: Number(rest.metricPeriod), statistics: Array.isArray(stat) ? stat : [stat], + ...(rest.metricExtendedStatistics && { + extendedStatistics: Array.isArray(rest.metricExtendedStatistics) + ? rest.metricExtendedStatistics + : String(rest.metricExtendedStatistics) + .split(',') + .map((s: string) => s.trim()) + .filter(Boolean), + }), + ...(rest.metricStatisticsUnit && { unit: rest.metricStatisticsUnit }), ...(rest.metricDimensions && { dimensions: (() => { const dims = rest.metricDimensions @@ -962,6 +1013,7 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`, ...(rest.stateValue && { stateValue: rest.stateValue }), ...(rest.alarmType && { alarmType: rest.alarmType }), ...(parsedLimit !== undefined && { limit: parsedLimit }), + ...(rest.alarmsNextToken && { nextToken: rest.alarmsNextToken }), } case 'describe_alarm_history': @@ -1099,6 +1151,20 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`, metricPeriod: { type: 'number', description: 'Granularity in seconds' }, metricStatistics: { type: 'string', description: 'Statistic type (Average, Sum, etc.)' }, metricDimensions: { type: 'json', description: 'Metric dimensions (Name/Value pairs)' }, + metricExtendedStatistics: { + type: 'string', + description: 'Comma-separated percentile statistics (e.g., p99, p95)', + }, + metricStatisticsUnit: { + type: 'string', + description: 'Only return metric data reported with this unit', + }, + filterNextToken: { type: 'string', description: 'Pagination token for Filter Log Events' }, + logEventsNextToken: { + type: 'string', + description: 'Forward or backward pagination token for Get Log Events', + }, + alarmsNextToken: { type: 'string', description: 'Pagination token for Describe Alarms' }, metricValue: { type: 'number', description: 'Metric value to publish' }, metricUnit: { type: 'string', description: 'Metric unit (Count, Seconds, Bytes, etc.)' }, publishDimensions: { @@ -1138,13 +1204,30 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`, type: 'string', description: 'Query completion status', }, + queryId: { + type: 'string', + description: 'ID of the Logs Insights query', + }, + nextToken: { + type: 'string', + description: 'Pagination token for the next page (Filter Log Events, Describe Alarms)', + }, + nextForwardToken: { + type: 'string', + description: 'Token for the next, newer page of Get Log Events results', + }, + nextBackwardToken: { + type: 'string', + description: 'Token for the previous, older page of Get Log Events results', + }, logGroups: { type: 'array', description: 'List of CloudWatch log groups', }, events: { type: 'array', - description: 'Log events with timestamp and message', + description: + 'Log events [{timestamp, message, ingestionTime, logStreamName, eventId}] (logStreamName and eventId from Filter Log Events)', }, logStreams: { type: 'array', @@ -1160,15 +1243,18 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`, }, datapoints: { type: 'array', - description: 'Metric datapoints with timestamps and values', + description: + 'Metric datapoints [{timestamp, average, sum, minimum, maximum, sampleCount, unit, extendedStatistics}]', }, alarms: { type: 'array', - description: 'CloudWatch alarms with state and configuration', + description: + 'CloudWatch alarms [{alarmName, alarmArn, alarmType, stateValue, stateReason, stateReasonData, alarmDescription, actionsEnabled, alarmActions, okActions, insufficientDataActions, metricName, namespace, statistic, extendedStatistic, dimensions, period, unit, threshold, comparisonOperator, evaluationPeriods, datapointsToAlarm, treatMissingData, metrics, alarmRule, stateUpdatedTimestamp, stateTransitionedTimestamp}]', }, alarmHistoryItems: { type: 'array', - description: 'Alarm history items (state changes, configuration updates, actions)', + description: + 'Alarm history items [{alarmName, alarmType, timestamp, historyItemType, historySummary, historyData, alarmContributorId}]', }, alarmNames: { type: 'array', diff --git a/apps/sim/blocks/blocks/dynamodb.ts b/apps/sim/blocks/blocks/dynamodb.ts index dacec45fb7a..1a67c12ad29 100644 --- a/apps/sim/blocks/blocks/dynamodb.ts +++ b/apps/sim/blocks/blocks/dynamodb.ts @@ -588,6 +588,117 @@ Return ONLY the expression - no explanations.`, condition: { field: 'operation', value: 'query' }, mode: 'advanced', }, + { + id: 'getProjectionExpression', + title: 'Projection Expression', + type: 'short-input', + placeholder: 'pk, #name, email', + condition: { field: 'operation', value: 'get' }, + mode: 'advanced', + }, + { + id: 'getExpressionAttributeNames', + title: 'Expression Attribute Names (JSON)', + type: 'code', + placeholder: '{\n "#name": "name"\n}', + condition: { field: 'operation', value: 'get' }, + mode: 'advanced', + }, + { + id: 'queryProjectionExpression', + title: 'Projection Expression', + type: 'short-input', + placeholder: 'pk, sk, #name', + condition: { field: 'operation', value: 'query' }, + mode: 'advanced', + }, + { + id: 'queryConsistentRead', + title: 'Consistent Read', + type: 'dropdown', + options: [ + { label: 'Eventually Consistent', id: 'false' }, + { label: 'Strongly Consistent', id: 'true' }, + ], + value: () => 'false', + condition: { field: 'operation', value: 'query' }, + mode: 'advanced', + }, + { + id: 'scanIndexName', + title: 'Index Name', + type: 'short-input', + placeholder: 'GSI1', + condition: { field: 'operation', value: 'scan' }, + mode: 'advanced', + }, + { + id: 'scanConsistentRead', + title: 'Consistent Read', + type: 'dropdown', + options: [ + { label: 'Eventually Consistent', id: 'false' }, + { label: 'Strongly Consistent', id: 'true' }, + ], + value: () => 'false', + condition: { field: 'operation', value: 'scan' }, + mode: 'advanced', + }, + { + id: 'scanSegment', + title: 'Segment', + type: 'short-input', + placeholder: '0', + condition: { field: 'operation', value: 'scan' }, + mode: 'advanced', + }, + { + id: 'scanTotalSegments', + title: 'Total Segments', + type: 'short-input', + placeholder: '4', + condition: { field: 'operation', value: 'scan' }, + mode: 'advanced', + }, + { + id: 'putReturnValues', + title: 'Return Values', + type: 'dropdown', + options: [ + { label: 'None (default)', id: 'NONE' }, + { label: 'Replaced item (ALL_OLD)', id: 'ALL_OLD' }, + ], + value: () => 'NONE', + condition: { field: 'operation', value: 'put' }, + mode: 'advanced', + }, + { + id: 'updateReturnValues', + title: 'Return Values', + type: 'dropdown', + options: [ + { label: 'All new attributes (default)', id: 'ALL_NEW' }, + { label: 'Updated new attributes', id: 'UPDATED_NEW' }, + { label: 'All old attributes', id: 'ALL_OLD' }, + { label: 'Updated old attributes', id: 'UPDATED_OLD' }, + { label: 'None', id: 'NONE' }, + ], + value: () => 'ALL_NEW', + condition: { field: 'operation', value: 'update' }, + mode: 'advanced', + }, + { + id: 'deleteReturnValues', + title: 'Return Values', + type: 'dropdown', + options: [ + { label: 'None (default)', id: 'NONE' }, + { label: 'Deleted item (ALL_OLD)', id: 'ALL_OLD' }, + ], + value: () => 'NONE', + condition: { field: 'operation', value: 'delete' }, + mode: 'advanced', + }, ], tools: { access: [ @@ -661,6 +772,9 @@ Return ONLY the expression - no explanations.`, if (params.consistentRead === 'true' || params.consistentRead === true) { result.consistentRead = true } + result.projectionExpression = params.getProjectionExpression || undefined + const getNames = parseJson(params.getExpressionAttributeNames, 'expressionAttributeNames') + if (getNames !== undefined) result.expressionAttributeNames = getNames } if (op === 'put') { @@ -681,6 +795,7 @@ Return ONLY the expression - no explanations.`, 'expressionAttributeValues' ) if (values !== undefined) result.expressionAttributeValues = values + if (params.putReturnValues === 'ALL_OLD') result.returnValues = 'ALL_OLD' } if (op === 'query') { @@ -694,13 +809,19 @@ Return ONLY the expression - no explanations.`, 'expressionAttributeValues' ) if (values !== undefined) result.expressionAttributeValues = values - if (params.indexName) result.indexName = params.indexName + result.indexName = params.indexName || undefined if (params.queryLimit) result.limit = Number.parseInt(String(params.queryLimit), 10) const esk = parseJson(params.queryExclusiveStartKey, 'exclusiveStartKey') if (esk !== undefined) result.exclusiveStartKey = esk - if (params.scanIndexForward === 'false' || params.scanIndexForward === false) { - result.scanIndexForward = false - } + result.scanIndexForward = + params.scanIndexForward === 'false' || params.scanIndexForward === false + ? false + : undefined + result.projectionExpression = params.queryProjectionExpression || undefined + result.consistentRead = + params.queryConsistentRead === 'true' || params.queryConsistentRead === true + ? true + : undefined } if (op === 'scan') { @@ -725,6 +846,21 @@ Return ONLY the expression - no explanations.`, if (lim) result.limit = Number.parseInt(String(lim), 10) const esk = parseJson(params.scanExclusiveStartKey, 'exclusiveStartKey') if (esk !== undefined) result.exclusiveStartKey = esk + result.indexName = params.scanIndexName || undefined + result.consistentRead = + params.scanConsistentRead === 'true' || params.scanConsistentRead === true + ? true + : undefined + if ( + params.scanSegment !== undefined && + params.scanSegment !== null && + params.scanSegment !== '' + ) { + result.segment = Number.parseInt(String(params.scanSegment), 10) + } + if (params.scanTotalSegments) { + result.totalSegments = Number.parseInt(String(params.scanTotalSegments), 10) + } } if (op === 'update') { @@ -746,6 +882,7 @@ Return ONLY the expression - no explanations.`, if (values !== undefined) result.expressionAttributeValues = values if (params.updateConditionExpression) result.conditionExpression = params.updateConditionExpression + if (params.updateReturnValues) result.returnValues = params.updateReturnValues } if (op === 'delete') { @@ -768,6 +905,7 @@ Return ONLY the expression - no explanations.`, 'expressionAttributeValues' ) if (values !== undefined) result.expressionAttributeValues = values + if (params.deleteReturnValues === 'ALL_OLD') result.returnValues = 'ALL_OLD' } return result @@ -840,6 +978,26 @@ Return ONLY the expression - no explanations.`, type: 'string', description: 'Sort order for query: true for ascending, false for descending', }, + getProjectionExpression: { type: 'string', description: 'Attributes to retrieve in get' }, + getExpressionAttributeNames: { + type: 'json', + description: 'Attribute name mappings for get projection', + }, + queryProjectionExpression: { type: 'string', description: 'Attributes to retrieve in query' }, + queryConsistentRead: { type: 'string', description: 'Use strongly consistent read for query' }, + scanIndexName: { type: 'string', description: 'Secondary index name for scan' }, + scanConsistentRead: { type: 'string', description: 'Use strongly consistent read for scan' }, + scanSegment: { type: 'number', description: 'Parallel scan segment number' }, + scanTotalSegments: { type: 'number', description: 'Parallel scan total segment count' }, + putReturnValues: { type: 'string', description: 'Return values for put (NONE or ALL_OLD)' }, + updateReturnValues: { + type: 'string', + description: 'Return values for update (ALL_NEW, UPDATED_NEW, ALL_OLD, UPDATED_OLD, NONE)', + }, + deleteReturnValues: { + type: 'string', + description: 'Return values for delete (NONE or ALL_OLD)', + }, }, outputs: { message: { @@ -858,6 +1016,14 @@ Return ONLY the expression - no explanations.`, type: 'number', description: 'Number of items returned', }, + scannedCount: { + type: 'number', + description: 'Number of items evaluated by query/scan before the filter expression', + }, + attributes: { + type: 'json', + description: 'Replaced (put) or deleted (delete) item when Return Values is ALL_OLD', + }, lastEvaluatedKey: { type: 'json', description: diff --git a/apps/sim/blocks/blocks/ec2.ts b/apps/sim/blocks/blocks/ec2.ts index 3ed4dcf093a..9bba35d6f20 100644 --- a/apps/sim/blocks/blocks/ec2.ts +++ b/apps/sim/blocks/blocks/ec2.ts @@ -766,7 +766,7 @@ Return ONLY the JSON array, no explanation.`, instances: { type: 'array', description: - 'Instances (describe_instances) or per-instance state transitions (start, stop, terminate)', + 'Instances (describe_instances: instanceId, instanceType, state, stateReason, launchTime, IPs, vpcId, subnetId, platform, architecture, iamInstanceProfileArn, securityGroups, blockDeviceMappings, networkInterfaces, metadataHttpTokens, tags) or per-instance state transitions (start, stop, terminate)', }, instanceStatuses: { type: 'array', diff --git a/apps/sim/blocks/blocks/iam.ts b/apps/sim/blocks/blocks/iam.ts index cb5015562d5..2d0093e79f8 100644 --- a/apps/sim/blocks/blocks/iam.ts +++ b/apps/sim/blocks/blocks/iam.ts @@ -1,8 +1,27 @@ +import { isRecordLike } from '@sim/utils/object' import { IAMIcon } from '@/components/icons' import type { BlockConfig, BlockMeta } from '@/blocks/types' import { AuthMode, IntegrationType } from '@/blocks/types' import { withSavedCredential } from '@/blocks/utils' +/** + * Converts the Tags table, a `[{ key, value }]` list, a plain object, or a JSON object + * string into the JSON object string the tools accept. + */ +function serializeTags(tags: unknown): string | undefined { + if (typeof tags === 'string') return tags.trim() ? tags : undefined + if (isRecordLike(tags)) return Object.keys(tags).length > 0 ? JSON.stringify(tags) : undefined + if (!Array.isArray(tags)) return undefined + const obj: Record = {} + for (const row of tags) { + const entry = isRecordLike(row) && isRecordLike(row.cells) ? row.cells : row + const key = isRecordLike(entry) ? entry.key : undefined + const value = isRecordLike(entry) ? entry.value : undefined + if (typeof key === 'string' && key && value !== undefined) obj[key] = String(value) + } + return Object.keys(obj).length > 0 ? JSON.stringify(obj) : undefined +} + /** * Raised when `contextEntries` is not a JSON array of context entries. * @@ -347,6 +366,24 @@ export const IAMBlock: BlockConfig = { required: false, mode: 'advanced', }, + { + id: 'permissionsBoundary', + title: 'Permissions Boundary ARN', + type: 'short-input', + placeholder: 'arn:aws:iam::123456789012:policy/MyBoundary', + condition: { field: 'operation', value: ['create_user', 'create_role'] }, + required: false, + mode: 'advanced', + }, + { + id: 'tags', + title: 'Tags', + type: 'table', + columns: ['key', 'value'], + condition: { field: 'operation', value: ['create_user', 'create_role'] }, + required: false, + mode: 'advanced', + }, { id: 'scope', title: 'Policy Scope', @@ -374,6 +411,20 @@ export const IAMBlock: BlockConfig = { required: false, mode: 'advanced', }, + { + id: 'policyUsageFilter', + title: 'Policy Usage', + type: 'dropdown', + options: [ + { label: 'All', id: 'all' }, + { label: 'Permissions Policies', id: 'PermissionsPolicy' }, + { label: 'Permissions Boundaries', id: 'PermissionsBoundary' }, + ], + value: () => 'all', + condition: { field: 'operation', value: 'list_policies' }, + required: false, + mode: 'advanced', + }, { id: 'policySourceArn', title: 'Principal ARN', @@ -602,15 +653,18 @@ export const IAMBlock: BlockConfig = { case 'delete_user': result.userName = rest.userName break - case 'create_user': + case 'create_user': { result.userName = rest.userName if (rest.path) result.path = rest.path + result.permissionsBoundary = rest.permissionsBoundary || undefined + result.tags = serializeTags(rest.tags) break + } case 'get_role': case 'delete_role': result.roleName = rest.roleName break - case 'create_role': + case 'create_role': { result.roleName = rest.roleName result.assumeRolePolicyDocument = rest.assumeRolePolicyDocument if (rest.description) result.description = rest.description @@ -619,7 +673,10 @@ export const IAMBlock: BlockConfig = { const parsed = Number.parseInt(String(maxSessionDuration), 10) if (!Number.isNaN(parsed)) result.maxSessionDuration = parsed } + result.permissionsBoundary = rest.permissionsBoundary || undefined + result.tags = serializeTags(rest.tags) break + } case 'attach_user_policy': case 'detach_user_policy': result.userName = rest.userName @@ -633,6 +690,11 @@ export const IAMBlock: BlockConfig = { case 'list_policies': if (rest.scope) result.scope = rest.scope if (onlyAttached === 'true' || onlyAttached === true) result.onlyAttached = true + result.policyUsageFilter = + rest.policyUsageFilter === 'PermissionsPolicy' || + rest.policyUsageFilter === 'PermissionsBoundary' + ? rest.policyUsageFilter + : undefined if (rest.pathPrefix) result.pathPrefix = rest.pathPrefix if (maxItems) { const parsed = Number.parseInt(String(maxItems), 10) @@ -734,6 +796,15 @@ export const IAMBlock: BlockConfig = { maxSessionDuration: { type: 'number', description: 'Max session duration in seconds' }, scope: { type: 'string', description: 'Policy scope filter (All, AWS, Local)' }, onlyAttached: { type: 'string', description: 'Only return attached policies' }, + policyUsageFilter: { + type: 'string', + description: 'Policy usage filter (PermissionsPolicy, PermissionsBoundary)', + }, + permissionsBoundary: { + type: 'string', + description: 'Managed policy ARN to set as the permissions boundary on a new user or role', + }, + tags: { type: 'json', description: 'Tag key/value pairs for a new user or role' }, pathPrefix: { type: 'string', description: 'Path prefix filter' }, maxItems: { type: 'number', description: 'Maximum number of items to return' }, marker: { type: 'string', description: 'Pagination marker' }, @@ -766,7 +837,7 @@ export const IAMBlock: BlockConfig = { policies: { type: 'json', description: - 'List of IAM policies (policyName, policyId, arn, path, attachmentCount, isAttachable, createDate, updateDate)', + 'List of IAM policies (policyName, policyId, arn, path, attachmentCount, isAttachable, createDate, updateDate, defaultVersionId, permissionsBoundaryUsageCount)', }, groups: { type: 'json', diff --git a/apps/sim/blocks/blocks/identity_center.ts b/apps/sim/blocks/blocks/identity_center.ts index bf9244c3b2b..a9b885903ac 100644 --- a/apps/sim/blocks/blocks/identity_center.ts +++ b/apps/sim/blocks/blocks/identity_center.ts @@ -296,6 +296,15 @@ export const IdentityCenterBlock: BlockConfig = { ], }, }, + { + id: 'filterAccountId', + title: 'Filter by AWS Account ID', + type: 'short-input', + placeholder: '123456789012', + condition: { field: 'operation', value: 'list_account_assignments' }, + required: false, + mode: 'advanced', + }, { id: 'requestId', title: 'Request ID', @@ -496,6 +505,7 @@ export const IdentityCenterBlock: BlockConfig = { result.instanceArn = rest.instanceArn result.principalId = rest.principalId result.principalType = rest.principalType + result.accountId = rest.filterAccountId || undefined if (maxResults) { const parsed = Number.parseInt(String(maxResults), 10) if (!Number.isNaN(parsed)) result.maxResults = parsed @@ -534,6 +544,10 @@ export const IdentityCenterBlock: BlockConfig = { userId: { type: 'string', description: 'Identity Store user ID' }, groupId: { type: 'string', description: 'Identity Store group ID' }, requestId: { type: 'string', description: 'Assignment creation/deletion request ID' }, + filterAccountId: { + type: 'string', + description: 'Only list assignments for this AWS account ID (list_account_assignments)', + }, maxResults: { type: 'number', description: 'Maximum number of results to return (1-100; List Accounts allows at most 20)', @@ -570,6 +584,8 @@ export const IdentityCenterBlock: BlockConfig = { email: { type: 'string', description: 'Email address of the user' }, userStatus: { type: 'string', description: 'User account status (ENABLED or DISABLED)' }, title: { type: 'string', description: 'Job title of the user' }, + givenName: { type: 'string', description: 'Given (first) name of the user' }, + familyName: { type: 'string', description: 'Family (last) name of the user' }, externalIds: { type: 'json', description: 'External identity provider IDs on the user or group (issuer, id)', diff --git a/apps/sim/blocks/blocks/lambda.ts b/apps/sim/blocks/blocks/lambda.ts index 8c8af02bd15..1bebcaf688b 100644 --- a/apps/sim/blocks/blocks/lambda.ts +++ b/apps/sim/blocks/blocks/lambda.ts @@ -17,6 +17,7 @@ const PARAM_KINDS = { logType: 'string', clientContext: 'string', qualifier: 'string', + tenantId: 'string', functionVersion: 'string', masterRegion: 'string', marker: 'string', @@ -47,6 +48,8 @@ const PARAM_KINDS = { snapStartApplyOn: 'string', logFormat: 'string', logGroup: 'string', + applicationLogLevel: 'string', + systemLogLevel: 'string', dryRun: 'boolean', revisionId: 'string', codeSha256: 'string', @@ -119,7 +122,15 @@ const ALL_PARAM_NAMES = Object.keys(PARAM_KINDS) as ParamName[] * executor's `{ ...inputs, ...transformedParams }` merge. */ const OPERATION_PARAMS: Record = { - invoke: ['functionName', 'payload', 'invocationType', 'logType', 'clientContext', 'qualifier'], + invoke: [ + 'functionName', + 'payload', + 'invocationType', + 'logType', + 'clientContext', + 'qualifier', + 'tenantId', + ], list_functions: ['functionVersion', 'masterRegion', 'marker', 'maxItems'], get_function: ['functionName', 'qualifier'], get_function_configuration: ['functionName', 'qualifier'], @@ -183,6 +194,8 @@ const OPERATION_PARAMS: Record = { 'snapStartApplyOn', 'logFormat', 'logGroup', + 'applicationLogLevel', + 'systemLogLevel', 'revisionId', ], delete_function: ['functionName', 'qualifier'], @@ -822,11 +835,22 @@ export const LambdaBlock: BlockConfig = { ], }, }, + { + id: 'tenantId', + title: 'Tenant ID', + type: 'short-input', + placeholder: 'Tenant identifier, for functions with tenant isolation', + mode: 'advanced', + condition: { field: 'operation', value: 'invoke' }, + }, { id: 'functionVersion', title: 'Include All Versions', type: 'dropdown', - options: [{ label: 'ALL', id: 'ALL' }], + options: [ + { label: 'Unpublished only ($LATEST)', id: '' }, + { label: 'ALL', id: 'ALL' }, + ], mode: 'advanced', condition: { field: 'operation', value: 'list_functions' }, }, @@ -916,6 +940,7 @@ export const LambdaBlock: BlockConfig = { title: 'Package Type', type: 'dropdown', options: [ + { label: 'Infer from code source', id: '' }, { label: 'Zip (.zip archive)', id: 'Zip' }, { label: 'Image (container image)', id: 'Image' }, ], @@ -1096,6 +1121,7 @@ export const LambdaBlock: BlockConfig = { title: 'X-Ray Tracing', type: 'dropdown', options: [ + { label: 'Default (unchanged on update)', id: '' }, { label: 'Pass Through', id: 'PassThrough' }, { label: 'Active', id: 'Active' }, ], @@ -1137,6 +1163,7 @@ export const LambdaBlock: BlockConfig = { title: 'SnapStart', type: 'dropdown', options: [ + { label: 'Default (unchanged on update)', id: '' }, { label: 'None', id: 'None' }, { label: 'Published Versions', id: 'PublishedVersions' }, ], @@ -1151,6 +1178,7 @@ export const LambdaBlock: BlockConfig = { title: 'Log Format', type: 'dropdown', options: [ + { label: 'Default (unchanged on update)', id: '' }, { label: 'Text', id: 'Text' }, { label: 'JSON', id: 'JSON' }, ], @@ -1171,6 +1199,35 @@ export const LambdaBlock: BlockConfig = { value: ['create_function', 'update_function_configuration'], }, }, + { + id: 'applicationLogLevel', + title: 'Application Log Level', + type: 'dropdown', + options: [ + { label: 'Unchanged', id: '' }, + { label: 'TRACE', id: 'TRACE' }, + { label: 'DEBUG', id: 'DEBUG' }, + { label: 'INFO', id: 'INFO' }, + { label: 'WARN', id: 'WARN' }, + { label: 'ERROR', id: 'ERROR' }, + { label: 'FATAL', id: 'FATAL' }, + ], + mode: 'advanced', + condition: { field: 'operation', value: 'update_function_configuration' }, + }, + { + id: 'systemLogLevel', + title: 'System Log Level', + type: 'dropdown', + options: [ + { label: 'Unchanged', id: '' }, + { label: 'DEBUG', id: 'DEBUG' }, + { label: 'INFO', id: 'INFO' }, + { label: 'WARN', id: 'WARN' }, + ], + mode: 'advanced', + condition: { field: 'operation', value: 'update_function_configuration' }, + }, { id: 'dryRun', title: 'Dry Run', @@ -1304,6 +1361,7 @@ export const LambdaBlock: BlockConfig = { title: 'Function URL Auth Type', type: 'dropdown', options: [ + { label: 'Not set', id: '' }, { label: 'NONE', id: 'NONE' }, { label: 'AWS_IAM', id: 'AWS_IAM' }, ], @@ -1325,6 +1383,7 @@ export const LambdaBlock: BlockConfig = { title: 'Enabled', type: 'dropdown', options: [ + { label: 'Default (enabled on create, unchanged on update)', id: '' }, { label: 'No', id: 'false' }, { label: 'Yes', id: 'true' }, ], @@ -1359,6 +1418,7 @@ export const LambdaBlock: BlockConfig = { title: 'Starting Position', type: 'dropdown', options: [ + { label: 'Not set (not used for SQS)', id: '' }, { label: 'Latest', id: 'LATEST' }, { label: 'Trim Horizon (oldest)', id: 'TRIM_HORIZON' }, { label: 'At Timestamp', id: 'AT_TIMESTAMP' }, @@ -1419,6 +1479,7 @@ export const LambdaBlock: BlockConfig = { title: 'Bisect Batch On Error', type: 'dropdown', options: [ + { label: 'Default (unchanged on update)', id: '' }, { label: 'No', id: 'false' }, { label: 'Yes', id: 'true' }, ], @@ -1566,6 +1627,7 @@ export const LambdaBlock: BlockConfig = { title: 'DocumentDB Full Document', type: 'dropdown', options: [ + { label: 'Default (unchanged on update)', id: '' }, { label: 'Default (change delta only)', id: 'Default' }, { label: 'Update Lookup (full document)', id: 'UpdateLookup' }, ], @@ -1662,6 +1724,7 @@ export const LambdaBlock: BlockConfig = { title: 'Invoke Mode', type: 'dropdown', options: [ + { label: 'Default (unchanged on update)', id: '' }, { label: 'Buffered', id: 'BUFFERED' }, { label: 'Response Stream', id: 'RESPONSE_STREAM' }, ], @@ -1676,6 +1739,7 @@ export const LambdaBlock: BlockConfig = { title: 'CORS Allow Credentials', type: 'dropdown', options: [ + { label: 'Default (unchanged on update)', id: '' }, { label: 'No', id: 'false' }, { label: 'Yes', id: 'true' }, ], @@ -1761,6 +1825,7 @@ export const LambdaBlock: BlockConfig = { title: 'Compatible Architecture', type: 'dropdown', options: [ + { label: 'Any', id: '' }, { label: 'x86_64', id: 'x86_64' }, { label: 'arm64', id: 'arm64' }, ], @@ -1923,6 +1988,7 @@ export const LambdaBlock: BlockConfig = { logType: { type: 'string', description: 'Log Type' }, clientContext: { type: 'string', description: 'Client Context' }, qualifier: { type: 'string', description: 'Qualifier' }, + tenantId: { type: 'string', description: 'Tenant ID' }, functionVersion: { type: 'string', description: 'Include All Versions' }, masterRegion: { type: 'string', description: 'Master Region' }, marker: { type: 'string', description: 'Marker' }, @@ -1953,6 +2019,8 @@ export const LambdaBlock: BlockConfig = { snapStartApplyOn: { type: 'string', description: 'SnapStart' }, logFormat: { type: 'string', description: 'Log Format' }, logGroup: { type: 'string', description: 'Log Group' }, + applicationLogLevel: { type: 'string', description: 'Application Log Level' }, + systemLogLevel: { type: 'string', description: 'System Log Level' }, dryRun: { type: 'boolean', description: 'Dry Run' }, revisionId: { type: 'string', description: 'Revision ID' }, codeSha256: { type: 'string', description: 'Code SHA256' }, @@ -2063,12 +2131,18 @@ export const LambdaBlock: BlockConfig = { }, code: { type: 'json', - description: 'Presigned download URL for the deployment package, or the container image URI', + description: + 'Deployment package location (repositoryType, location presigned download URL, imageUri, resolvedImageUri, sourceKmsKeyArn, error)', }, tags: { type: 'json', description: "The function's tags", }, + tagsError: { + type: 'json', + description: + 'Why the tags could not be read, when a partial tag-read failure occurred (errorCode, message)', + }, reservedConcurrentExecutions: { type: 'number', description: 'Concurrency reserved for this function, if any', diff --git a/apps/sim/blocks/blocks/rds.ts b/apps/sim/blocks/blocks/rds.ts index a8b2d199ed8..89799071952 100644 --- a/apps/sim/blocks/blocks/rds.ts +++ b/apps/sim/blocks/blocks/rds.ts @@ -268,9 +268,10 @@ Output: { "name": "John Doe", "email": "john@example.com", - "is_premium": true, - "created_at": "NOW()" -}`, + "is_premium": true +} + +Values are bound as literal parameters, so SQL expressions such as NOW() are not evaluated: they are stored as text in text columns and fail on other column types. Leave out columns that should take a database default.`, placeholder: 'Describe the data you want to insert...', generationType: 'json-object', }, @@ -298,16 +299,17 @@ Return ONLY a valid JSON object containing the fields to update. Do not include 1. Only include fields that need to be updated 2. Use appropriate data types (strings in quotes, numbers without, booleans as true/false) 3. Use snake_case for field names -4. Consider including updated_at field if appropriate +4. Use literal values only; SQL expressions such as NOW() are not evaluated ### EXAMPLE User: "Update the customer to inactive and clear their subscription" Output: { "is_active": false, - "subscription_id": null, - "updated_at": "NOW()" -}`, + "subscription_id": null +} + +Values are bound as literal parameters, so SQL expressions such as NOW() are stored as text.`, placeholder: 'Describe the fields you want to update...', generationType: 'json-object', }, @@ -380,6 +382,26 @@ Return ONLY the JSON object.`, generationType: 'json-object', }, }, + { + id: 'parameters', + title: 'Query Parameters (JSON)', + type: 'code', + placeholder: '{\n "status": "active",\n "id": 5\n}', + condition: { field: 'operation', value: ['query', 'execute'] }, + mode: 'advanced', + wandConfig: { + enabled: true, + prompt: `Generate the parameter values for an Amazon RDS Data API SQL statement based on the user's description. +Each key is a placeholder name used in the SQL as :name, and each value is the value to bind. +Example: {"status": "active", "id": 5} +To cast a string to a specific type, use an array of entries with a typeHint of DATE, DECIMAL, JSON, TIME, TIMESTAMP, or UUID: +[{"name": "created", "value": "2024-01-15 10:00:00", "typeHint": "TIMESTAMP"}] + +Return ONLY valid JSON - no explanations, no markdown code blocks.`, + placeholder: 'Describe the values for each :placeholder...', + generationType: 'json-value', + }, + }, { id: 'schema', title: 'Schema Name', @@ -430,7 +452,7 @@ Return ONLY the JSON object.`, } }, params: (params) => { - const { operation, data, conditions, schema, engine, ...rest } = params + const { operation, data, conditions, schema, engine, parameters, ...rest } = params // Parse JSON fields const parseJson = (value: unknown, fieldName: string) => { @@ -469,6 +491,10 @@ Return ONLY the JSON object.`, if (parsedData !== undefined) result.data = parsedData if (schema) result.schema = schema if (engine) result.engine = engine + if (operation === 'query' || operation === 'execute') { + const parsedParameters = parseJson(parameters, 'parameters') + if (parsedParameters !== undefined) result.parameters = parsedParameters + } return result }, @@ -485,6 +511,10 @@ Return ONLY the JSON object.`, table: { type: 'string', description: 'Table name' }, query: { type: 'string', description: 'SQL query to execute' }, data: { type: 'json', description: 'Data for insert/update operations' }, + parameters: { + type: 'json', + description: 'Values for :name placeholders in query/execute SQL', + }, conditions: { type: 'json', description: 'Conditions for update/delete (e.g., {"id": 1})' }, schema: { type: 'string', description: 'Schema to introspect (for introspect operation)' }, engine: { @@ -503,7 +533,12 @@ Return ONLY the JSON object.`, }, rowCount: { type: 'number', - description: 'Number of rows affected by the operation', + description: 'Number of rows returned by a query, or affected by a write', + }, + generatedFields: { + type: 'array', + description: + 'Values generated by an insert or execute, such as auto-increment IDs (Aurora MySQL only)', }, engine: { type: 'string', diff --git a/apps/sim/blocks/blocks/s3.ts b/apps/sim/blocks/blocks/s3.ts index d6227633fba..7c3bee8f9c5 100644 --- a/apps/sim/blocks/blocks/s3.ts +++ b/apps/sim/blocks/blocks/s3.ts @@ -63,6 +63,14 @@ function s3ToolParams(params: BlockToolParams) { content: params.content, contentType: params.contentType, acl: params.acl, + metadata: params.objectMetadata, + storageClass: params.storageClass, + serverSideEncryption: params.serverSideEncryption, + sseKmsKeyId: + typeof params.serverSideEncryption === 'string' && + params.serverSideEncryption.startsWith('aws:kms') + ? params.sseKmsKeyId + : undefined, } } @@ -93,6 +101,8 @@ function s3ToolParams(params: BlockToolParams) { prefix: params.prefix, maxKeys: params.maxKeys ? Number.parseInt(params.maxKeys as string, 10) : undefined, continuationToken: params.continuationToken, + delimiter: params.delimiter, + startAfter: params.startAfter, } case 'delete_object': @@ -463,6 +473,69 @@ export const S3Block: BlockConfig = { condition: { field: 'operation', value: 'put_object' }, mode: 'advanced', }, + { + id: 'objectMetadata', + title: 'Object Metadata', + type: 'code', + language: 'json', + placeholder: '{"department": "finance", "source": "sim"}', + condition: { field: 'operation', value: 'put_object' }, + mode: 'advanced', + wandConfig: { + enabled: true, + prompt: + 'Generate a flat JSON object of S3 user-defined object metadata from the description. Keys are lowercase names without the x-amz-meta- prefix and every value is a string. Return ONLY the JSON object.', + placeholder: 'Describe the metadata to attach...', + generationType: 'json-object', + }, + }, + { + id: 'storageClass', + title: 'Storage Class', + type: 'dropdown', + options: [ + { label: 'Bucket default', id: '' }, + { label: 'Standard', id: 'STANDARD' }, + { label: 'Intelligent-Tiering', id: 'INTELLIGENT_TIERING' }, + { label: 'Standard-IA', id: 'STANDARD_IA' }, + { label: 'One Zone-IA', id: 'ONEZONE_IA' }, + { label: 'Glacier Instant Retrieval', id: 'GLACIER_IR' }, + { label: 'Glacier Flexible Retrieval', id: 'GLACIER' }, + { label: 'Glacier Deep Archive', id: 'DEEP_ARCHIVE' }, + { label: 'Reduced Redundancy', id: 'REDUCED_REDUNDANCY' }, + ], + value: () => '', + placeholder: 'Select storage class (default: Standard)', + condition: { field: 'operation', value: 'put_object' }, + mode: 'advanced', + }, + { + id: 'serverSideEncryption', + title: 'Server-Side Encryption', + type: 'dropdown', + options: [ + { label: 'Bucket default', id: '' }, + { label: 'SSE-S3 (AES256)', id: 'AES256' }, + { label: 'SSE-KMS (aws:kms)', id: 'aws:kms' }, + { label: 'DSSE-KMS (aws:kms:dsse)', id: 'aws:kms:dsse' }, + ], + value: () => '', + placeholder: 'Select encryption (default: bucket setting)', + condition: { field: 'operation', value: 'put_object' }, + mode: 'advanced', + }, + { + id: 'sseKmsKeyId', + title: 'KMS Key ID', + type: 'short-input', + placeholder: 'KMS key ID or ARN (for aws:kms; default: aws/s3 managed key)', + condition: { + field: 'operation', + value: 'put_object', + and: { field: 'serverSideEncryption', value: ['aws:kms', 'aws:kms:dsse'] }, + }, + mode: 'advanced', + }, { id: 's3Uri', @@ -496,6 +569,22 @@ export const S3Block: BlockConfig = { condition: { field: 'operation', value: 'list_objects' }, mode: 'advanced', }, + { + id: 'delimiter', + title: 'Delimiter', + type: 'short-input', + placeholder: 'e.g., / to group keys into folders (commonPrefixes)', + condition: { field: 'operation', value: 'list_objects' }, + mode: 'advanced', + }, + { + id: 'startAfter', + title: 'Start After Key', + type: 'short-input', + placeholder: 'List keys after this one (e.g., folder/file-100.txt)', + condition: { field: 'operation', value: 'list_objects' }, + mode: 'advanced', + }, { id: 'objectKey', @@ -719,6 +808,10 @@ export const S3Block: BlockConfig = { content: { type: 'string', description: 'Text content to upload' }, contentType: { type: 'string', description: 'Content-Type header' }, acl: { type: 'string', description: 'Access control list' }, + objectMetadata: { type: 'json', description: 'User-defined object metadata (x-amz-meta-*)' }, + storageClass: { type: 'string', description: 'Storage class for the uploaded object' }, + serverSideEncryption: { type: 'string', description: 'Server-side encryption algorithm' }, + sseKmsKeyId: { type: 'string', description: 'KMS key ID for SSE-KMS' }, // Download inputs s3Uri: { type: 'string', description: 'S3 object URL' }, getObjectRegion: { type: 'string', description: 'Optional AWS region override for downloads' }, @@ -726,6 +819,8 @@ export const S3Block: BlockConfig = { prefix: { type: 'string', description: 'Prefix filter' }, maxKeys: { type: 'number', description: 'Maximum results' }, continuationToken: { type: 'string', description: 'Pagination token' }, + delimiter: { type: 'string', description: 'Delimiter that groups keys into common prefixes' }, + startAfter: { type: 'string', description: 'Key to start listing after' }, // Copy inputs sourceBucket: { type: 'string', description: 'Source bucket name' }, sourceKey: { type: 'string', description: 'Source object key' }, @@ -750,7 +845,15 @@ export const S3Block: BlockConfig = { description: 'S3 URI (s3://bucket/key) for use with other AWS services', }, file: { type: 'file', description: 'Downloaded file stored in execution files' }, - objects: { type: 'json', description: 'List of objects (for list operation)' }, + objects: { + type: 'json', + description: + 'List of objects (for list operation): [{key, size, lastModified, etag, storageClass}]', + }, + commonPrefixes: { + type: 'json', + description: 'Folder-like prefixes grouped by the delimiter (for list operation)', + }, buckets: { type: 'json', description: 'List of buckets (for list buckets operation)' }, deleted: { type: 'json', description: 'Deletion status (boolean) or deleted objects (array)' }, errors: { type: 'json', description: 'Failed deletions (for batch delete operation)' }, diff --git a/apps/sim/blocks/blocks/secrets_manager.ts b/apps/sim/blocks/blocks/secrets_manager.ts index ca994d14c9a..4a58f3ccbca 100644 --- a/apps/sim/blocks/blocks/secrets_manager.ts +++ b/apps/sim/blocks/blocks/secrets_manager.ts @@ -154,6 +154,24 @@ export const SecretsManagerBlock: BlockConfig = { required: false, mode: 'advanced', }, + { + id: 'kmsKeyId', + title: 'KMS Key ID', + type: 'short-input', + placeholder: 'alias/my-key (defaults to aws/secretsmanager)', + condition: { field: 'operation', value: ['create_secret', 'update_secret'] }, + required: false, + mode: 'advanced', + }, + { + id: 'createTags', + title: 'Tags', + type: 'code', + placeholder: '[{"key":"env","value":"prod"}]', + condition: { field: 'operation', value: 'create_secret' }, + required: false, + mode: 'advanced', + }, { id: 'versionId', title: 'Version ID', @@ -190,6 +208,61 @@ export const SecretsManagerBlock: BlockConfig = { required: false, mode: 'advanced', }, + { + id: 'listFilters', + title: 'Filters', + type: 'code', + placeholder: '[{"key":"name","values":["prod/"]}]', + condition: { field: 'operation', value: 'list_secrets' }, + required: false, + mode: 'advanced', + wandConfig: { + enabled: true, + prompt: `Generate an AWS Secrets Manager ListSecrets filters JSON array from the user's description. +Each item is {"key": , "values": [strings]}. Values match by prefix; prefix a value with ! to negate it. + +Return ONLY the JSON array - no explanations, no markdown code blocks.`, + placeholder: 'Describe which secrets to list...', + }, + }, + { + id: 'sortBy', + title: 'Sort By', + type: 'dropdown', + options: [ + { label: 'Default (created date)', id: '' }, + { label: 'Created Date', id: 'created-date' }, + { label: 'Last Accessed Date', id: 'last-accessed-date' }, + { label: 'Last Changed Date', id: 'last-changed-date' }, + { label: 'Name', id: 'name' }, + ], + value: () => '', + condition: { field: 'operation', value: 'list_secrets' }, + required: false, + mode: 'advanced', + }, + { + id: 'sortOrder', + title: 'Sort Order', + type: 'dropdown', + options: [ + { label: 'Default (ascending)', id: '' }, + { label: 'Ascending', id: 'asc' }, + { label: 'Descending', id: 'desc' }, + ], + value: () => '', + condition: { field: 'operation', value: 'list_secrets' }, + required: false, + mode: 'advanced', + }, + { + id: 'includePlannedDeletion', + title: 'Include Secrets Scheduled for Deletion', + type: 'switch', + condition: { field: 'operation', value: 'list_secrets' }, + required: false, + mode: 'advanced', + }, { id: 'recoveryWindowInDays', title: 'Recovery Window (Days)', @@ -359,16 +432,34 @@ export const SecretsManagerBlock: BlockConfig = { if (!Number.isNaN(parsed)) result.maxResults = parsed } if (rest.nextToken) result.nextToken = rest.nextToken + if (rest.listFilters) { + result.filters = + typeof rest.listFilters === 'string' + ? JSON.parse(rest.listFilters) + : rest.listFilters + } + if (rest.sortBy) result.sortBy = rest.sortBy + if (rest.sortOrder) result.sortOrder = rest.sortOrder + if (rest.includePlannedDeletion === true || rest.includePlannedDeletion === 'true') { + result.includePlannedDeletion = true + } break case 'create_secret': result.name = rest.name result.secretValue = rest.secretValue if (rest.description) result.description = rest.description + result.kmsKeyId = rest.kmsKeyId || undefined + result.tags = rest.createTags + ? typeof rest.createTags === 'string' + ? JSON.parse(rest.createTags) + : rest.createTags + : undefined break case 'update_secret': result.secretId = rest.secretId result.secretValue = rest.secretValue if (rest.description) result.description = rest.description + result.kmsKeyId = rest.kmsKeyId || undefined break case 'delete_secret': result.secretId = rest.secretId @@ -428,6 +519,21 @@ export const SecretsManagerBlock: BlockConfig = { versionStage: { type: 'string', description: 'Version stage (e.g., AWSCURRENT)' }, maxResults: { type: 'number', description: 'Maximum number of results to return' }, nextToken: { type: 'string', description: 'Pagination token' }, + listFilters: { + type: 'json', + description: 'ListSecrets filters, as an array of {key, values}', + }, + sortBy: { type: 'string', description: 'Field to sort listed secrets by' }, + sortOrder: { type: 'string', description: 'Sort order for listed secrets (asc or desc)' }, + includePlannedDeletion: { + type: 'boolean', + description: 'Include secrets scheduled for deletion when listing', + }, + kmsKeyId: { type: 'string', description: 'KMS key used to encrypt the secret' }, + createTags: { + type: 'json', + description: 'Tags for a new secret, as an array of {key, value} pairs', + }, recoveryWindowInDays: { type: 'number', description: 'Days before permanent deletion' }, forceDelete: { type: 'string', description: 'Force immediate deletion' }, tags: { type: 'json', description: 'Tags to attach, as an array of {key, value} pairs' }, @@ -452,6 +558,10 @@ export const SecretsManagerBlock: BlockConfig = { type: 'string', description: 'The decrypted secret value', }, + secretBinary: { + type: 'string', + description: 'Base64-encoded decrypted binary secret value, when stored as SecretBinary', + }, arn: { type: 'string', description: 'ARN of the secret', @@ -466,7 +576,8 @@ export const SecretsManagerBlock: BlockConfig = { }, secrets: { type: 'json', - description: 'List of secrets', + description: + 'List of secrets [{name, arn, description, kmsKeyId, rotationEnabled, rotationLambdaARN, rotationRules, owningService, primaryRegion, createdDate, lastChangedDate, lastAccessedDate, lastRotatedDate, nextRotationDate, deletedDate, tags, secretVersionsToStages}]', }, count: { type: 'number', @@ -509,6 +620,18 @@ export const SecretsManagerBlock: BlockConfig = { type: 'string', description: 'Date the secret was last rotated', }, + lastChangedDate: { + type: 'string', + description: 'Date the secret was last changed', + }, + lastAccessedDate: { + type: 'string', + description: 'Date the secret was last accessed', + }, + versionIdsToStages: { + type: 'json', + description: 'Map of version IDs to their staging labels', + }, nextRotationDate: { type: 'string', description: 'Date the secret is next scheduled to rotate', diff --git a/apps/sim/blocks/blocks/ses.ts b/apps/sim/blocks/blocks/ses.ts index 99cc025b3eb..ed55f6f6a02 100644 --- a/apps/sim/blocks/blocks/ses.ts +++ b/apps/sim/blocks/blocks/ses.ts @@ -324,6 +324,46 @@ export const SESBlock: BlockConfig = { required: false, mode: 'advanced', }, + { + id: 'templateReplyToAddresses', + title: 'Reply-To Addresses', + type: 'short-input', + placeholder: 'replyto@example.com', + condition: { field: 'operation', value: ['send_templated_email', 'send_bulk_email'] }, + required: false, + mode: 'advanced', + }, + { + id: 'fromName', + title: 'From Name', + type: 'short-input', + placeholder: 'Acme Support', + condition: { + field: 'operation', + value: ['send_email', 'send_templated_email', 'send_bulk_email'], + }, + required: false, + mode: 'advanced', + }, + { + id: 'emailTags', + title: 'Email Tags (JSON)', + type: 'code', + language: 'json', + placeholder: '[{"name": "campaign", "value": "welcome"}]', + condition: { + field: 'operation', + value: ['send_email', 'send_templated_email', 'send_bulk_email'], + }, + required: false, + mode: 'advanced', + wandConfig: { + enabled: true, + prompt: + 'Generate an Amazon SES message tag list as a JSON array of objects, each with a "name" and a "value". Names and values may contain only letters, digits, underscores, and hyphens, up to 256 characters. Return ONLY the JSON array.', + generationType: 'json-array', + }, + }, { id: 'defaultTemplateData', title: 'Default Template Data (JSON)', @@ -634,6 +674,28 @@ export const SESBlock: BlockConfig = { params: (params) => { const { operation, pageSize, ...rest } = params + const parseEmailTags = (value: unknown) => { + if (value === undefined || value === null || value === '') return undefined + if (typeof value !== 'string') return value + if (!value.trim()) return undefined + let parsed: unknown + try { + parsed = JSON.parse(value) + } catch { + throw new Error('Email tags must be a valid JSON array of {"name", "value"} objects') + } + if (!Array.isArray(parsed)) { + throw new Error('Email tags must be a valid JSON array of {"name", "value"} objects') + } + return parsed + } + + const applySendOptions = (target: Record, replyToAddresses: unknown) => { + target.fromName = rest.fromName || undefined + target.replyToAddresses = replyToAddresses || undefined + target.emailTags = parseEmailTags(rest.emailTags) + } + const connectionConfig = { region: rest.region, accessKeyId: rest.accessKeyId, @@ -705,8 +767,8 @@ export const SESBlock: BlockConfig = { if (rest.bodyText) result.bodyText = rest.bodyText if (rest.ccAddresses) result.ccAddresses = rest.ccAddresses if (rest.bccAddresses) result.bccAddresses = rest.bccAddresses - if (rest.replyToAddresses) result.replyToAddresses = rest.replyToAddresses if (rest.configurationSetName) result.configurationSetName = rest.configurationSetName + applySendOptions(result, rest.replyToAddresses) break case 'send_templated_email': result.fromAddress = rest.fromAddress @@ -716,6 +778,7 @@ export const SESBlock: BlockConfig = { if (rest.ccAddresses) result.ccAddresses = rest.ccAddresses if (rest.bccAddresses) result.bccAddresses = rest.bccAddresses if (rest.configurationSetName) result.configurationSetName = rest.configurationSetName + applySendOptions(result, rest.templateReplyToAddresses) break case 'send_bulk_email': result.fromAddress = rest.fromAddress @@ -723,6 +786,7 @@ export const SESBlock: BlockConfig = { result.destinations = rest.destinations if (rest.defaultTemplateData) result.defaultTemplateData = rest.defaultTemplateData if (rest.configurationSetName) result.configurationSetName = rest.configurationSetName + applySendOptions(result, rest.templateReplyToAddresses) break case 'list_identities': if (pageSize != null) { @@ -783,6 +847,15 @@ export const SESBlock: BlockConfig = { ccAddresses: { type: 'string', description: 'Comma-separated CC email addresses' }, bccAddresses: { type: 'string', description: 'Comma-separated BCC email addresses' }, replyToAddresses: { type: 'string', description: 'Comma-separated reply-to addresses' }, + templateReplyToAddresses: { + type: 'string', + description: 'Comma-separated reply-to addresses for templated and bulk sends', + }, + fromName: { type: 'string', description: 'Friendly sender name shown with the From address' }, + emailTags: { + type: 'json', + description: 'Message tags as a JSON array of {name, value} objects', + }, defaultTemplateData: { type: 'string', description: 'Default JSON template data for bulk sends', @@ -949,6 +1022,17 @@ export const SESBlock: BlockConfig = { description: 'Emails sent in the last 24 hours (get_account)', condition: { field: 'operation', value: 'get_account' }, }, + productionAccessEnabled: { + type: 'boolean', + description: + 'Whether the account has production access, false in the SES sandbox (get_account)', + condition: { field: 'operation', value: 'get_account' }, + }, + enforcementStatus: { + type: 'string', + description: 'Account sending status: HEALTHY, PROBATION, or SHUTDOWN (get_account)', + condition: { field: 'operation', value: 'get_account' }, + }, templateName: { type: 'string', description: 'Template name (get_template)', diff --git a/apps/sim/blocks/blocks/sts.ts b/apps/sim/blocks/blocks/sts.ts index 415051e257b..d520fbe56eb 100644 --- a/apps/sim/blocks/blocks/sts.ts +++ b/apps/sim/blocks/blocks/sts.ts @@ -222,6 +222,15 @@ export const STSBlock: BlockConfig = { required: false, mode: 'advanced', }, + { + id: 'sourceIdentity', + title: 'Source Identity', + type: 'short-input', + placeholder: 'alice@example.com', + condition: { field: 'operation', value: 'assume_role' }, + required: false, + mode: 'advanced', + }, { id: 'externalId', title: 'External ID', @@ -308,6 +317,7 @@ export const STSBlock: BlockConfig = { if (rest.tokenCode) result.tokenCode = rest.tokenCode if (rest.policyArns) result.policyArns = rest.policyArns if (rest.transitiveTagKeys) result.transitiveTagKeys = rest.transitiveTagKeys + result.sourceIdentity = rest.sourceIdentity || undefined if (rest.tags) { const rows = rest.tags if (typeof rows === 'string') { @@ -394,6 +404,10 @@ export const STSBlock: BlockConfig = { description: 'Comma-separated tag keys that propagate through role chaining', }, externalId: { type: 'string', description: 'External ID for cross-account access' }, + sourceIdentity: { + type: 'string', + description: 'Source identity to set on the assumed role session', + }, serialNumber: { type: 'string', description: 'MFA device serial number' }, tokenCode: { type: 'string', description: 'MFA token code' }, targetAccessKeyId: { type: 'string', description: 'Access key ID to look up' }, diff --git a/apps/sim/blocks/blocks/textract.ts b/apps/sim/blocks/blocks/textract.ts index 7cfea118646..18810e6c30d 100644 --- a/apps/sim/blocks/blocks/textract.ts +++ b/apps/sim/blocks/blocks/textract.ts @@ -240,6 +240,55 @@ function resolveDocumentParam(value: unknown): { file?: object; filePath?: strin return {} } +interface TextractQueryParam { + Text: string + Alias?: string + Pages?: string[] +} + +/** + * Accepts a JSON array of query strings or `{Text, Alias, Pages}` objects, or + * one plain-text question per line. + */ +function parseTextractQueries(value: unknown): TextractQueryParam[] { + let raw: unknown = value + if (typeof value === 'string') { + const trimmed = value.trim() + if (!trimmed) return [] + if (trimmed.startsWith('[')) { + try { + raw = JSON.parse(trimmed) + } catch { + throw new Error('Queries must be a JSON array or one question per line') + } + } else { + raw = trimmed.split('\n') + } + } + if (!Array.isArray(raw)) return [] + return raw.flatMap((entry): TextractQueryParam[] => { + if (typeof entry === 'string') { + const text = entry.trim() + return text ? [{ Text: text }] : [] + } + const record = + typeof entry === 'object' && entry !== null ? (entry as Record) : {} + const text = typeof record.Text === 'string' ? record.Text.trim() : '' + if (!text) { + throw new Error('Each query must be a question string or an object with a non-empty "Text"') + } + return [ + { + Text: text, + ...(typeof record.Alias === 'string' && record.Alias.trim() + ? { Alias: record.Alias.trim() } + : {}), + ...(Array.isArray(record.Pages) ? { Pages: record.Pages.map(String) } : {}), + }, + ] + }) +} + interface AwsAccessKeys { accessKeyId: string secretAccessKey: string @@ -314,6 +363,11 @@ function textractToolParams(params: BlockToolParams, accessKeys: Partial 0) { + featureTypes.push('QUERIES') + parameters.queries = queries + } if (featureTypes.length > 0) parameters.featureTypes = featureTypes return parameters @@ -475,6 +529,15 @@ export const TextractV2Block: BlockConfig = { type: 'switch' as SubBlockType, condition: { field: 'operation', value: 'analyze_document' }, }, + { + id: 'queries', + title: 'Queries', + type: 'long-input' as SubBlockType, + placeholder: + 'One question per line (e.g., What is the policy number?), or a JSON array of {"Text", "Alias", "Pages"}', + condition: { field: 'operation', value: 'analyze_document' }, + mode: 'advanced' as const, + }, ], tools: { access: ['textract_parser_v2', 'textract_analyze_expense', 'textract_analyze_id'], @@ -504,6 +567,10 @@ export const TextractV2Block: BlockConfig = { extractForms: { type: 'boolean', description: 'Extract form key-value pairs' }, detectSignatures: { type: 'boolean', description: 'Detect signatures' }, analyzeLayout: { type: 'boolean', description: 'Analyze document layout' }, + queries: { + type: 'string', + description: 'Natural-language queries (one per line or a JSON array), for analyze_document', + }, region: { type: 'string', description: 'AWS region' }, accessKeyId: { type: 'string', description: 'AWS Access Key ID' }, secretAccessKey: { type: 'string', description: 'AWS Secret Access Key' }, @@ -511,7 +578,8 @@ export const TextractV2Block: BlockConfig = { outputs: { blocks: { type: 'json', - description: 'Array of detected blocks (PAGE, LINE, WORD, TABLE, CELL, KEY_VALUE_SET, etc.)', + description: + 'Array of detected blocks (PAGE, LINE, WORD, TABLE, CELL, KEY_VALUE_SET, QUERY, QUERY_RESULT, etc.)', condition: { field: 'operation', value: 'analyze_document' }, }, expenseDocuments: { @@ -534,6 +602,18 @@ export const TextractV2Block: BlockConfig = { type: 'string', description: 'Version of the Textract model used for processing', }, + jobStatus: { + type: 'string', + description: 'Async job status: SUCCEEDED or PARTIAL_SUCCESS (multi-page mode only)', + }, + statusMessage: { + type: 'string', + description: 'Why an async job only partially succeeded (multi-page mode only)', + }, + warnings: { + type: 'json', + description: 'Async job warnings: [{errorCode, pages}] (multi-page mode only)', + }, }, } diff --git a/apps/sim/lib/api/contracts/tools/aws/athena-batch-get-query-execution.ts b/apps/sim/lib/api/contracts/tools/aws/athena-batch-get-query-execution.ts index 2d0d0de38dd..f4fc6148880 100644 --- a/apps/sim/lib/api/contracts/tools/aws/athena-batch-get-query-execution.ts +++ b/apps/sim/lib/api/contracts/tools/aws/athena-batch-get-query-execution.ts @@ -1,5 +1,8 @@ import { z } from 'zod' -import { athenaConnectionSchema } from '@/lib/api/contracts/tools/aws/athena-shared' +import { + athenaConnectionSchema, + athenaQueryExecutionDetailsShape, +} from '@/lib/api/contracts/tools/aws/athena-shared' import type { ContractBody, ContractBodyInput, @@ -35,6 +38,7 @@ const BatchGetQueryExecutionResponseSchema = z.object({ queryQueueTimeInMillis: z.number().nullable(), totalExecutionTimeInMillis: z.number().nullable(), outputLocation: z.string().nullable(), + ...athenaQueryExecutionDetailsShape, }) ), unprocessedQueryExecutionIds: z.array( diff --git a/apps/sim/lib/api/contracts/tools/aws/athena-get-query-execution.ts b/apps/sim/lib/api/contracts/tools/aws/athena-get-query-execution.ts index 7383ab81d99..7847b402b6a 100644 --- a/apps/sim/lib/api/contracts/tools/aws/athena-get-query-execution.ts +++ b/apps/sim/lib/api/contracts/tools/aws/athena-get-query-execution.ts @@ -1,5 +1,8 @@ import { z } from 'zod' -import { athenaConnectionSchema } from '@/lib/api/contracts/tools/aws/athena-shared' +import { + athenaConnectionSchema, + athenaQueryExecutionDetailsShape, +} from '@/lib/api/contracts/tools/aws/athena-shared' import type { ContractBody, ContractBodyInput, @@ -30,6 +33,7 @@ const GetQueryExecutionResponseSchema = z.object({ queryQueueTimeInMillis: z.number().nullable(), totalExecutionTimeInMillis: z.number().nullable(), outputLocation: z.string().nullable(), + ...athenaQueryExecutionDetailsShape, }), }) diff --git a/apps/sim/lib/api/contracts/tools/aws/athena-get-query-results.ts b/apps/sim/lib/api/contracts/tools/aws/athena-get-query-results.ts index 5fa8d7f362b..50eee5c2b84 100644 --- a/apps/sim/lib/api/contracts/tools/aws/athena-get-query-results.ts +++ b/apps/sim/lib/api/contracts/tools/aws/athena-get-query-results.ts @@ -23,6 +23,11 @@ const GetQueryResultsResponseSchema = z.object({ z.object({ name: z.string(), type: z.string(), + label: z.string().nullable(), + precision: z.number().nullable(), + scale: z.number().nullable(), + nullable: z.string().nullable(), + caseSensitive: z.boolean().nullable(), }) ), rows: z.array(z.record(z.string(), z.string())), diff --git a/apps/sim/lib/api/contracts/tools/aws/athena-shared.ts b/apps/sim/lib/api/contracts/tools/aws/athena-shared.ts index 5bddcc9266b..3db4a7836db 100644 --- a/apps/sim/lib/api/contracts/tools/aws/athena-shared.ts +++ b/apps/sim/lib/api/contracts/tools/aws/athena-shared.ts @@ -105,6 +105,25 @@ export const athenaEngineVersionSchema = z.object({ effectiveEngineVersion: z.string().nullable(), }) +/** Query execution fields beyond the core status and statistics. */ +export const athenaQueryExecutionDetailsShape = { + servicePreProcessingTimeInMillis: z.number().nullable(), + serviceProcessingTimeInMillis: z.number().nullable(), + dataManifestLocation: z.string().nullable(), + reusedPreviousResult: z.boolean().nullable(), + athenaError: z + .object({ + errorCategory: z.number().nullable(), + errorType: z.number().nullable(), + retryable: z.boolean().nullable(), + errorMessage: z.string().nullable(), + }) + .nullable(), + executionParameters: z.array(z.string()).nullable(), + substatementType: z.string().nullable(), + engineVersion: athenaEngineVersionSchema.nullable(), +} + export const athenaSuccessResponseSchema = z.object({ success: z.literal(true), output: z.object({ success: z.literal(true) }), diff --git a/apps/sim/lib/api/contracts/tools/aws/athena-start-query.ts b/apps/sim/lib/api/contracts/tools/aws/athena-start-query.ts index 3d3d38f69c4..6cdaf7e8169 100644 --- a/apps/sim/lib/api/contracts/tools/aws/athena-start-query.ts +++ b/apps/sim/lib/api/contracts/tools/aws/athena-start-query.ts @@ -25,6 +25,10 @@ const StartQuerySchema = athenaConnectionSchema.extend({ (v) => (v === '' || v === undefined || v === null ? undefined : v), z.coerce.number().int().min(0).max(10080).optional() ), + encryptionOption: z.enum(['SSE_S3', 'SSE_KMS', 'CSE_KMS']).optional(), + kmsKey: z.string().optional(), + expectedBucketOwner: z.string().optional(), + clientRequestToken: z.string().min(32).max(128).optional(), }) const StartQueryResponseSchema = z.object({ diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudformation-create-change-set.ts b/apps/sim/lib/api/contracts/tools/aws/cloudformation-create-change-set.ts index 35ab5c3f3b2..fb3a1afc9ef 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudformation-create-change-set.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudformation-create-change-set.ts @@ -50,6 +50,18 @@ const CreateChangeSetSchema = z ), changeSetType: z.enum(['CREATE', 'UPDATE', 'IMPORT']).optional(), description: z.string().max(1024, 'Description must be at most 1024 characters').optional(), + roleArn: z.string().min(1).optional(), + tags: z + .array( + z.object({ + key: z + .string() + .min(1, 'Tag key is required') + .max(128, 'Tag key must be at most 128 characters'), + value: z.string().max(256, 'Tag value must be at most 256 characters'), + }) + ) + .optional(), }) .superRefine((data, ctx) => { if (!data.templateBody && !data.usePreviousTemplate) { diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudformation-create-stack.ts b/apps/sim/lib/api/contracts/tools/aws/cloudformation-create-stack.ts index 8b56f1ee24f..abe49a442c1 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudformation-create-stack.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudformation-create-stack.ts @@ -58,6 +58,8 @@ const CreateStackSchema = z.object({ .optional(), onFailure: z.enum(['ROLLBACK', 'DELETE', 'DO_NOTHING']).optional(), timeoutInMinutes: z.coerce.number().int().positive().optional(), + roleArn: z.string().min(1).optional(), + enableTerminationProtection: z.boolean().optional(), }) const CreateStackResponseSchema = z.object({ diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-change-set.ts b/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-change-set.ts index d3353c05d4a..ba9e123da83 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-change-set.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-change-set.ts @@ -18,6 +18,7 @@ const DescribeChangeSetSchema = z.object({ secretAccessKey: z.string().min(1, 'AWS secret access key is required'), changeSetName: z.string().min(1, 'Change set name is required'), stackName: z.string().optional(), + nextToken: z.string().optional(), }) const DescribeChangeSetResponseSchema = z.object({ @@ -40,8 +41,38 @@ const DescribeChangeSetResponseSchema = z.object({ physicalResourceId: z.string().optional(), resourceType: z.string().optional(), replacement: z.string().optional(), + type: z.string().optional(), + policyAction: z.string().optional(), + scope: z.array(z.string()), + changeSetId: z.string().optional(), + details: z.array( + z.object({ + attribute: z.string().optional(), + name: z.string().optional(), + requiresRecreation: z.string().optional(), + evaluation: z.string().optional(), + changeSource: z.string().optional(), + causingEntity: z.string().optional(), + }) + ), }) ), + parameters: z.array( + z.object({ + parameterKey: z.string(), + parameterValue: z.string().optional(), + usePreviousValue: z.boolean().optional(), + resolvedValue: z.string().optional(), + }) + ), + tags: z.array(z.object({ key: z.string(), value: z.string() })), + notificationArns: z.array(z.string()), + includeNestedStacks: z.boolean().optional(), + parentChangeSetId: z.string().optional(), + rootChangeSetId: z.string().optional(), + onStackFailure: z.string().optional(), + importExistingResources: z.boolean().optional(), + nextToken: z.string().nullable(), }), }) diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-stack-events.ts b/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-stack-events.ts index a052375a958..17cc8f455c6 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-stack-events.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-stack-events.ts @@ -31,6 +31,15 @@ const DescribeStackEventsResponseSchema = z.object({ resourceStatus: z.string().optional(), resourceStatusReason: z.string().optional(), timestamp: z.number().optional(), + operationId: z.string().optional(), + resourceProperties: z.string().optional(), + clientRequestToken: z.string().optional(), + detailedStatus: z.string().optional(), + hookType: z.string().optional(), + hookStatus: z.string().optional(), + hookStatusReason: z.string().optional(), + hookInvocationPoint: z.string().optional(), + hookFailureMode: z.string().optional(), }) ), }), diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-stacks.ts b/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-stacks.ts index 87ecea916f3..eae930abd46 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-stacks.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudformation-describe-stacks.ts @@ -37,6 +37,7 @@ const DescribeStacksResponseSchema = z.object({ outputKey: z.string(), outputValue: z.string(), description: z.string().optional(), + exportName: z.string().optional(), }) ), tags: z.array( @@ -45,6 +46,26 @@ const DescribeStacksResponseSchema = z.object({ value: z.string(), }) ), + parameters: z.array( + z.object({ + parameterKey: z.string(), + parameterValue: z.string().optional(), + usePreviousValue: z.boolean().optional(), + resolvedValue: z.string().optional(), + }) + ), + capabilities: z.array(z.string()), + changeSetId: z.string().optional(), + deletionTime: z.number().optional(), + disableRollback: z.boolean().optional(), + notificationArns: z.array(z.string()), + timeoutInMinutes: z.number().optional(), + roleArn: z.string().optional(), + parentId: z.string().optional(), + rootId: z.string().optional(), + detailedStatus: z.string().optional(), + deletionMode: z.string().optional(), + retainExceptOnCreate: z.boolean().optional(), }) ), }), diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudformation-get-template-summary.ts b/apps/sim/lib/api/contracts/tools/aws/cloudformation-get-template-summary.ts index ccf0cf7c067..f2a3c60e544 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudformation-get-template-summary.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudformation-get-template-summary.ts @@ -41,6 +41,7 @@ const GetTemplateSummaryResponseSchema = z.object({ parameterType: z.string().optional(), noEcho: z.boolean().optional(), description: z.string().optional(), + allowedValues: z.array(z.string()), }) ), capabilities: z.array(z.string()), diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudformation-update-stack.ts b/apps/sim/lib/api/contracts/tools/aws/cloudformation-update-stack.ts index 9c9e8506570..a735940d32c 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudformation-update-stack.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudformation-update-stack.ts @@ -58,6 +58,7 @@ const UpdateStackSchema = z }) ) .optional(), + roleArn: z.string().min(1).optional(), }) .superRefine((data, ctx) => { if (!data.templateBody && !data.usePreviousTemplate) { diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-describe-alarm-history.ts b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-describe-alarm-history.ts index 22e241e1ccc..86a51cba138 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-describe-alarm-history.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-describe-alarm-history.ts @@ -51,6 +51,8 @@ const DescribeAlarmHistoryResponseSchema = z.object({ timestamp: z.number().optional(), historyItemType: z.string().optional(), historySummary: z.string().optional(), + historyData: z.string().optional(), + alarmContributorId: z.string().optional(), }) ), }), diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-describe-alarms.ts b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-describe-alarms.ts index 45322bcf4cf..6ccf96aef7d 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-describe-alarms.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-describe-alarms.ts @@ -34,6 +34,7 @@ const DescribeAlarmsSchema = z.object({ .max(100, 'limit must be at most 100 (CloudWatch DescribeAlarms limit)') .optional() ), + nextToken: z.string().optional(), }) const DescribeAlarmsResponseSchema = z.object({ @@ -51,8 +52,49 @@ const DescribeAlarmsResponseSchema = z.object({ threshold: z.number().optional(), evaluationPeriods: z.number().optional(), stateUpdatedTimestamp: z.number().optional(), + alarmType: z.string(), + alarmDescription: z.string().optional(), + actionsEnabled: z.boolean().optional(), + alarmActions: z.array(z.string()), + okActions: z.array(z.string()), + insufficientDataActions: z.array(z.string()), + stateReasonData: z.string().optional(), + stateTransitionedTimestamp: z.number().optional(), + alarmConfigurationUpdatedTimestamp: z.number().optional(), + statistic: z.string().optional(), + extendedStatistic: z.string().optional(), + dimensions: z.array(z.object({ name: z.string(), value: z.string() })).optional(), + period: z.number().optional(), + unit: z.string().optional(), + datapointsToAlarm: z.number().optional(), + treatMissingData: z.string().optional(), + thresholdMetricId: z.string().optional(), + metrics: z + .array( + z.object({ + id: z.string(), + expression: z.string().optional(), + label: z.string().optional(), + returnData: z.boolean().optional(), + period: z.number().optional(), + accountId: z.string().optional(), + metricStat: z + .object({ + namespace: z.string().optional(), + metricName: z.string().optional(), + dimensions: z.array(z.object({ name: z.string(), value: z.string() })), + period: z.number().optional(), + stat: z.string().optional(), + unit: z.string().optional(), + }) + .optional(), + }) + ) + .optional(), + alarmRule: z.string().optional(), }) ), + nextToken: z.string().nullable(), }), }) diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-filter-log-events.ts b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-filter-log-events.ts index 3233f6202b6..79d0fbadf69 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-filter-log-events.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-filter-log-events.ts @@ -26,6 +26,7 @@ const FilterLogEventsSchema = z.object({ (v) => (v === '' || v === undefined || v === null ? undefined : v), z.coerce.number().int().positive().optional() ), + nextToken: z.string().optional(), }) const FilterLogEventsResponseSchema = z.object({ @@ -37,8 +38,10 @@ const FilterLogEventsResponseSchema = z.object({ timestamp: z.number().optional(), message: z.string().optional(), ingestionTime: z.number().optional(), + eventId: z.string().optional(), }) ), + nextToken: z.string().nullable(), }), }) diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-get-log-events.ts b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-get-log-events.ts index 3bfff17b8c3..00a8ecb1bbd 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-get-log-events.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-get-log-events.ts @@ -29,6 +29,7 @@ const GetLogEventsSchema = z.object({ .max(10000, 'limit must be at most 10000 (CloudWatch Logs GetLogEvents limit)') .optional() ), + nextToken: z.string().optional(), }) const GetLogEventsResponseSchema = z.object({ @@ -41,6 +42,8 @@ const GetLogEventsResponseSchema = z.object({ ingestionTime: z.number().optional(), }) ), + nextForwardToken: z.string().nullable(), + nextBackwardToken: z.string().nullable(), }), }) diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-get-metric-statistics.ts b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-get-metric-statistics.ts index 80278dca99c..32e68cbd920 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-get-metric-statistics.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-get-metric-statistics.ts @@ -26,6 +26,8 @@ const GetMetricStatisticsSchema = z.object({ .min(1, 'At least one statistic is required') .max(5, 'At most 5 statistics are allowed per GetMetricStatistics call'), dimensions: z.string().optional(), + extendedStatistics: z.array(z.string().min(1)).max(10).optional(), + unit: z.string().optional(), }) const GetMetricStatisticsResponseSchema = z.object({ @@ -41,6 +43,7 @@ const GetMetricStatisticsResponseSchema = z.object({ maximum: z.number().optional(), sampleCount: z.number().optional(), unit: z.string().optional(), + extendedStatistics: z.record(z.string(), z.number()).optional(), }) ), }), diff --git a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-query-logs.ts b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-query-logs.ts index 4de4c84d4a2..58ffa561022 100644 --- a/apps/sim/lib/api/contracts/tools/aws/cloudwatch-query-logs.ts +++ b/apps/sim/lib/api/contracts/tools/aws/cloudwatch-query-logs.ts @@ -36,6 +36,7 @@ const QueryLogsResponseSchema = z.object({ recordsScanned: z.number(), }), status: z.string(), + queryId: z.string(), }), }) diff --git a/apps/sim/lib/api/contracts/tools/aws/dynamodb-delete.ts b/apps/sim/lib/api/contracts/tools/aws/dynamodb-delete.ts index 2333b0fcf92..b0c57015cd7 100644 --- a/apps/sim/lib/api/contracts/tools/aws/dynamodb-delete.ts +++ b/apps/sim/lib/api/contracts/tools/aws/dynamodb-delete.ts @@ -23,10 +23,13 @@ const DeleteSchema = z.object({ conditionExpression: z.string().optional(), expressionAttributeNames: z.record(z.string(), z.string()).optional(), expressionAttributeValues: z.record(z.string(), z.unknown()).optional(), + returnValues: z.enum(['NONE', 'ALL_OLD']).optional(), }) const DeleteResponseSchema = z.object({ message: z.string(), + // untyped-response: DynamoDB DeleteItem ALL_OLD Attributes is an arbitrary user attribute-value record + attributes: z.record(z.string(), z.unknown()).nullable().optional(), }) export const awsDynamodbDeleteContract = defineRouteContract({ diff --git a/apps/sim/lib/api/contracts/tools/aws/dynamodb-get.ts b/apps/sim/lib/api/contracts/tools/aws/dynamodb-get.ts index d487ce13050..b93146169fe 100644 --- a/apps/sim/lib/api/contracts/tools/aws/dynamodb-get.ts +++ b/apps/sim/lib/api/contracts/tools/aws/dynamodb-get.ts @@ -27,6 +27,8 @@ const GetSchema = z.object({ if (val === true || val === 'true') return true return undefined }), + projectionExpression: z.string().optional(), + expressionAttributeNames: z.record(z.string(), z.string()).optional(), }) const GetResponseSchema = z.object({ diff --git a/apps/sim/lib/api/contracts/tools/aws/dynamodb-introspect.ts b/apps/sim/lib/api/contracts/tools/aws/dynamodb-introspect.ts index 2c0d1afdcd8..60532b3fe77 100644 --- a/apps/sim/lib/api/contracts/tools/aws/dynamodb-introspect.ts +++ b/apps/sim/lib/api/contracts/tools/aws/dynamodb-introspect.ts @@ -46,6 +46,12 @@ const TableDetailsSchema = z.object({ itemCount: z.number(), tableSizeBytes: z.number(), billingMode: z.string(), + tableArn: z.string().nullable(), + creationDateTime: z.string().nullable(), + deletionProtectionEnabled: z.boolean().nullable(), + streamEnabled: z.boolean().nullable(), + streamViewType: z.string().nullable(), + latestStreamArn: z.string().nullable(), }) const IntrospectResponseSchema = z.object({ diff --git a/apps/sim/lib/api/contracts/tools/aws/dynamodb-put.ts b/apps/sim/lib/api/contracts/tools/aws/dynamodb-put.ts index 5fb4a57bb0e..bf93f0497c8 100644 --- a/apps/sim/lib/api/contracts/tools/aws/dynamodb-put.ts +++ b/apps/sim/lib/api/contracts/tools/aws/dynamodb-put.ts @@ -23,12 +23,15 @@ const PutSchema = z.object({ conditionExpression: z.string().optional(), expressionAttributeNames: z.record(z.string(), z.string()).optional(), expressionAttributeValues: z.record(z.string(), z.unknown()).optional(), + returnValues: z.enum(['NONE', 'ALL_OLD']).optional(), }) const PutResponseSchema = z.object({ message: z.string(), // untyped-response: DynamoDB Item is an arbitrary user attribute-value record item: z.record(z.string(), z.unknown()), + // untyped-response: DynamoDB PutItem ALL_OLD Attributes is an arbitrary user attribute-value record + attributes: z.record(z.string(), z.unknown()).nullable().optional(), }) export const awsDynamodbPutContract = defineRouteContract({ diff --git a/apps/sim/lib/api/contracts/tools/aws/dynamodb-query.ts b/apps/sim/lib/api/contracts/tools/aws/dynamodb-query.ts index e68f6298d4c..2b5f4515503 100644 --- a/apps/sim/lib/api/contracts/tools/aws/dynamodb-query.ts +++ b/apps/sim/lib/api/contracts/tools/aws/dynamodb-query.ts @@ -24,7 +24,22 @@ const QuerySchema = z.object({ indexName: z.string().optional(), limit: z.number().positive().optional(), exclusiveStartKey: z.record(z.string(), z.unknown()).optional(), - scanIndexForward: z.boolean().optional(), + scanIndexForward: z + .union([z.boolean(), z.enum(['true', 'false'])]) + .optional() + .transform((val) => { + if (val === false || val === 'false') return false + if (val === true || val === 'true') return true + return undefined + }), + projectionExpression: z.string().optional(), + consistentRead: z + .union([z.boolean(), z.enum(['true', 'false'])]) + .optional() + .transform((val) => { + if (val === true || val === 'true') return true + return undefined + }), }) const QueryResponseSchema = z.object({ @@ -32,6 +47,7 @@ const QueryResponseSchema = z.object({ // untyped-response: DynamoDB Items are arbitrary user attribute-value records items: z.array(z.record(z.string(), z.unknown())), count: z.number(), + scannedCount: z.number().nullable(), // untyped-response: DynamoDB LastEvaluatedKey mirrors the table's primary key shape lastEvaluatedKey: z.record(z.string(), z.unknown()).optional(), }) diff --git a/apps/sim/lib/api/contracts/tools/aws/dynamodb-scan.ts b/apps/sim/lib/api/contracts/tools/aws/dynamodb-scan.ts index 10bc7231599..ee57f699c5d 100644 --- a/apps/sim/lib/api/contracts/tools/aws/dynamodb-scan.ts +++ b/apps/sim/lib/api/contracts/tools/aws/dynamodb-scan.ts @@ -7,29 +7,60 @@ import type { import { defineRouteContract } from '@/lib/api/contracts/types' import { validateAwsRegion } from '@/lib/core/security/input-validation' -const ScanSchema = z.object({ - region: z - .string() - .min(1, 'AWS region is required') - .refine((v) => validateAwsRegion(v).isValid, { - message: 'Invalid AWS region format (e.g., us-east-1, eu-west-2)', - }), - accessKeyId: z.string().min(1, 'AWS access key ID is required'), - secretAccessKey: z.string().min(1, 'AWS secret access key is required'), - tableName: z.string().min(1, 'Table name is required'), - filterExpression: z.string().optional(), - projectionExpression: z.string().optional(), - expressionAttributeNames: z.record(z.string(), z.string()).optional(), - expressionAttributeValues: z.record(z.string(), z.unknown()).optional(), - limit: z.number().positive().optional(), - exclusiveStartKey: z.record(z.string(), z.unknown()).optional(), -}) +const ScanSchema = z + .object({ + region: z + .string() + .min(1, 'AWS region is required') + .refine((v) => validateAwsRegion(v).isValid, { + message: 'Invalid AWS region format (e.g., us-east-1, eu-west-2)', + }), + accessKeyId: z.string().min(1, 'AWS access key ID is required'), + secretAccessKey: z.string().min(1, 'AWS secret access key is required'), + tableName: z.string().min(1, 'Table name is required'), + filterExpression: z.string().optional(), + projectionExpression: z.string().optional(), + expressionAttributeNames: z.record(z.string(), z.string()).optional(), + expressionAttributeValues: z.record(z.string(), z.unknown()).optional(), + limit: z.number().positive().optional(), + exclusiveStartKey: z.record(z.string(), z.unknown()).optional(), + indexName: z.string().optional(), + consistentRead: z + .union([z.boolean(), z.enum(['true', 'false'])]) + .optional() + .transform((val) => { + if (val === true || val === 'true') return true + return undefined + }), + segment: z.number().int().min(0).max(999999).optional(), + totalSegments: z.number().int().min(1).max(1000000).optional(), + }) + .superRefine((value, ctx) => { + if ((value.segment === undefined) !== (value.totalSegments === undefined)) { + ctx.addIssue({ + code: 'custom', + path: ['segment'], + message: 'Segment and Total Segments must be set together for a parallel scan', + }) + } else if ( + value.segment !== undefined && + value.totalSegments !== undefined && + value.segment >= value.totalSegments + ) { + ctx.addIssue({ + code: 'custom', + path: ['segment'], + message: 'Segment must be less than Total Segments', + }) + } + }) const ScanResponseSchema = z.object({ message: z.string(), // untyped-response: DynamoDB Items are arbitrary user attribute-value records items: z.array(z.record(z.string(), z.unknown())), count: z.number(), + scannedCount: z.number().nullable(), // untyped-response: DynamoDB LastEvaluatedKey mirrors the table's primary key shape lastEvaluatedKey: z.record(z.string(), z.unknown()).optional(), }) diff --git a/apps/sim/lib/api/contracts/tools/aws/dynamodb-update.ts b/apps/sim/lib/api/contracts/tools/aws/dynamodb-update.ts index 0b5e2c81ed7..cab57218d3c 100644 --- a/apps/sim/lib/api/contracts/tools/aws/dynamodb-update.ts +++ b/apps/sim/lib/api/contracts/tools/aws/dynamodb-update.ts @@ -24,6 +24,7 @@ const UpdateSchema = z.object({ expressionAttributeNames: z.record(z.string(), z.string()).optional(), expressionAttributeValues: z.record(z.string(), z.unknown()).optional(), conditionExpression: z.string().optional(), + returnValues: z.enum(['NONE', 'ALL_OLD', 'UPDATED_OLD', 'ALL_NEW', 'UPDATED_NEW']).optional(), }) const UpdateResponseSchema = z.object({ diff --git a/apps/sim/lib/api/contracts/tools/aws/iam-create-role.ts b/apps/sim/lib/api/contracts/tools/aws/iam-create-role.ts index ab70e1d0df4..d75cbcf4ee1 100644 --- a/apps/sim/lib/api/contracts/tools/aws/iam-create-role.ts +++ b/apps/sim/lib/api/contracts/tools/aws/iam-create-role.ts @@ -1,8 +1,10 @@ +import { isRecordLike } from '@sim/utils/object' import { z } from 'zod' import { iamAssumeRolePolicyDocumentSchema, iamConnectionShape, iamCreatePathSchema, + iamPolicyArnSchema, iamRoleDescriptionSchema, iamRoleNameSchema, } from '@/lib/api/contracts/tools/aws/iam-shared' @@ -26,6 +28,28 @@ const Schema = z.object({ .max(43200, 'Max session duration cannot exceed 43200 seconds (12 hours)') .optional() .nullable(), + permissionsBoundary: iamPolicyArnSchema.optional().nullable(), + tags: z + .string() + .refine( + (value) => { + try { + const parsed: unknown = JSON.parse(value) + return ( + isRecordLike(parsed) && + Object.keys(parsed).length <= 50 && + Object.values(parsed).every((tagValue) => + ['string', 'number', 'boolean'].includes(typeof tagValue) + ) + ) + } catch { + return false + } + }, + { message: 'Tags must be a JSON object of at most 50 key/value pairs with scalar values' } + ) + .optional() + .nullable(), }) const CreateRoleResponseSchema = z.object({ @@ -35,6 +59,13 @@ const CreateRoleResponseSchema = z.object({ arn: z.string(), path: z.string(), createDate: z.string().nullable(), + permissionsBoundaryArn: z.string().nullable(), + tags: z.array( + z.object({ + key: z.string(), + value: z.string(), + }) + ), }) export const awsIamCreateRoleContract = defineRouteContract({ diff --git a/apps/sim/lib/api/contracts/tools/aws/iam-create-user.ts b/apps/sim/lib/api/contracts/tools/aws/iam-create-user.ts index 4e252e679b0..77426d3b468 100644 --- a/apps/sim/lib/api/contracts/tools/aws/iam-create-user.ts +++ b/apps/sim/lib/api/contracts/tools/aws/iam-create-user.ts @@ -1,7 +1,9 @@ +import { isRecordLike } from '@sim/utils/object' import { z } from 'zod' import { iamConnectionShape, iamCreatePathSchema, + iamPolicyArnSchema, iamUserName64Schema, } from '@/lib/api/contracts/tools/aws/iam-shared' import type { @@ -15,6 +17,28 @@ const Schema = z.object({ ...iamConnectionShape, userName: iamUserName64Schema, path: iamCreatePathSchema.optional().nullable(), + permissionsBoundary: iamPolicyArnSchema.optional().nullable(), + tags: z + .string() + .refine( + (value) => { + try { + const parsed: unknown = JSON.parse(value) + return ( + isRecordLike(parsed) && + Object.keys(parsed).length <= 50 && + Object.values(parsed).every((tagValue) => + ['string', 'number', 'boolean'].includes(typeof tagValue) + ) + ) + } catch { + return false + } + }, + { message: 'Tags must be a JSON object of at most 50 key/value pairs with scalar values' } + ) + .optional() + .nullable(), }) const CreateUserResponseSchema = z.object({ @@ -24,6 +48,13 @@ const CreateUserResponseSchema = z.object({ arn: z.string(), path: z.string(), createDate: z.string().nullable(), + permissionsBoundaryArn: z.string().nullable(), + tags: z.array( + z.object({ + key: z.string(), + value: z.string(), + }) + ), }) export const awsIamCreateUserContract = defineRouteContract({ diff --git a/apps/sim/lib/api/contracts/tools/aws/iam-get-role.ts b/apps/sim/lib/api/contracts/tools/aws/iam-get-role.ts index 8ee1d93e5c7..dfebcef7ff8 100644 --- a/apps/sim/lib/api/contracts/tools/aws/iam-get-role.ts +++ b/apps/sim/lib/api/contracts/tools/aws/iam-get-role.ts @@ -23,6 +23,13 @@ const GetRoleResponseSchema = z.object({ assumeRolePolicyDocument: z.string().nullable(), roleLastUsedDate: z.string().nullable(), roleLastUsedRegion: z.string().nullable(), + permissionsBoundaryArn: z.string().nullable(), + tags: z.array( + z.object({ + key: z.string(), + value: z.string(), + }) + ), }) export const awsIamGetRoleContract = defineRouteContract({ diff --git a/apps/sim/lib/api/contracts/tools/aws/iam-list-policies.ts b/apps/sim/lib/api/contracts/tools/aws/iam-list-policies.ts index 42d0f5a7bba..6d90944c4a2 100644 --- a/apps/sim/lib/api/contracts/tools/aws/iam-list-policies.ts +++ b/apps/sim/lib/api/contracts/tools/aws/iam-list-policies.ts @@ -21,6 +21,7 @@ const Schema = z.object({ pathPrefix: iamPolicyPathPrefixSchema.optional().nullable(), maxItems: iamMaxItemsSchema.optional().nullable(), marker: iamMarkerSchema.optional().nullable(), + policyUsageFilter: z.enum(['PermissionsPolicy', 'PermissionsBoundary']).optional().nullable(), }) /** diff --git a/apps/sim/lib/api/contracts/tools/aws/identity-center-describe-user.ts b/apps/sim/lib/api/contracts/tools/aws/identity-center-describe-user.ts index 66915a7dbc5..cd435236ded 100644 --- a/apps/sim/lib/api/contracts/tools/aws/identity-center-describe-user.ts +++ b/apps/sim/lib/api/contracts/tools/aws/identity-center-describe-user.ts @@ -24,6 +24,8 @@ const ResponseSchema = z.object({ email: z.string().nullable(), userStatus: z.string().nullable(), title: z.string().nullable(), + givenName: z.string().nullable(), + familyName: z.string().nullable(), externalIds: z.array(z.object({ issuer: z.string(), id: z.string() })), }) diff --git a/apps/sim/lib/api/contracts/tools/aws/identity-center-get-group.ts b/apps/sim/lib/api/contracts/tools/aws/identity-center-get-group.ts index a4caa36bc6d..6dbe279c61d 100644 --- a/apps/sim/lib/api/contracts/tools/aws/identity-center-get-group.ts +++ b/apps/sim/lib/api/contracts/tools/aws/identity-center-get-group.ts @@ -20,6 +20,7 @@ const ResponseSchema = z.object({ groupId: z.string(), displayName: z.string().nullable(), description: z.string().nullable(), + externalIds: z.array(z.object({ issuer: z.string(), id: z.string() })), }) export const awsIdentityCenterGetGroupContract = defineRouteContract({ diff --git a/apps/sim/lib/api/contracts/tools/aws/identity-center-get-user.ts b/apps/sim/lib/api/contracts/tools/aws/identity-center-get-user.ts index 8ed5810ef28..7d680dbe015 100644 --- a/apps/sim/lib/api/contracts/tools/aws/identity-center-get-user.ts +++ b/apps/sim/lib/api/contracts/tools/aws/identity-center-get-user.ts @@ -21,6 +21,11 @@ const ResponseSchema = z.object({ userName: z.string(), displayName: z.string().nullable(), email: z.string().nullable(), + givenName: z.string().nullable(), + familyName: z.string().nullable(), + userStatus: z.string().nullable(), + title: z.string().nullable(), + externalIds: z.array(z.object({ issuer: z.string(), id: z.string() })), }) export const awsIdentityCenterGetUserContract = defineRouteContract({ diff --git a/apps/sim/lib/api/contracts/tools/aws/identity-center-list-account-assignments.ts b/apps/sim/lib/api/contracts/tools/aws/identity-center-list-account-assignments.ts index a1c19b2cf47..2b14ab09b7d 100644 --- a/apps/sim/lib/api/contracts/tools/aws/identity-center-list-account-assignments.ts +++ b/apps/sim/lib/api/contracts/tools/aws/identity-center-list-account-assignments.ts @@ -1,5 +1,6 @@ import { z } from 'zod' import { + identityCenterAccountIdSchema, identityCenterConnectionShape, identityCenterInstanceArnSchema, identityCenterMaxResultsSchema, @@ -21,6 +22,7 @@ const Schema = z.object({ principalType: identityCenterPrincipalTypeSchema, maxResults: identityCenterMaxResultsSchema.optional(), nextToken: identityCenterNextTokenSchema.optional(), + accountId: identityCenterAccountIdSchema.optional(), }) const ResponseSchema = z.object({ diff --git a/apps/sim/lib/api/contracts/tools/aws/lambda-get-function.ts b/apps/sim/lib/api/contracts/tools/aws/lambda-get-function.ts index ed5fc8369fd..48943d87b4f 100644 --- a/apps/sim/lib/api/contracts/tools/aws/lambda-get-function.ts +++ b/apps/sim/lib/api/contracts/tools/aws/lambda-get-function.ts @@ -37,6 +37,9 @@ const GetFunctionResponseSchema = z.object({ imageUri: z.string().nullable(), resolvedImageUri: z.string().nullable(), sourceKmsKeyArn: z.string().nullable(), + error: z + .object({ errorCode: z.string().nullable(), message: z.string().nullable() }) + .nullable(), }) .nullable(), tags: z.record(z.string(), z.string()), diff --git a/apps/sim/lib/api/contracts/tools/aws/lambda-invoke.ts b/apps/sim/lib/api/contracts/tools/aws/lambda-invoke.ts index e711f7a8c99..7bb519a4e82 100644 --- a/apps/sim/lib/api/contracts/tools/aws/lambda-invoke.ts +++ b/apps/sim/lib/api/contracts/tools/aws/lambda-invoke.ts @@ -25,6 +25,7 @@ const InvokeSchema = z.object({ .min(1, 'qualifier cannot be empty') .max(128, 'qualifier cannot exceed 128 characters') .optional(), + tenantId: z.string().min(1).max(256, 'tenantId cannot exceed 256 characters').optional(), }) const InvokeResponseSchema = z.object({ diff --git a/apps/sim/lib/api/contracts/tools/aws/lambda-shared.ts b/apps/sim/lib/api/contracts/tools/aws/lambda-shared.ts index 52063da1188..226a4bc9ad9 100644 --- a/apps/sim/lib/api/contracts/tools/aws/lambda-shared.ts +++ b/apps/sim/lib/api/contracts/tools/aws/lambda-shared.ts @@ -181,6 +181,7 @@ export const lambdaFunctionConfigurationSchema = z.object({ .object({ retentionPeriodInDays: z.number().nullable(), executionTimeout: z.number().nullable(), + kmsKeyArn: z.string().nullable(), }) .nullable(), tenancyConfig: z.object({ tenantIsolationMode: z.string().nullable() }).nullable(), diff --git a/apps/sim/lib/api/contracts/tools/aws/lambda-update-function-configuration.ts b/apps/sim/lib/api/contracts/tools/aws/lambda-update-function-configuration.ts index 5bb9715627e..2df35a3f8e2 100644 --- a/apps/sim/lib/api/contracts/tools/aws/lambda-update-function-configuration.ts +++ b/apps/sim/lib/api/contracts/tools/aws/lambda-update-function-configuration.ts @@ -34,6 +34,8 @@ const UpdateFunctionConfigurationSchema = z snapStartApplyOn: z.enum(['PublishedVersions', 'None']).optional(), logFormat: z.enum(['JSON', 'Text']).optional(), logGroup: z.string().optional(), + applicationLogLevel: z.enum(['TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL']).optional(), + systemLogLevel: z.enum(['DEBUG', 'INFO', 'WARN']).optional(), revisionId: z.string().optional(), }) .superRefine((value, ctx) => { diff --git a/apps/sim/lib/api/contracts/tools/aws/s3-list-objects.ts b/apps/sim/lib/api/contracts/tools/aws/s3-list-objects.ts index b0779cb251a..4ecf45b111c 100644 --- a/apps/sim/lib/api/contracts/tools/aws/s3-list-objects.ts +++ b/apps/sim/lib/api/contracts/tools/aws/s3-list-objects.ts @@ -14,6 +14,8 @@ const S3ListObjectsSchema = z.object({ prefix: z.string().optional().nullable(), maxKeys: z.number().optional().nullable(), continuationToken: z.string().optional().nullable(), + delimiter: z.string().optional().nullable(), + startAfter: z.string().optional().nullable(), }) const S3ListObjectsResponseSchema = z.object({ @@ -25,8 +27,10 @@ const S3ListObjectsResponseSchema = z.object({ size: z.number(), lastModified: z.string(), etag: z.string(), + storageClass: z.string().nullable(), }) ), + commonPrefixes: z.array(z.string()), isTruncated: z.boolean().optional(), nextContinuationToken: z.string().optional(), keyCount: z.number().optional(), diff --git a/apps/sim/lib/api/contracts/tools/aws/s3-put-object.ts b/apps/sim/lib/api/contracts/tools/aws/s3-put-object.ts index 26abb5ef81d..0128b46b9bc 100644 --- a/apps/sim/lib/api/contracts/tools/aws/s3-put-object.ts +++ b/apps/sim/lib/api/contracts/tools/aws/s3-put-object.ts @@ -17,6 +17,10 @@ const S3PutObjectSchema = z.object({ content: z.string().optional().nullable(), contentType: z.string().optional().nullable(), acl: z.string().optional().nullable(), + metadata: z.record(z.string(), z.string()).optional().nullable(), + storageClass: z.string().optional().nullable(), + serverSideEncryption: z.string().optional().nullable(), + sseKmsKeyId: z.string().optional().nullable(), }) const S3PutObjectResponseSchema = z.object({ @@ -28,6 +32,8 @@ const S3PutObjectResponseSchema = z.object({ location: z.string(), key: z.string(), bucket: z.string(), + versionId: z.string().nullable(), + serverSideEncryption: z.string().nullable(), }), }) diff --git a/apps/sim/lib/api/contracts/tools/aws/secrets-manager-create-secret.ts b/apps/sim/lib/api/contracts/tools/aws/secrets-manager-create-secret.ts index 87d4fe316ba..efe2d7ddbb6 100644 --- a/apps/sim/lib/api/contracts/tools/aws/secrets-manager-create-secret.ts +++ b/apps/sim/lib/api/contracts/tools/aws/secrets-manager-create-secret.ts @@ -13,6 +13,11 @@ const CreateSecretSchema = z.object({ name: z.string().min(1, 'Secret name is required'), secretValue: z.string().min(1, 'Secret value is required'), description: z.string().nullish(), + kmsKeyId: z.string().nullish(), + tags: z + .array(z.object({ key: z.string().min(1).max(128), value: z.string().max(256) })) + .max(50) + .nullish(), }) const CreateSecretResponseSchema = z.object({ diff --git a/apps/sim/lib/api/contracts/tools/aws/secrets-manager-get-secret.ts b/apps/sim/lib/api/contracts/tools/aws/secrets-manager-get-secret.ts index 6873afe8fc6..86000552c31 100644 --- a/apps/sim/lib/api/contracts/tools/aws/secrets-manager-get-secret.ts +++ b/apps/sim/lib/api/contracts/tools/aws/secrets-manager-get-secret.ts @@ -18,6 +18,7 @@ const GetSecretSchema = z.object({ const GetSecretResponseSchema = z.object({ name: z.string(), secretValue: z.string(), + secretBinary: z.string().nullable(), arn: z.string(), versionId: z.string(), versionStages: z.array(z.string()), diff --git a/apps/sim/lib/api/contracts/tools/aws/secrets-manager-list-secrets.ts b/apps/sim/lib/api/contracts/tools/aws/secrets-manager-list-secrets.ts index 198e751949a..2ec15fbb049 100644 --- a/apps/sim/lib/api/contracts/tools/aws/secrets-manager-list-secrets.ts +++ b/apps/sim/lib/api/contracts/tools/aws/secrets-manager-list-secrets.ts @@ -12,6 +12,26 @@ const ListSecretsSchema = z.object({ secretAccessKey: z.string().min(1, 'AWS secret access key is required'), maxResults: z.number().min(1).max(100).nullish(), nextToken: z.string().nullish(), + filters: z + .array( + z.object({ + key: z.enum([ + 'description', + 'name', + 'tag-key', + 'tag-value', + 'primary-region', + 'owning-service', + 'all', + ]), + values: z.array(z.string().min(1)).min(1).max(10), + }) + ) + .max(10) + .nullish(), + sortOrder: z.enum(['asc', 'desc']).nullish(), + sortBy: z.enum(['created-date', 'last-accessed-date', 'last-changed-date', 'name']).nullish(), + includePlannedDeletion: z.boolean().nullish(), }) const RotationRulesResponseSchema = z.object({ @@ -26,6 +46,10 @@ const ListSecretsResponseSchema = z.object({ name: z.string(), arn: z.string(), description: z.string().nullable(), + kmsKeyId: z.string().nullable(), + rotationLambdaARN: z.string().nullable(), + owningService: z.string().nullable(), + primaryRegion: z.string().nullable(), createdDate: z.string().nullable(), lastChangedDate: z.string().nullable(), lastAccessedDate: z.string().nullable(), diff --git a/apps/sim/lib/api/contracts/tools/aws/secrets-manager-update-secret.ts b/apps/sim/lib/api/contracts/tools/aws/secrets-manager-update-secret.ts index e72fe04a3ad..a7d35a0a5ee 100644 --- a/apps/sim/lib/api/contracts/tools/aws/secrets-manager-update-secret.ts +++ b/apps/sim/lib/api/contracts/tools/aws/secrets-manager-update-secret.ts @@ -13,6 +13,7 @@ const UpdateSecretSchema = z.object({ secretId: z.string().min(1, 'Secret ID is required'), secretValue: z.string().min(1, 'Secret value is required'), description: z.string().nullish(), + kmsKeyId: z.string().nullish(), }) const UpdateSecretResponseSchema = z.object({ diff --git a/apps/sim/lib/api/contracts/tools/aws/ses-get-account.ts b/apps/sim/lib/api/contracts/tools/aws/ses-get-account.ts index c8555b7086a..ee528d689bc 100644 --- a/apps/sim/lib/api/contracts/tools/aws/ses-get-account.ts +++ b/apps/sim/lib/api/contracts/tools/aws/ses-get-account.ts @@ -23,6 +23,8 @@ const GetAccountResponseSchema = z.object({ max24HourSend: z.number(), maxSendRate: z.number(), sentLast24Hours: z.number(), + productionAccessEnabled: z.boolean().nullable(), + enforcementStatus: z.string().nullable(), }) export const awsSesGetAccountContract = defineRouteContract({ diff --git a/apps/sim/lib/api/contracts/tools/aws/ses-send-bulk-email.ts b/apps/sim/lib/api/contracts/tools/aws/ses-send-bulk-email.ts index 06cc349435f..de4e53b74ab 100644 --- a/apps/sim/lib/api/contracts/tools/aws/ses-send-bulk-email.ts +++ b/apps/sim/lib/api/contracts/tools/aws/ses-send-bulk-email.ts @@ -7,6 +7,11 @@ import type { import { defineRouteContract } from '@/lib/api/contracts/types' import { validateAwsRegion } from '@/lib/core/security/input-validation' +/** SES `MessageTag` name or value: 1-256 letters, digits, underscores, or hyphens. */ +const sesMessageTagPartSchema = z + .string() + .regex(/^[A-Za-z0-9_-]{1,256}$/, 'Tag names and values may contain only letters, digits, _ and -') + const SendBulkEmailSchema = z.object({ region: z .string() @@ -21,6 +26,11 @@ const SendBulkEmailSchema = z.object({ destinations: z.string().min(1, 'Destinations JSON array is required'), defaultTemplateData: z.string().nullish(), configurationSetName: z.string().nullish(), + replyToAddresses: z.string().nullish(), + fromName: z.string().nullish(), + emailTags: z + .array(z.object({ name: sesMessageTagPartSchema, value: sesMessageTagPartSchema })) + .nullish(), }) const SendBulkEmailResponseSchema = z.object({ diff --git a/apps/sim/lib/api/contracts/tools/aws/ses-send-email.ts b/apps/sim/lib/api/contracts/tools/aws/ses-send-email.ts index f6f93286d4a..6eb5dcf3e82 100644 --- a/apps/sim/lib/api/contracts/tools/aws/ses-send-email.ts +++ b/apps/sim/lib/api/contracts/tools/aws/ses-send-email.ts @@ -7,6 +7,11 @@ import type { import { defineRouteContract } from '@/lib/api/contracts/types' import { validateAwsRegion } from '@/lib/core/security/input-validation' +/** SES `MessageTag` name or value: 1-256 letters, digits, underscores, or hyphens. */ +const sesMessageTagPartSchema = z + .string() + .regex(/^[A-Za-z0-9_-]{1,256}$/, 'Tag names and values may contain only letters, digits, _ and -') + const SendEmailSchema = z .object({ region: z @@ -26,6 +31,10 @@ const SendEmailSchema = z bccAddresses: z.string().nullish(), replyToAddresses: z.string().nullish(), configurationSetName: z.string().nullish(), + fromName: z.string().nullish(), + emailTags: z + .array(z.object({ name: sesMessageTagPartSchema, value: sesMessageTagPartSchema })) + .nullish(), }) .refine((data) => data.bodyText || data.bodyHtml, { message: 'At least one of bodyText or bodyHtml is required', diff --git a/apps/sim/lib/api/contracts/tools/aws/ses-send-templated-email.ts b/apps/sim/lib/api/contracts/tools/aws/ses-send-templated-email.ts index 589316675d2..c9b42f070a3 100644 --- a/apps/sim/lib/api/contracts/tools/aws/ses-send-templated-email.ts +++ b/apps/sim/lib/api/contracts/tools/aws/ses-send-templated-email.ts @@ -7,6 +7,11 @@ import type { import { defineRouteContract } from '@/lib/api/contracts/types' import { validateAwsRegion } from '@/lib/core/security/input-validation' +/** SES `MessageTag` name or value: 1-256 letters, digits, underscores, or hyphens. */ +const sesMessageTagPartSchema = z + .string() + .regex(/^[A-Za-z0-9_-]{1,256}$/, 'Tag names and values may contain only letters, digits, _ and -') + const SendTemplatedEmailSchema = z.object({ region: z .string() @@ -23,6 +28,11 @@ const SendTemplatedEmailSchema = z.object({ ccAddresses: z.string().nullish(), bccAddresses: z.string().nullish(), configurationSetName: z.string().nullish(), + replyToAddresses: z.string().nullish(), + fromName: z.string().nullish(), + emailTags: z + .array(z.object({ name: sesMessageTagPartSchema, value: sesMessageTagPartSchema })) + .nullish(), }) const SendTemplatedEmailResponseSchema = z.object({ diff --git a/apps/sim/lib/internal/athena/operations.test.ts b/apps/sim/lib/internal/athena/operations.test.ts index 730080ed28c..0ad266c36ad 100644 --- a/apps/sim/lib/internal/athena/operations.test.ts +++ b/apps/sim/lib/internal/athena/operations.test.ts @@ -51,8 +51,8 @@ describe('Athena operations', () => { success: true, output: { columns: [ - { name: 'name', type: 'varchar' }, - { name: 'count', type: 'bigint' }, + expect.objectContaining({ name: 'name', type: 'varchar' }), + expect.objectContaining({ name: 'count', type: 'bigint' }), ], rows: [{ name: 'sim', count: '3' }], nextToken: 'next-page', @@ -90,4 +90,19 @@ describe('Athena operations', () => { }) expect(mocks.destroy).toHaveBeenCalledOnce() }) + + it('keeps the first row of a DDL result, which has no header row', async () => { + mocks.send.mockResolvedValue({ + ResultSet: { + ResultSetMetadata: { ColumnInfo: [{ Name: 'tab_name', Type: 'string' }] }, + Rows: [{ Data: [{ VarCharValue: 'orders' }] }, { Data: [{ VarCharValue: 'users' }] }], + }, + }) + + await expect( + executeAthenaGetQueryResults({ ...CONNECTION, queryExecutionId: 'show-tables-id' }) + ).resolves.toMatchObject({ + output: { rows: [{ tab_name: 'orders' }, { tab_name: 'users' }] }, + }) + }) }) diff --git a/apps/sim/lib/internal/athena/operations.ts b/apps/sim/lib/internal/athena/operations.ts index 91fe4046f81..11660e2ed79 100644 --- a/apps/sim/lib/internal/athena/operations.ts +++ b/apps/sim/lib/internal/athena/operations.ts @@ -3,6 +3,7 @@ import { BatchGetNamedQueryCommand, BatchGetPreparedStatementCommand, BatchGetQueryExecutionCommand, + type ColumnInfo, CreateNamedQueryCommand, CreatePreparedStatementCommand, type Database, @@ -27,6 +28,8 @@ import { ListWorkGroupsCommand, type NamedQuery, type PreparedStatement, + type QueryExecution, + type Row, StartQueryExecutionCommand, StopQueryExecutionCommand, type TableMetadata, @@ -131,6 +134,48 @@ function mapEngineVersion(engineVersion: EngineVersion | undefined) { } } +/** Query execution fields beyond the core status and statistics every caller reads. */ +function mapQueryExecutionDetails(execution: QueryExecution) { + const athenaError = execution.Status?.AthenaError + return { + servicePreProcessingTimeInMillis: + execution.Statistics?.ServicePreProcessingTimeInMillis ?? null, + serviceProcessingTimeInMillis: execution.Statistics?.ServiceProcessingTimeInMillis ?? null, + dataManifestLocation: execution.Statistics?.DataManifestLocation ?? null, + reusedPreviousResult: + execution.Statistics?.ResultReuseInformation?.ReusedPreviousResult ?? null, + athenaError: athenaError + ? { + errorCategory: athenaError.ErrorCategory ?? null, + errorType: athenaError.ErrorType ?? null, + retryable: athenaError.Retryable ?? null, + errorMessage: athenaError.ErrorMessage ?? null, + } + : null, + executionParameters: execution.ExecutionParameters ?? null, + substatementType: execution.SubstatementType ?? null, + engineVersion: mapEngineVersion(execution.EngineVersion), + } +} + +/** + * Whether the first row of a first results page is the column-header row. SELECT results + * start with one; DDL and utility statements such as SHOW TABLES do not, so their first row + * is data. Without column metadata to compare against, the row is treated as a header, as + * it always was before. + */ +function isHeaderRow(row: Row | undefined, columnInfo: ColumnInfo[]): boolean { + if (!row) return false + if (columnInfo.length === 0) return true + const values = row.Data ?? [] + if (values.length !== columnInfo.length) return false + return values.every((value, index) => { + const column = columnInfo[index] + const cell = value.VarCharValue + return cell !== undefined && (cell === column.Label || cell === column.Name) + }) +} + export async function executeAthenaBatchGetQueryExecution( input: AwsAthenaBatchGetQueryExecutionBody, signal?: AbortSignal @@ -160,6 +205,7 @@ export async function executeAthenaBatchGetQueryExecution( queryQueueTimeInMillis: execution.Statistics?.QueryQueueTimeInMillis ?? null, totalExecutionTimeInMillis: execution.Statistics?.TotalExecutionTimeInMillis ?? null, outputLocation: execution.ResultConfiguration?.OutputLocation ?? null, + ...mapQueryExecutionDetails(execution), })), unprocessedQueryExecutionIds: (response.UnprocessedQueryExecutionIds ?? []).map((item) => ({ queryExecutionId: item.QueryExecutionId ?? null, @@ -250,6 +296,7 @@ export async function executeAthenaGetQueryExecution( queryQueueTimeInMillis: execution.Statistics?.QueryQueueTimeInMillis ?? null, totalExecutionTimeInMillis: execution.Statistics?.TotalExecutionTimeInMillis ?? null, outputLocation: execution.ResultConfiguration?.OutputLocation ?? null, + ...mapQueryExecutionDetails(execution), }, } }) @@ -271,12 +318,19 @@ export async function executeAthenaGetQueryResults( }), { abortSignal: signal } ) - const columns = (response.ResultSet?.ResultSetMetadata?.ColumnInfo ?? []).map((column) => ({ + const columnInfo = response.ResultSet?.ResultSetMetadata?.ColumnInfo ?? [] + const columns = columnInfo.map((column) => ({ name: column.Name ?? '', type: column.Type ?? 'varchar', + label: column.Label ?? null, + precision: column.Precision ?? null, + scale: column.Scale ?? null, + nullable: column.Nullable ?? null, + caseSensitive: column.CaseSensitive ?? null, })) const rawRows = response.ResultSet?.Rows ?? [] - const dataRows = input.nextToken ? rawRows : rawRows.slice(1) + const hasHeaderRow = !input.nextToken && isHeaderRow(rawRows[0], columnInfo) + const dataRows = hasHeaderRow ? rawRows.slice(1) : rawRows const rows = dataRows.map((row) => { const record: Record = {} const rowData = row.Data ?? [] @@ -409,9 +463,27 @@ export async function executeAthenaStartQuery( }, } : {}), - ...(input.outputLocation - ? { ResultConfiguration: { OutputLocation: input.outputLocation } } + ...(input.outputLocation || input.encryptionOption || input.expectedBucketOwner + ? { + ResultConfiguration: { + ...(input.outputLocation ? { OutputLocation: input.outputLocation } : {}), + ...(input.encryptionOption + ? { + EncryptionConfiguration: { + EncryptionOption: input.encryptionOption, + ...(input.kmsKey && input.encryptionOption !== 'SSE_S3' + ? { KmsKey: input.kmsKey } + : {}), + }, + } + : {}), + ...(input.expectedBucketOwner + ? { ExpectedBucketOwner: input.expectedBucketOwner } + : {}), + }, + } : {}), + ...(input.clientRequestToken ? { ClientRequestToken: input.clientRequestToken } : {}), ...(input.workGroup ? { WorkGroup: input.workGroup } : {}), ...(input.executionParameters ? { ExecutionParameters: input.executionParameters } : {}), ...(input.resultReuseEnabled !== undefined diff --git a/apps/sim/lib/internal/cloudformation/operations.ts b/apps/sim/lib/internal/cloudformation/operations.ts index f208c873621..2afe5cd7c4c 100644 --- a/apps/sim/lib/internal/cloudformation/operations.ts +++ b/apps/sim/lib/internal/cloudformation/operations.ts @@ -76,6 +76,8 @@ export async function executeCloudformationCreateChangeSet( Capabilities: parseCapabilities(input.capabilities), ChangeSetType: input.changeSetType, Description: input.description, + Tags: toStackTags(input.tags), + RoleARN: input.roleArn, }), { abortSignal: signal } ) @@ -106,6 +108,8 @@ export async function executeCloudformationCreateStack( Tags: toStackTags(input.tags), OnFailure: input.onFailure, TimeoutInMinutes: input.timeoutInMinutes, + RoleARN: input.roleArn, + EnableTerminationProtection: input.enableTerminationProtection, }), { abortSignal: signal } ) @@ -153,6 +157,7 @@ export async function executeCloudformationDescribeChangeSet( new DescribeChangeSetCommand({ ChangeSetName: input.changeSetName, ...(input.stackName ? { StackName: input.stackName } : {}), + ...(input.nextToken ? { NextToken: input.nextToken } : {}), }), { abortSignal: signal } ) @@ -162,6 +167,18 @@ export async function executeCloudformationDescribeChangeSet( physicalResourceId: change.ResourceChange?.PhysicalResourceId, resourceType: change.ResourceChange?.ResourceType, replacement: change.ResourceChange?.Replacement, + type: change.Type, + policyAction: change.ResourceChange?.PolicyAction, + scope: change.ResourceChange?.Scope ?? [], + changeSetId: change.ResourceChange?.ChangeSetId, + details: (change.ResourceChange?.Details ?? []).map((detail) => ({ + attribute: detail.Target?.Attribute, + name: detail.Target?.Name, + requiresRecreation: detail.Target?.RequiresRecreation, + evaluation: detail.Evaluation, + changeSource: detail.ChangeSource, + causingEntity: detail.CausingEntity, + })), })) return { success: true, @@ -177,6 +194,20 @@ export async function executeCloudformationDescribeChangeSet( creationTime: response.CreationTime?.getTime(), capabilities: response.Capabilities ?? [], changes, + parameters: (response.Parameters ?? []).map((parameter) => ({ + parameterKey: parameter.ParameterKey ?? '', + parameterValue: parameter.ParameterValue, + usePreviousValue: parameter.UsePreviousValue, + resolvedValue: parameter.ResolvedValue, + })), + tags: (response.Tags ?? []).map((tag) => ({ key: tag.Key ?? '', value: tag.Value ?? '' })), + notificationArns: response.NotificationARNs ?? [], + includeNestedStacks: response.IncludeNestedStacks, + parentChangeSetId: response.ParentChangeSetId, + rootChangeSetId: response.RootChangeSetId, + onStackFailure: response.OnStackFailure, + importExistingResources: response.ImportExistingResources, + nextToken: response.NextToken ?? null, }, } } finally { @@ -244,6 +275,15 @@ export async function executeCloudformationDescribeStackEvents( resourceStatus: event.ResourceStatus, resourceStatusReason: event.ResourceStatusReason, timestamp: event.Timestamp?.getTime(), + operationId: event.OperationId, + resourceProperties: event.ResourceProperties, + clientRequestToken: event.ClientRequestToken, + detailedStatus: event.DetailedStatus, + hookType: event.HookType, + hookStatus: event.HookStatus, + hookStatusReason: event.HookStatusReason, + hookInvocationPoint: event.HookInvocationPoint, + hookFailureMode: event.HookFailureMode, })) return { success: true, output: { events } } } finally { @@ -290,8 +330,27 @@ export async function executeCloudformationDescribeStacks( outputKey: output.OutputKey ?? '', outputValue: output.OutputValue ?? '', description: output.Description, + exportName: output.ExportName, })), tags: (stack.Tags ?? []).map((tag) => ({ key: tag.Key ?? '', value: tag.Value ?? '' })), + parameters: (stack.Parameters ?? []).map((parameter) => ({ + parameterKey: parameter.ParameterKey ?? '', + parameterValue: parameter.ParameterValue, + usePreviousValue: parameter.UsePreviousValue, + resolvedValue: parameter.ResolvedValue, + })), + capabilities: stack.Capabilities ?? [], + changeSetId: stack.ChangeSetId, + deletionTime: stack.DeletionTime?.getTime(), + disableRollback: stack.DisableRollback, + notificationArns: stack.NotificationARNs ?? [], + timeoutInMinutes: stack.TimeoutInMinutes, + roleArn: stack.RoleARN, + parentId: stack.ParentId, + rootId: stack.RootId, + detailedStatus: stack.DetailedStatus, + deletionMode: stack.DeletionMode, + retainExceptOnCreate: stack.RetainExceptOnCreate, })) return { success: true, output: { stacks } } } finally { @@ -366,6 +425,7 @@ export async function executeCloudformationGetTemplateSummary( parameterType: parameter.ParameterType, noEcho: parameter.NoEcho, description: parameter.Description, + allowedValues: parameter.ParameterConstraints?.AllowedValues ?? [], })), capabilities: response.Capabilities ?? [], capabilitiesReason: response.CapabilitiesReason, @@ -458,6 +518,7 @@ export async function executeCloudformationUpdateStack( Parameters: toStackParameters(input.parameters), Capabilities: parseCapabilities(input.capabilities), Tags: toStackTags(input.tags), + RoleARN: input.roleArn, }), { abortSignal: signal } ) diff --git a/apps/sim/lib/internal/cloudwatch/client.ts b/apps/sim/lib/internal/cloudwatch/client.ts index ab5e8584cdb..fc47b9d1488 100644 --- a/apps/sim/lib/internal/cloudwatch/client.ts +++ b/apps/sim/lib/internal/cloudwatch/client.ts @@ -220,6 +220,7 @@ interface FilteredLogEventResult { timestamp: number | undefined message: string | undefined ingestionTime: number | undefined + eventId: string | undefined } /** @@ -229,6 +230,8 @@ interface FilteredLogEventResult { * * When `limit` is provided it is treated as a total result cap: draining stops * once enough events have been collected. When omitted, every page is drained. + * Each page requests at most the remaining cap, so the returned `nextToken` + * resumes exactly after the last returned event. */ export async function filterLogEvents( client: CloudWatchLogsClient, @@ -240,12 +243,13 @@ export async function filterLogEvents( endTime?: number startFromHead?: boolean limit?: number + nextToken?: string }, signal?: AbortSignal -): Promise<{ events: FilteredLogEventResult[] }> { +): Promise<{ events: FilteredLogEventResult[]; nextToken: string | undefined }> { const totalLimit = options?.limit const events: FilteredLogEventResult[] = [] - let nextToken: string | undefined + let nextToken: string | undefined = options?.nextToken for (let page = 0; page < MAX_FILTER_LOG_EVENTS_PAGES; page++) { const pageLimit = @@ -272,6 +276,7 @@ export async function filterLogEvents( timestamp: e.timestamp, message: e.message, ingestionTime: e.ingestionTime, + eventId: e.eventId, }) } @@ -289,6 +294,7 @@ export async function filterLogEvents( return { events: totalLimit !== undefined ? events.slice(0, totalLimit) : events, + nextToken, } } @@ -296,7 +302,7 @@ export async function getLogEvents( client: CloudWatchLogsClient, logGroupName: string, logStreamName: string, - options?: { startTime?: number; endTime?: number; limit?: number }, + options?: { startTime?: number; endTime?: number; limit?: number; nextToken?: string }, signal?: AbortSignal ): Promise<{ events: { @@ -304,6 +310,8 @@ export async function getLogEvents( message: string | undefined ingestionTime: number | undefined }[] + nextForwardToken: string | undefined + nextBackwardToken: string | undefined }> { const command = new GetLogEventsCommand({ logGroupName, @@ -311,6 +319,7 @@ export async function getLogEvents( ...(options?.startTime !== undefined && { startTime: options.startTime * 1000 }), ...(options?.endTime !== undefined && { endTime: options.endTime * 1000 }), ...(options?.limit !== undefined && { limit: options.limit }), + ...(options?.nextToken && { nextToken: options.nextToken }), startFromHead: true, }) @@ -321,5 +330,7 @@ export async function getLogEvents( message: e.message, ingestionTime: e.ingestionTime, })), + nextForwardToken: response.nextForwardToken, + nextBackwardToken: response.nextBackwardToken, } } diff --git a/apps/sim/lib/internal/cloudwatch/operations.ts b/apps/sim/lib/internal/cloudwatch/operations.ts index ac578069def..4d498ec2654 100644 --- a/apps/sim/lib/internal/cloudwatch/operations.ts +++ b/apps/sim/lib/internal/cloudwatch/operations.ts @@ -63,6 +63,8 @@ export async function executeCloudwatchDescribeAlarmHistory( timestamp: number | undefined historyItemType: string | undefined historySummary: string | undefined + historyData: string | undefined + alarmContributorId: string | undefined }[] = [] let nextToken: string | undefined @@ -92,6 +94,8 @@ export async function executeCloudwatchDescribeAlarmHistory( timestamp: item.Timestamp?.getTime(), historyItemType: item.HistoryItemType, historySummary: item.HistorySummary, + historyData: item.HistoryData, + alarmContributorId: item.AlarmContributorId, }) } nextToken = response.NextToken @@ -128,6 +132,7 @@ export async function executeCloudwatchDescribeAlarms( ? [input.alarmType as AlarmType] : (['MetricAlarm', 'CompositeAlarm'] as AlarmType[]), ...(input.limit !== undefined && { MaxRecords: input.limit }), + ...(input.nextToken && { NextToken: input.nextToken }), }), { abortSignal: signal } ) @@ -142,6 +147,48 @@ export async function executeCloudwatchDescribeAlarms( threshold: alarm.Threshold, evaluationPeriods: alarm.EvaluationPeriods, stateUpdatedTimestamp: alarm.StateUpdatedTimestamp?.getTime(), + alarmType: 'MetricAlarm', + alarmDescription: alarm.AlarmDescription, + actionsEnabled: alarm.ActionsEnabled, + alarmActions: alarm.AlarmActions ?? [], + okActions: alarm.OKActions ?? [], + insufficientDataActions: alarm.InsufficientDataActions ?? [], + stateReasonData: alarm.StateReasonData, + stateTransitionedTimestamp: alarm.StateTransitionedTimestamp?.getTime(), + alarmConfigurationUpdatedTimestamp: alarm.AlarmConfigurationUpdatedTimestamp?.getTime(), + statistic: alarm.Statistic, + extendedStatistic: alarm.ExtendedStatistic, + dimensions: (alarm.Dimensions ?? []).map((dimension) => ({ + name: dimension.Name ?? '', + value: dimension.Value ?? '', + })), + period: alarm.Period, + unit: alarm.Unit, + datapointsToAlarm: alarm.DatapointsToAlarm, + treatMissingData: alarm.TreatMissingData, + thresholdMetricId: alarm.ThresholdMetricId, + metrics: alarm.Metrics?.map((query) => ({ + id: query.Id ?? '', + expression: query.Expression, + label: query.Label, + returnData: query.ReturnData, + period: query.Period, + accountId: query.AccountId, + metricStat: query.MetricStat + ? { + namespace: query.MetricStat.Metric?.Namespace, + metricName: query.MetricStat.Metric?.MetricName, + dimensions: (query.MetricStat.Metric?.Dimensions ?? []).map((dimension) => ({ + name: dimension.Name ?? '', + value: dimension.Value ?? '', + })), + period: query.MetricStat.Period, + stat: query.MetricStat.Stat, + unit: query.MetricStat.Unit, + } + : undefined, + })), + alarmRule: undefined, })) const compositeAlarms = (response.CompositeAlarms ?? []).map((alarm) => ({ alarmName: alarm.AlarmName ?? '', @@ -154,8 +201,24 @@ export async function executeCloudwatchDescribeAlarms( threshold: undefined, evaluationPeriods: undefined, stateUpdatedTimestamp: alarm.StateUpdatedTimestamp?.getTime(), + alarmType: 'CompositeAlarm', + alarmDescription: alarm.AlarmDescription, + actionsEnabled: alarm.ActionsEnabled, + alarmActions: alarm.AlarmActions ?? [], + okActions: alarm.OKActions ?? [], + insufficientDataActions: alarm.InsufficientDataActions ?? [], + stateReasonData: alarm.StateReasonData, + stateTransitionedTimestamp: alarm.StateTransitionedTimestamp?.getTime(), + alarmConfigurationUpdatedTimestamp: alarm.AlarmConfigurationUpdatedTimestamp?.getTime(), + alarmRule: alarm.AlarmRule, })) - return { success: true, output: { alarms: [...metricAlarms, ...compositeAlarms] } } + return { + success: true, + output: { + alarms: [...metricAlarms, ...compositeAlarms], + nextToken: response.NextToken ?? null, + }, + } } finally { client.destroy() } @@ -204,10 +267,14 @@ export async function executeCloudwatchFilterLogEvents( endTime: input.endTime !== undefined ? input.endTime * 1000 : undefined, startFromHead: input.startFromHead, limit: input.limit, + nextToken: input.nextToken, }, signal ) - return { success: true, output: { events: result.events } } + return { + success: true, + output: { events: result.events, nextToken: result.nextToken ?? null }, + } } finally { client.destroy() } @@ -223,10 +290,22 @@ export async function executeCloudwatchGetLogEvents( client, input.logGroupName, input.logStreamName, - { startTime: input.startTime, endTime: input.endTime, limit: input.limit }, + { + startTime: input.startTime, + endTime: input.endTime, + limit: input.limit, + nextToken: input.nextToken, + }, signal ) - return { success: true, output: { events: result.events } } + return { + success: true, + output: { + events: result.events, + nextForwardToken: result.nextForwardToken ?? null, + nextBackwardToken: result.nextBackwardToken ?? null, + }, + } } finally { client.destroy() } @@ -265,7 +344,10 @@ export async function executeCloudwatchGetMetricStatistics( StartTime: new Date(input.startTime * 1000), EndTime: new Date(input.endTime * 1000), Period: input.period, - Statistics: input.statistics, + ...(input.extendedStatistics && input.extendedStatistics.length > 0 + ? { ExtendedStatistics: input.extendedStatistics } + : { Statistics: input.statistics }), + ...(input.unit && { Unit: input.unit as StandardUnit }), ...(dimensions && { Dimensions: dimensions }), }), { abortSignal: signal } @@ -280,6 +362,7 @@ export async function executeCloudwatchGetMetricStatistics( maximum: datapoint.Maximum, sampleCount: datapoint.SampleCount, unit: datapoint.Unit, + extendedStatistics: datapoint.ExtendedStatistics, })) return { success: true, @@ -488,6 +571,7 @@ export async function executeCloudwatchQueryLogs( results: result.results, statistics: result.statistics, status: result.status, + queryId: response.queryId, }, } } finally { diff --git a/apps/sim/lib/internal/dynamodb/client.test.ts b/apps/sim/lib/internal/dynamodb/client.test.ts new file mode 100644 index 00000000000..9eaa7ab8ecf --- /dev/null +++ b/apps/sim/lib/internal/dynamodb/client.test.ts @@ -0,0 +1,54 @@ +import { describe, expect, it } from 'vitest' +import { createDynamoDBClient, queryItems } from '@/lib/internal/dynamodb/client' + +function clientReturning(output: Record) { + const client = createDynamoDBClient({ + region: 'us-east-1', + accessKeyId: 'AKIAEXAMPLE', + secretAccessKey: 'secret', + }) + client.middlewareStack.addRelativeTo( + () => async () => ({ output: { $metadata: {}, ...output }, response: {} }), + { relation: 'after', toMiddleware: 'DocumentUnmarshall' } + ) + return client +} + +describe('DynamoDB item unmarshalling', () => { + it('returns JSON-serializable items for sets, binary and integers beyond 2^53', async () => { + const client = clientReturning({ + Count: 1, + ScannedCount: 3, + Items: [ + { + pk: { S: 'USER#1' }, + tags: { SS: ['a', 'b'] }, + scores: { NS: ['1', '2'] }, + avatar: { B: new Uint8Array([104, 105]) }, + snowflake: { N: '1234567890123456789' }, + age: { N: '42' }, + }, + ], + }) + + const result = await queryItems(client, 'Users', 'pk = :pk', { + expressionAttributeValues: { ':pk': 'USER#1' }, + }) + + expect(await Response.json(result).json()).toEqual({ + items: [ + { + pk: 'USER#1', + tags: ['a', 'b'], + scores: [1, 2], + avatar: 'aGk=', + snowflake: '1234567890123456789', + age: 42, + }, + ], + count: 1, + scannedCount: 3, + }) + client.destroy() + }) +}) diff --git a/apps/sim/lib/internal/dynamodb/client.ts b/apps/sim/lib/internal/dynamodb/client.ts index 71bcb38bfcc..15fafde9ec2 100644 --- a/apps/sim/lib/internal/dynamodb/client.ts +++ b/apps/sim/lib/internal/dynamodb/client.ts @@ -11,6 +11,41 @@ import { import { awsClientConfig } from '@/lib/internal/aws/credentials' import type { DynamoDBConnectionConfig, DynamoDBTableSchema } from '@/tools/dynamodb/types' +type DynamoDBReturnValues = 'NONE' | 'ALL_OLD' | 'UPDATED_OLD' | 'ALL_NEW' | 'UPDATED_NEW' + +/** + * Keeps integers beyond `Number.MAX_SAFE_INTEGER` (and other values a JS number cannot hold) + * as their exact DynamoDB string, since the SDK default turns them into a `BigInt` that the + * JSON response cannot serialize. + */ +function unwrapNumber(value: string): number | string { + const parsed = Number(value) + if (!Number.isFinite(parsed)) return value + if (Number.isInteger(parsed) && !Number.isSafeInteger(parsed)) return value + return parsed +} + +/** + * Converts unmarshalled DynamoDB values into JSON-serializable shapes: string, number and + * binary sets become arrays, and binary values become base64 strings. Without this a set + * serializes as `{}` and a binary value as an object of byte indexes. + */ +function toJsonSafe(value: unknown): unknown { + if (value instanceof Set) return Array.from(value, toJsonSafe) + if (value instanceof Uint8Array) return Buffer.from(value).toString('base64') + if (Array.isArray(value)) return value.map(toJsonSafe) + if (value !== null && typeof value === 'object') { + return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, toJsonSafe(entry)])) + } + return value +} + +function toJsonSafeRecord( + value: Record | undefined +): Record | undefined { + return value ? (toJsonSafe(value) as Record) : undefined +} + export function createDynamoDBClient(config: DynamoDBConnectionConfig): DynamoDBDocumentClient { const client = new DynamoDBClient({ ...awsClientConfig(config.region, config.accessKeyId, config.secretAccessKey), @@ -22,7 +57,7 @@ export function createDynamoDBClient(config: DynamoDBConnectionConfig): DynamoDB convertEmptyValues: false, }, unmarshallOptions: { - wrapNumbers: false, + wrapNumbers: unwrapNumber, }, }) } @@ -32,17 +67,25 @@ export async function getItem( tableName: string, key: Record, consistentRead?: boolean, - signal?: AbortSignal + signal?: AbortSignal, + options?: { + projectionExpression?: string + expressionAttributeNames?: Record + } ): Promise<{ item: Record | null }> { const command = new GetCommand({ TableName: tableName, Key: key, ConsistentRead: consistentRead, + ...(options?.projectionExpression && { ProjectionExpression: options.projectionExpression }), + ...(options?.expressionAttributeNames && { + ExpressionAttributeNames: options.expressionAttributeNames, + }), }) const response = await client.send(command, { abortSignal: signal }) return { - item: (response.Item as Record) || null, + item: toJsonSafeRecord(response.Item) ?? null, } } @@ -54,9 +97,10 @@ export async function putItem( conditionExpression?: string expressionAttributeNames?: Record expressionAttributeValues?: Record + returnValues?: 'NONE' | 'ALL_OLD' }, signal?: AbortSignal -): Promise<{ success: boolean }> { +): Promise<{ success: boolean; attributes: Record | null }> { const command = new PutCommand({ TableName: tableName, Item: item, @@ -67,10 +111,11 @@ export async function putItem( ...(options?.expressionAttributeValues && { ExpressionAttributeValues: options.expressionAttributeValues, }), + ...(options?.returnValues && { ReturnValues: options.returnValues }), }) - await client.send(command, { abortSignal: signal }) - return { success: true } + const response = await client.send(command, { abortSignal: signal }) + return { success: true, attributes: toJsonSafeRecord(response.Attributes) ?? null } } export async function queryItems( @@ -85,11 +130,14 @@ export async function queryItems( limit?: number exclusiveStartKey?: Record scanIndexForward?: boolean + projectionExpression?: string + consistentRead?: boolean }, signal?: AbortSignal ): Promise<{ items: Record[] count: number + scannedCount: number | null lastEvaluatedKey?: Record }> { const command = new QueryCommand({ @@ -106,13 +154,16 @@ export async function queryItems( ...(options?.limit && { Limit: options.limit }), ...(options?.exclusiveStartKey && { ExclusiveStartKey: options.exclusiveStartKey }), ...(options?.scanIndexForward !== undefined && { ScanIndexForward: options.scanIndexForward }), + ...(options?.projectionExpression && { ProjectionExpression: options.projectionExpression }), + ...(options?.consistentRead !== undefined && { ConsistentRead: options.consistentRead }), }) const response = await client.send(command, { abortSignal: signal }) return { - items: (response.Items as Record[]) || [], + items: (response.Items ?? []).map((item) => toJsonSafeRecord(item) ?? {}), count: response.Count || 0, - lastEvaluatedKey: response.LastEvaluatedKey as Record | undefined, + scannedCount: response.ScannedCount ?? null, + lastEvaluatedKey: toJsonSafeRecord(response.LastEvaluatedKey), } } @@ -126,11 +177,16 @@ export async function scanItems( expressionAttributeValues?: Record limit?: number exclusiveStartKey?: Record + indexName?: string + consistentRead?: boolean + segment?: number + totalSegments?: number }, signal?: AbortSignal ): Promise<{ items: Record[] count: number + scannedCount: number | null lastEvaluatedKey?: Record }> { const command = new ScanCommand({ @@ -145,13 +201,18 @@ export async function scanItems( }), ...(options?.limit && { Limit: options.limit }), ...(options?.exclusiveStartKey && { ExclusiveStartKey: options.exclusiveStartKey }), + ...(options?.indexName && { IndexName: options.indexName }), + ...(options?.consistentRead !== undefined && { ConsistentRead: options.consistentRead }), + ...(options?.segment !== undefined && { Segment: options.segment }), + ...(options?.totalSegments !== undefined && { TotalSegments: options.totalSegments }), }) const response = await client.send(command, { abortSignal: signal }) return { - items: (response.Items as Record[]) || [], + items: (response.Items ?? []).map((item) => toJsonSafeRecord(item) ?? {}), count: response.Count || 0, - lastEvaluatedKey: response.LastEvaluatedKey as Record | undefined, + scannedCount: response.ScannedCount ?? null, + lastEvaluatedKey: toJsonSafeRecord(response.LastEvaluatedKey), } } @@ -164,6 +225,7 @@ export async function updateItem( expressionAttributeNames?: Record expressionAttributeValues?: Record conditionExpression?: string + returnValues?: DynamoDBReturnValues }, signal?: AbortSignal ): Promise<{ attributes: Record | null }> { @@ -178,12 +240,12 @@ export async function updateItem( ExpressionAttributeValues: options.expressionAttributeValues, }), ...(options?.conditionExpression && { ConditionExpression: options.conditionExpression }), - ReturnValues: 'ALL_NEW', + ReturnValues: options?.returnValues ?? 'ALL_NEW', }) const response = await client.send(command, { abortSignal: signal }) return { - attributes: (response.Attributes as Record) || null, + attributes: toJsonSafeRecord(response.Attributes) ?? null, } } @@ -195,9 +257,10 @@ export async function deleteItem( conditionExpression?: string expressionAttributeNames?: Record expressionAttributeValues?: Record + returnValues?: 'NONE' | 'ALL_OLD' }, signal?: AbortSignal -): Promise<{ success: boolean }> { +): Promise<{ success: boolean; attributes: Record | null }> { const command = new DeleteCommand({ TableName: tableName, Key: key, @@ -208,10 +271,11 @@ export async function deleteItem( ...(options?.expressionAttributeValues && { ExpressionAttributeValues: options.expressionAttributeValues, }), + ...(options?.returnValues && { ReturnValues: options.returnValues }), }) - await client.send(command, { abortSignal: signal }) - return { success: true } + const response = await client.send(command, { abortSignal: signal }) + return { success: true, attributes: toJsonSafeRecord(response.Attributes) ?? null } } /** @@ -305,6 +369,12 @@ export async function describeTable( itemCount: Number(table.ItemCount) || 0, tableSizeBytes: Number(table.TableSizeBytes) || 0, billingMode: table.BillingModeSummary?.BillingMode || 'PROVISIONED', + tableArn: table.TableArn ?? null, + creationDateTime: table.CreationDateTime?.toISOString() ?? null, + deletionProtectionEnabled: table.DeletionProtectionEnabled ?? null, + streamEnabled: table.StreamSpecification?.StreamEnabled ?? null, + streamViewType: table.StreamSpecification?.StreamViewType ?? null, + latestStreamArn: table.LatestStreamArn ?? null, } return { tableDetails } diff --git a/apps/sim/lib/internal/dynamodb/operations.ts b/apps/sim/lib/internal/dynamodb/operations.ts index 58fcd8e95fb..fcd51419d79 100644 --- a/apps/sim/lib/internal/dynamodb/operations.ts +++ b/apps/sim/lib/internal/dynamodb/operations.ts @@ -22,7 +22,10 @@ export async function executeDynamodbGet(input: AwsDynamodbGetBody, signal?: Abo signal?.throwIfAborted() const client = createDynamoDBClient(input) try { - const result = await getItem(client, input.tableName, input.key, input.consistentRead, signal) + const result = await getItem(client, input.tableName, input.key, input.consistentRead, signal, { + projectionExpression: input.projectionExpression, + expressionAttributeNames: input.expressionAttributeNames, + }) signal?.throwIfAborted() return { message: result.item ? 'Item retrieved successfully' : 'Item not found', @@ -37,7 +40,7 @@ export async function executeDynamodbPut(input: AwsDynamodbPutBody, signal?: Abo signal?.throwIfAborted() const client = createDynamoDBClient(input) try { - await putItem( + const result = await putItem( client, input.tableName, input.item, @@ -45,11 +48,16 @@ export async function executeDynamodbPut(input: AwsDynamodbPutBody, signal?: Abo conditionExpression: input.conditionExpression, expressionAttributeNames: input.expressionAttributeNames, expressionAttributeValues: input.expressionAttributeValues, + returnValues: input.returnValues, }, signal ) signal?.throwIfAborted() - return { message: 'Item created successfully', item: input.item } + return { + message: 'Item created successfully', + item: input.item, + ...(input.returnValues === 'ALL_OLD' && { attributes: result.attributes }), + } } finally { client.destroy() } @@ -71,6 +79,8 @@ export async function executeDynamodbQuery(input: AwsDynamodbQueryBody, signal?: limit: input.limit, exclusiveStartKey: input.exclusiveStartKey, scanIndexForward: input.scanIndexForward, + projectionExpression: input.projectionExpression, + consistentRead: input.consistentRead, }, signal ) @@ -79,6 +89,7 @@ export async function executeDynamodbQuery(input: AwsDynamodbQueryBody, signal?: message: `Query returned ${result.count} items`, items: result.items, count: result.count, + scannedCount: result.scannedCount, ...(result.lastEvaluatedKey && { lastEvaluatedKey: result.lastEvaluatedKey }), } } finally { @@ -100,6 +111,10 @@ export async function executeDynamodbScan(input: AwsDynamodbScanBody, signal?: A expressionAttributeValues: input.expressionAttributeValues, limit: input.limit, exclusiveStartKey: input.exclusiveStartKey, + indexName: input.indexName, + consistentRead: input.consistentRead, + segment: input.segment, + totalSegments: input.totalSegments, }, signal ) @@ -108,6 +123,7 @@ export async function executeDynamodbScan(input: AwsDynamodbScanBody, signal?: A message: `Scan returned ${result.count} items`, items: result.items, count: result.count, + scannedCount: result.scannedCount, ...(result.lastEvaluatedKey && { lastEvaluatedKey: result.lastEvaluatedKey }), } } finally { @@ -128,6 +144,7 @@ export async function executeDynamodbUpdate(input: AwsDynamodbUpdateBody, signal expressionAttributeNames: input.expressionAttributeNames, expressionAttributeValues: input.expressionAttributeValues, conditionExpression: input.conditionExpression, + returnValues: input.returnValues, }, signal ) @@ -142,7 +159,7 @@ export async function executeDynamodbDelete(input: AwsDynamodbDeleteBody, signal signal?.throwIfAborted() const client = createDynamoDBClient(input) try { - await deleteItem( + const result = await deleteItem( client, input.tableName, input.key, @@ -150,11 +167,15 @@ export async function executeDynamodbDelete(input: AwsDynamodbDeleteBody, signal conditionExpression: input.conditionExpression, expressionAttributeNames: input.expressionAttributeNames, expressionAttributeValues: input.expressionAttributeValues, + returnValues: input.returnValues, }, signal ) signal?.throwIfAborted() - return { message: 'Item deleted successfully' } + return { + message: 'Item deleted successfully', + ...(input.returnValues === 'ALL_OLD' && { attributes: result.attributes }), + } } finally { client.destroy() } diff --git a/apps/sim/lib/internal/ec2/operations.ts b/apps/sim/lib/internal/ec2/operations.ts index 13e72a1141c..1262e6b32ab 100644 --- a/apps/sim/lib/internal/ec2/operations.ts +++ b/apps/sim/lib/internal/ec2/operations.ts @@ -178,7 +178,12 @@ export async function executeEc2DescribeInstances( instanceId: instance.InstanceId ?? '', instanceType: instance.InstanceType ?? null, state: mapStateName(instance.State), + stateCode: instance.State?.Code ?? null, stateReason: instance.StateReason?.Message ?? null, + stateReasonCode: instance.StateReason?.Code ?? null, + stateTransitionReason: instance.StateTransitionReason || null, + reservationId: reservation.ReservationId ?? null, + ownerId: reservation.OwnerId ?? null, launchTime: toIsoString(instance.LaunchTime), availabilityZone: instance.Placement?.AvailabilityZone ?? null, vpcId: instance.VpcId ?? null, @@ -190,9 +195,36 @@ export async function executeEc2DescribeInstances( imageId: instance.ImageId ?? null, keyName: instance.KeyName ?? null, platformDetails: instance.PlatformDetails ?? null, + platform: instance.Platform ?? null, architecture: instance.Architecture ?? null, iamInstanceProfileArn: instance.IamInstanceProfile?.Arn ?? null, + ipv6Address: instance.Ipv6Address ?? null, + tenancy: instance.Placement?.Tenancy ?? null, + instanceLifecycle: instance.InstanceLifecycle ?? null, + spotInstanceRequestId: instance.SpotInstanceRequestId ?? null, + monitoringState: instance.Monitoring?.State ?? null, + ebsOptimized: instance.EbsOptimized ?? null, + rootDeviceName: instance.RootDeviceName ?? null, + rootDeviceType: instance.RootDeviceType ?? null, + metadataHttpTokens: instance.MetadataOptions?.HttpTokens ?? null, securityGroups: mapGroups(instance.SecurityGroups), + blockDeviceMappings: (instance.BlockDeviceMappings ?? []).map((mapping) => ({ + deviceName: mapping.DeviceName ?? null, + volumeId: mapping.Ebs?.VolumeId ?? null, + status: mapping.Ebs?.Status ?? null, + attachTime: toIsoString(mapping.Ebs?.AttachTime), + deleteOnTermination: mapping.Ebs?.DeleteOnTermination ?? null, + })), + networkInterfaces: (instance.NetworkInterfaces ?? []).map((eni) => ({ + networkInterfaceId: eni.NetworkInterfaceId ?? null, + subnetId: eni.SubnetId ?? null, + vpcId: eni.VpcId ?? null, + privateIpAddress: eni.PrivateIpAddress ?? null, + publicIp: eni.Association?.PublicIp ?? null, + macAddress: eni.MacAddress ?? null, + status: eni.Status ?? null, + deviceIndex: eni.Attachment?.DeviceIndex ?? null, + })), tags: tagsToRecord(instance.Tags), })) ) diff --git a/apps/sim/lib/internal/iam/client.ts b/apps/sim/lib/internal/iam/client.ts index 8cc18c193bd..c1969d0af6c 100644 --- a/apps/sim/lib/internal/iam/client.ts +++ b/apps/sim/lib/internal/iam/client.ts @@ -5,10 +5,12 @@ import type { Group, Policy, PolicyScopeType, + PolicyUsageType, ResourceSpecificResult, Role, Statement, StatusType, + Tag, User, } from '@aws-sdk/client-iam' import { @@ -47,6 +49,20 @@ export function createIAMClient(config: IAMConnectionConfig): IAMClient { }) } +/** Parses a JSON object string of tag key/value pairs into IAM `Tag` entries. */ +function parseTags(tags?: string | null): Tag[] | undefined { + if (!tags) return undefined + const parsed = JSON.parse(tags) as Record + const entries = Object.entries(parsed) + return entries.length > 0 + ? entries.map(([Key, Value]) => ({ Key, Value: String(Value) })) + : undefined +} + +function mapTags(tags: Tag[] | undefined) { + return tags?.map((t) => ({ key: t.Key ?? '', value: t.Value ?? '' })) ?? [] +} + export async function listUsers( client: IAMClient, pathPrefix?: string | null, @@ -91,7 +107,7 @@ export async function getUser(client: IAMClient, userName?: string | null, signa createDate: user?.CreateDate?.toISOString() ?? null, passwordLastUsed: user?.PasswordLastUsed?.toISOString() ?? null, permissionsBoundaryArn: user?.PermissionsBoundary?.PermissionsBoundaryArn ?? null, - tags: user?.Tags?.map((t) => ({ key: t.Key ?? '', value: t.Value ?? '' })) ?? [], + tags: mapTags(user?.Tags), } } @@ -99,11 +115,16 @@ export async function createUser( client: IAMClient, userName: string, path?: string | null, + permissionsBoundary?: string | null, + tags?: string | null, signal?: AbortSignal ) { + const userTags = parseTags(tags) const command = new CreateUserCommand({ UserName: userName, ...(path ? { Path: path } : {}), + ...(permissionsBoundary ? { PermissionsBoundary: permissionsBoundary } : {}), + ...(userTags ? { Tags: userTags } : {}), }) const response = await client.send(command, { abortSignal: signal }) @@ -115,6 +136,8 @@ export async function createUser( arn: user?.Arn ?? '', path: user?.Path ?? '', createDate: user?.CreateDate?.toISOString() ?? null, + permissionsBoundaryArn: user?.PermissionsBoundary?.PermissionsBoundaryArn ?? null, + tags: mapTags(user?.Tags), } } @@ -180,6 +203,8 @@ export async function getRole(client: IAMClient, roleName: string, signal?: Abor assumeRolePolicyDocument: policyDocument, roleLastUsedDate: role?.RoleLastUsed?.LastUsedDate?.toISOString() ?? null, roleLastUsedRegion: role?.RoleLastUsed?.Region ?? null, + permissionsBoundaryArn: role?.PermissionsBoundary?.PermissionsBoundaryArn ?? null, + tags: mapTags(role?.Tags), } } @@ -190,14 +215,19 @@ export async function createRole( description?: string | null, path?: string | null, maxSessionDuration?: number | null, + permissionsBoundary?: string | null, + tags?: string | null, signal?: AbortSignal ) { + const roleTags = parseTags(tags) const command = new CreateRoleCommand({ RoleName: roleName, AssumeRolePolicyDocument: assumeRolePolicyDocument, ...(description ? { Description: description } : {}), ...(path ? { Path: path } : {}), ...(maxSessionDuration ? { MaxSessionDuration: maxSessionDuration } : {}), + ...(permissionsBoundary ? { PermissionsBoundary: permissionsBoundary } : {}), + ...(roleTags ? { Tags: roleTags } : {}), }) const response = await client.send(command, { abortSignal: signal }) @@ -209,6 +239,8 @@ export async function createRole( arn: role?.Arn ?? '', path: role?.Path ?? '', createDate: role?.CreateDate?.toISOString() ?? null, + permissionsBoundaryArn: role?.PermissionsBoundary?.PermissionsBoundaryArn ?? null, + tags: mapTags(role?.Tags), } } @@ -276,10 +308,12 @@ export async function listPolicies( pathPrefix?: string | null, maxItems?: number | null, marker?: string | null, + policyUsageFilter?: PolicyUsageType | null, signal?: AbortSignal ) { const command = new ListPoliciesCommand({ ...(scope ? { Scope: scope } : {}), + ...(policyUsageFilter ? { PolicyUsageFilter: policyUsageFilter } : {}), ...(onlyAttached != null ? { OnlyAttached: onlyAttached } : {}), ...(pathPrefix ? { PathPrefix: pathPrefix } : {}), ...(maxItems ? { MaxItems: maxItems } : {}), @@ -558,7 +592,7 @@ export async function getPolicy(client: IAMClient, policyArn: string, signal?: A description: policy?.Description ?? null, defaultVersionId: policy?.DefaultVersionId ?? null, permissionsBoundaryUsageCount: policy?.PermissionsBoundaryUsageCount ?? 0, - tags: policy?.Tags?.map((t) => ({ key: t.Key ?? '', value: t.Value ?? '' })) ?? [], + tags: mapTags(policy?.Tags), } } diff --git a/apps/sim/lib/internal/iam/operations.ts b/apps/sim/lib/internal/iam/operations.ts index ae136afd44f..b12a0ef65a1 100644 --- a/apps/sim/lib/internal/iam/operations.ts +++ b/apps/sim/lib/internal/iam/operations.ts @@ -84,7 +84,14 @@ export async function executeIamCreateUser(input: AwsIamCreateUserBody, signal?: return withIamClient( input, async (client) => { - const result = await createUser(client, input.userName, input.path, signal) + const result = await createUser( + client, + input.userName, + input.path, + input.permissionsBoundary, + input.tags, + signal + ) return { message: `User "${result.userName}" created successfully`, ...result } }, signal @@ -125,6 +132,8 @@ export async function executeIamCreateRole(input: AwsIamCreateRoleBody, signal?: input.description, input.path, input.maxSessionDuration, + input.permissionsBoundary, + input.tags, signal ) return { message: `Role "${result.roleName}" created successfully`, ...result } @@ -211,6 +220,7 @@ export async function executeIamListPolicies(input: AwsIamListPoliciesBody, sign input.pathPrefix, input.maxItems, input.marker, + input.policyUsageFilter, signal ), signal diff --git a/apps/sim/lib/internal/identity-center/client.ts b/apps/sim/lib/internal/identity-center/client.ts index ca751a9e29f..24b7d2489ef 100644 --- a/apps/sim/lib/internal/identity-center/client.ts +++ b/apps/sim/lib/internal/identity-center/client.ts @@ -1,6 +1,7 @@ import { DescribeGroupCommand, DescribeUserCommand, + type ExternalId, GetGroupIdCommand, GetUserIdCommand, IdentitystoreClient, @@ -193,9 +194,23 @@ export async function getUserByEmail( userName: describeResponse.UserName ?? '', displayName: describeResponse.DisplayName ?? null, email: primaryEmail, + givenName: describeResponse.Name?.GivenName ?? null, + familyName: describeResponse.Name?.FamilyName ?? null, + userStatus: describeResponse.UserStatus ?? null, + title: describeResponse.Title ?? null, + externalIds: mapExternalIds(describeResponse.ExternalIds), } } +function mapExternalIds(externalIds: ExternalId[] | undefined) { + return ( + externalIds?.map((externalId) => ({ + issuer: externalId.Issuer ?? '', + id: externalId.Id ?? '', + })) ?? [] + ) +} + function mapAssignmentStatus(status: AccountAssignmentOperationStatus) { return { status: status.Status ?? '', @@ -333,6 +348,7 @@ export async function getGroupByDisplayName( groupId, displayName: describeResponse.DisplayName ?? null, description: describeResponse.Description ?? null, + externalIds: mapExternalIds(describeResponse.ExternalIds), } } @@ -361,12 +377,14 @@ export async function listAccountAssignmentsForPrincipal( principalType: 'USER' | 'GROUP', maxResults?: number | null, nextToken?: string | null, + accountId?: string | null, signal?: AbortSignal ) { const command = new ListAccountAssignmentsForPrincipalCommand({ InstanceArn: instanceArn, PrincipalId: principalId, PrincipalType: principalType as PrincipalType, + ...(accountId ? { Filter: { AccountId: accountId } } : {}), ...(maxResults ? { MaxResults: maxResults } : {}), ...(nextToken ? { NextToken: nextToken } : {}), }) @@ -424,6 +442,8 @@ export async function describeUserById( email: primaryEmail, userStatus: response.UserStatus ?? null, title: response.Title ?? null, + givenName: response.Name?.GivenName ?? null, + familyName: response.Name?.FamilyName ?? null, externalIds: response.ExternalIds?.map((externalId) => ({ issuer: externalId.Issuer ?? '', diff --git a/apps/sim/lib/internal/identity-center/operations.ts b/apps/sim/lib/internal/identity-center/operations.ts index 0a1adb7e25d..212d566b6cf 100644 --- a/apps/sim/lib/internal/identity-center/operations.ts +++ b/apps/sim/lib/internal/identity-center/operations.ts @@ -213,6 +213,7 @@ export async function executeIdentityCenterListAccountAssignments( input.principalType, input.maxResults, input.nextToken, + input.accountId, signal ) } finally { diff --git a/apps/sim/lib/internal/lambda/client.ts b/apps/sim/lib/internal/lambda/client.ts index 2f83944c4d9..8fc8c2a71e9 100644 --- a/apps/sim/lib/internal/lambda/client.ts +++ b/apps/sim/lib/internal/lambda/client.ts @@ -211,6 +211,7 @@ export function mapFunctionConfiguration(fc: FunctionConfiguration) { ? { retentionPeriodInDays: fc.DurableConfig.RetentionPeriodInDays ?? null, executionTimeout: fc.DurableConfig.ExecutionTimeout ?? null, + kmsKeyArn: fc.DurableConfig.KMSKeyArn ?? null, } : null, tenancyConfig: fc.TenancyConfig diff --git a/apps/sim/lib/internal/lambda/operations.ts b/apps/sim/lib/internal/lambda/operations.ts index 463d5940454..4d85fe56b7a 100644 --- a/apps/sim/lib/internal/lambda/operations.ts +++ b/apps/sim/lib/internal/lambda/operations.ts @@ -1,5 +1,6 @@ import { AddPermissionCommand, + type ApplicationLogLevel, type Cors, CreateAliasCommand, CreateEventSourceMappingCommand, @@ -42,6 +43,8 @@ import { ListProvisionedConcurrencyConfigsCommand, ListTagsCommand, ListVersionsByFunctionCommand, + type LogFormat, + type LoggingConfig, type LogType, PublishVersionCommand, PutFunctionConcurrencyCommand, @@ -55,6 +58,7 @@ import { type SnapStartApplyOn, type SourceAccessConfiguration, type SourceAccessType, + type SystemLogLevel, TagResourceCommand, type TracingMode, UntagResourceCommand, @@ -182,11 +186,18 @@ function toVpcConfig(subnetIds?: string[], securityGroupIds?: string[]) { } /** Builds the SDK `LoggingConfig` wrapper, omitted entirely when no field was supplied. */ -function toLoggingConfig(logFormat?: string, logGroup?: string) { - if (!logFormat && !logGroup) return undefined +function toLoggingConfig( + logFormat?: string, + logGroup?: string, + applicationLogLevel?: ApplicationLogLevel, + systemLogLevel?: SystemLogLevel +): LoggingConfig | undefined { + if (!logFormat && !logGroup && !applicationLogLevel && !systemLogLevel) return undefined return { - ...(logFormat ? { LogFormat: logFormat as 'JSON' | 'Text' } : {}), + ...(logFormat ? { LogFormat: logFormat as LogFormat } : {}), ...(logGroup ? { LogGroup: logGroup } : {}), + ...(applicationLogLevel ? { ApplicationLogLevel: applicationLogLevel } : {}), + ...(systemLogLevel ? { SystemLogLevel: systemLogLevel } : {}), } } @@ -244,6 +255,7 @@ export async function executeLambdaInvoke(input: AwsLambdaInvokeBody, signal?: A LogType: input.logType as LogType | undefined, ClientContext: input.clientContext, Qualifier: input.qualifier, + TenantId: input.tenantId, Payload: encodeInvocationPayload(input.payload), }), { abortSignal: signal } @@ -313,6 +325,12 @@ export async function executeLambdaGetFunction( imageUri: response.Code.ImageUri ?? null, resolvedImageUri: response.Code.ResolvedImageUri ?? null, sourceKmsKeyArn: response.Code.SourceKMSKeyArn ?? null, + error: response.Code.Error + ? { + errorCode: response.Code.Error.ErrorCode ?? null, + message: response.Code.Error.Message ?? null, + } + : null, } : null, tags: response.Tags ?? {}, @@ -457,7 +475,12 @@ export async function executeLambdaUpdateFunctionConfiguration( SnapStart: input.snapStartApplyOn ? { ApplyOn: input.snapStartApplyOn as SnapStartApplyOn } : undefined, - LoggingConfig: toLoggingConfig(input.logFormat, input.logGroup), + LoggingConfig: toLoggingConfig( + input.logFormat, + input.logGroup, + input.applicationLogLevel, + input.systemLogLevel + ), RevisionId: input.revisionId, }), { abortSignal: signal } diff --git a/apps/sim/lib/internal/rds/client.test.ts b/apps/sim/lib/internal/rds/client.test.ts index 7f36886b9fc..a64e6772829 100644 --- a/apps/sim/lib/internal/rds/client.test.ts +++ b/apps/sim/lib/internal/rds/client.test.ts @@ -1,6 +1,6 @@ import type { RDSDataClient } from '@aws-sdk/client-rds-data' import { describe, expect, it, vi } from 'vitest' -import { executeStatement } from '@/lib/internal/rds/client' +import { executeDelete, executeStatement } from '@/lib/internal/rds/client' describe('executeStatement', () => { it('preserves null elements in nested array values', async () => { @@ -25,4 +25,37 @@ describe('executeStatement', () => { rowCount: 1, }) }) + + it('counts returned records for a SELECT, which reports numberOfRecordsUpdated as 0', async () => { + const send = vi.fn().mockResolvedValue({ + numberOfRecordsUpdated: 0, + columnMetadata: [{ name: 'id' }], + records: [[{ longValue: 1 }], [{ longValue: 2 }]], + }) + const client = { send } as unknown as RDSDataClient + + const result = await executeStatement(client, 'arn', 'secret', 'db', 'SELECT id FROM t') + expect(result.rowCount).toBe(2) + }) + + it('reports affected rows for a write that returns no records', async () => { + const send = vi.fn().mockResolvedValue({ numberOfRecordsUpdated: 3, generatedFields: [] }) + const client = { send } as unknown as RDSDataClient + + const result = await executeStatement(client, 'arn', 'secret', 'db', 'UPDATE t SET a = 1') + expect(result.rowCount).toBe(3) + }) +}) + +describe('parameter binding', () => { + it('binds quoted column names to placeholders the SQL actually references', async () => { + const send = vi.fn().mockResolvedValue({ numberOfRecordsUpdated: 1 }) + const client = { send } as unknown as RDSDataClient + + await executeDelete(client, 'arn', 'secret', 'db', 'users', { '"id"': 7 }) + + const input = send.mock.calls[0]?.[0].input + expect(input.sql).toBe('DELETE FROM users WHERE id = :id') + expect(input.parameters).toEqual([{ name: 'id', value: { longValue: 7 } }]) + }) }) diff --git a/apps/sim/lib/internal/rds/client.ts b/apps/sim/lib/internal/rds/client.ts index 5739a82988e..caf1bfbb734 100644 --- a/apps/sim/lib/internal/rds/client.ts +++ b/apps/sim/lib/internal/rds/client.ts @@ -4,6 +4,7 @@ import { type Field, RDSDataClient, type SqlParameter, + type TypeHint, } from '@aws-sdk/client-rds-data' import { awsClientConfig } from '@/lib/internal/aws/credentials' import type { RdsConnectionConfig } from '@/tools/rds/types' @@ -22,7 +23,7 @@ export async function executeStatement( sql: string, parameters?: SqlParameter[], signal?: AbortSignal -): Promise<{ rows: Record[]; rowCount: number }> { +): Promise { const command = new ExecuteStatementCommand({ resourceArn, secretArn, @@ -37,10 +38,45 @@ export async function executeStatement( return { rows, - rowCount: response.numberOfRecordsUpdated ?? rows.length, + rowCount: Math.max(rows.length, response.numberOfRecordsUpdated ?? 0), + ...(response.generatedFields && + response.generatedFields.length > 0 && { + generatedFields: response.generatedFields.map(parseFieldValue), + }), } } +interface RdsStatementResult { + rows: Record[] + rowCount: number + generatedFields?: unknown[] +} + +interface RdsNamedParameter { + name: string + value?: unknown + typeHint?: TypeHint +} + +/** + * Builds Data API parameters for `:name` placeholders from either a `{ name: value }` map or a + * list of `{ name, value, typeHint }` entries. A type hint tells the Data API to cast a string + * to DATE, TIME, TIMESTAMP, DECIMAL, JSON or UUID. + */ +export function buildSqlParameters( + parameters: Record | RdsNamedParameter[] | undefined +): SqlParameter[] | undefined { + if (!parameters) return undefined + const entries: RdsNamedParameter[] = Array.isArray(parameters) + ? parameters + : Object.entries(parameters).map(([name, value]) => ({ name, value })) + return entries.map((entry) => ({ + name: entry.name.replace(/^:/, ''), + value: toSqlParameterValue(entry.value), + ...(entry.typeHint && { typeHint: entry.typeHint }), + })) +} + function parseRdsResponse(response: ExecuteStatementCommandOutput): Record[] { if (!response.records || !response.columnMetadata) { return [] @@ -104,6 +140,11 @@ export function sanitizeIdentifier(identifier: string): string { return sanitizeSingleIdentifier(identifier) } +/** Placeholder name for a sanitized (possibly schema-qualified) column identifier. */ +function toParameterName(identifier: string): string { + return identifier.replace(/\./g, '_') +} + function sanitizeSingleIdentifier(identifier: string): string { const cleaned = identifier.replace(/`/g, '').replace(/"/g, '') @@ -153,14 +194,15 @@ export async function executeInsert( table: string, data: Record, signal?: AbortSignal -): Promise<{ rows: Record[]; rowCount: number }> { +): Promise { const sanitizedTable = sanitizeIdentifier(table) const columns = Object.keys(data) const sanitizedColumns = columns.map((col) => sanitizeIdentifier(col)) + const parameterNames = sanitizedColumns.map(toParameterName) - const placeholders = columns.map((col) => `:${col}`) - const parameters: SqlParameter[] = columns.map((col) => ({ - name: col, + const placeholders = parameterNames.map((name) => `:${name}`) + const parameters: SqlParameter[] = columns.map((col, index) => ({ + name: parameterNames[index], value: toSqlParameterValue(data[col]), })) @@ -181,12 +223,17 @@ export async function executeUpdate( data: Record, conditions: Record, signal?: AbortSignal -): Promise<{ rows: Record[]; rowCount: number }> { +): Promise { const sanitizedTable = sanitizeIdentifier(table) // Build SET clause with parameters const dataColumns = Object.keys(data) - const setClause = dataColumns.map((col) => `${sanitizeIdentifier(col)} = :set_${col}`).join(', ') + const setClause = dataColumns + .map((col) => { + const identifier = sanitizeIdentifier(col) + return `${identifier} = :set_${toParameterName(identifier)}` + }) + .join(', ') // Build WHERE clause with parameters const conditionColumns = Object.keys(conditions) @@ -194,17 +241,20 @@ export async function executeUpdate( throw new Error('At least one condition is required for UPDATE operations') } const whereClause = conditionColumns - .map((col) => `${sanitizeIdentifier(col)} = :where_${col}`) + .map((col) => { + const identifier = sanitizeIdentifier(col) + return `${identifier} = :where_${toParameterName(identifier)}` + }) .join(' AND ') // Build parameters array (prefixed to avoid name collisions) const parameters: SqlParameter[] = [ ...dataColumns.map((col) => ({ - name: `set_${col}`, + name: `set_${toParameterName(sanitizeIdentifier(col))}`, value: toSqlParameterValue(data[col]), })), ...conditionColumns.map((col) => ({ - name: `where_${col}`, + name: `where_${toParameterName(sanitizeIdentifier(col))}`, value: toSqlParameterValue(conditions[col]), })), ] @@ -225,7 +275,7 @@ export async function executeDelete( table: string, conditions: Record, signal?: AbortSignal -): Promise<{ rows: Record[]; rowCount: number }> { +): Promise { const sanitizedTable = sanitizeIdentifier(table) // Build WHERE clause with parameters @@ -234,11 +284,14 @@ export async function executeDelete( throw new Error('At least one condition is required for DELETE operations') } const whereClause = conditionColumns - .map((col) => `${sanitizeIdentifier(col)} = :${col}`) + .map((col) => { + const identifier = sanitizeIdentifier(col) + return `${identifier} = :${toParameterName(identifier)}` + }) .join(' AND ') const parameters: SqlParameter[] = conditionColumns.map((col) => ({ - name: col, + name: toParameterName(sanitizeIdentifier(col)), value: toSqlParameterValue(conditions[col]), })) diff --git a/apps/sim/lib/internal/rds/operations.ts b/apps/sim/lib/internal/rds/operations.ts index b4214d7a2ab..198cd5fbe58 100644 --- a/apps/sim/lib/internal/rds/operations.ts +++ b/apps/sim/lib/internal/rds/operations.ts @@ -1,5 +1,6 @@ import type { RDSDataClient } from '@aws-sdk/client-rds-data' import { + buildSqlParameters, createRdsClient, executeDelete, executeInsert, @@ -45,7 +46,7 @@ export function executeRdsQuery(input: RdsQueryInput, signal?: AbortSignal) { input.secretArn, input.database, input.query, - undefined, + buildSqlParameters(input.parameters), signal ) return { @@ -64,13 +65,14 @@ export function executeRdsStatement(input: RdsExecuteInput, signal?: AbortSignal input.secretArn, input.database, input.query, - undefined, + buildSqlParameters(input.parameters), signal ) return { message: `Query executed successfully. ${result.rowCount} row(s) affected.`, rows: result.rows, rowCount: result.rowCount, + ...(result.generatedFields && { generatedFields: result.generatedFields }), } }) } @@ -90,6 +92,7 @@ export function executeRdsInsert(input: RdsInsertInput, signal?: AbortSignal) { message: `Insert executed successfully. ${result.rowCount} row(s) inserted.`, rows: result.rows, rowCount: result.rowCount, + ...(result.generatedFields && { generatedFields: result.generatedFields }), } }) } diff --git a/apps/sim/lib/internal/rds/schema.ts b/apps/sim/lib/internal/rds/schema.ts index 6c8574377b6..1a9455f1d35 100644 --- a/apps/sim/lib/internal/rds/schema.ts +++ b/apps/sim/lib/internal/rds/schema.ts @@ -12,8 +12,22 @@ const rdsConnectionInputSchema = z.object({ database: z.string().optional(), }) +const rdsStatementParametersSchema = z + .union([ + z.record(z.string(), z.unknown()), + z.array( + z.object({ + name: z.string().min(1, 'Parameter name is required'), + value: z.unknown().optional(), + typeHint: z.enum(['DATE', 'DECIMAL', 'JSON', 'TIME', 'TIMESTAMP', 'UUID']).optional(), + }) + ), + ]) + .optional() + export const rdsQueryInputSchema = rdsConnectionInputSchema.extend({ query: z.string().min(1, 'Query is required'), + parameters: rdsStatementParametersSchema, }) export const rdsExecuteInputSchema = rdsQueryInputSchema export const rdsInsertInputSchema = rdsConnectionInputSchema.extend({ diff --git a/apps/sim/lib/internal/s3/operations.ts b/apps/sim/lib/internal/s3/operations.ts index 56a82eb2aff..7bf06dde3cf 100644 --- a/apps/sim/lib/internal/s3/operations.ts +++ b/apps/sim/lib/internal/s3/operations.ts @@ -13,6 +13,8 @@ import { type ObjectCannedACL, PutObjectCommand, type S3Client, + type ServerSideEncryption, + type StorageClass, } from '@aws-sdk/client-s3' import { getSignedUrl } from '@aws-sdk/s3-request-presigner' import { createLogger } from '@sim/logger' @@ -260,6 +262,8 @@ export async function executeS3ListObjects(input: AwsS3ListObjectsBody, signal?: Prefix: input.prefix || undefined, MaxKeys: input.maxKeys || undefined, ContinuationToken: input.continuationToken || undefined, + Delimiter: input.delimiter || undefined, + StartAfter: input.startAfter || undefined, }), { abortSignal: signal } ) @@ -271,7 +275,11 @@ export async function executeS3ListObjects(input: AwsS3ListObjectsBody, signal?: size: object.Size || 0, lastModified: object.LastModified?.toISOString() || '', etag: object.ETag || '', + storageClass: object.StorageClass ?? null, })), + commonPrefixes: (response.CommonPrefixes ?? []).flatMap((commonPrefix) => + commonPrefix.Prefix ? [commonPrefix.Prefix] : [] + ), isTruncated: response.IsTruncated, nextContinuationToken: response.NextContinuationToken, keyCount: response.KeyCount, @@ -378,6 +386,11 @@ export async function executeS3PutObject(input: AwsS3PutObjectBody, context: S3O Body: uploadBody, ContentType: uploadContentType, ACL: input.acl as ObjectCannedACL | undefined, + Metadata: input.metadata ?? undefined, + StorageClass: (input.storageClass as StorageClass | undefined) || undefined, + ServerSideEncryption: + (input.serverSideEncryption as ServerSideEncryption | undefined) || undefined, + SSEKMSKeyId: input.sseKmsKeyId || undefined, }), { abortSignal: signal } ) @@ -392,6 +405,8 @@ export async function executeS3PutObject(input: AwsS3PutObjectBody, context: S3O location: url, key: input.objectKey, bucket: input.bucketName, + versionId: response.VersionId ?? null, + serverSideEncryption: response.ServerSideEncryption ?? null, }, } }) diff --git a/apps/sim/lib/internal/secrets-manager/client.ts b/apps/sim/lib/internal/secrets-manager/client.ts index b3606ba4294..b56a6591eae 100644 --- a/apps/sim/lib/internal/secrets-manager/client.ts +++ b/apps/sim/lib/internal/secrets-manager/client.ts @@ -1,4 +1,11 @@ -import type { RotationRulesType, SecretListEntry, Tag } from '@aws-sdk/client-secrets-manager' +import type { + Filter, + RotationRulesType, + SecretListEntry, + SortByType, + SortOrderType, + Tag, +} from '@aws-sdk/client-secrets-manager' import { CreateSecretCommand, DeleteSecretCommand, @@ -52,15 +59,12 @@ export async function getSecretValue( const response = await client.send(command, { abortSignal: signal }) - if (!response.SecretString && response.SecretBinary) { - throw new Error( - 'Secret is stored as binary (SecretBinary). This integration only supports string secrets.' - ) - } - return { name: response.Name ?? '', secretValue: response.SecretString ?? '', + secretBinary: response.SecretBinary + ? Buffer.from(response.SecretBinary).toString('base64') + : null, arn: response.ARN ?? '', versionId: response.VersionId ?? '', versionStages: response.VersionStages ?? [], @@ -68,15 +72,29 @@ export async function getSecretValue( } } +interface ListSecretsOptions { + filters?: { key: Filter['Key']; values: string[] }[] | null + sortOrder?: SortOrderType | null + sortBy?: SortByType | null + includePlannedDeletion?: boolean | null +} + export async function listSecrets( client: SecretsManagerClient, maxResults?: number | null, nextToken?: string | null, - signal?: AbortSignal + signal?: AbortSignal, + options: ListSecretsOptions = {} ) { const command = new ListSecretsCommand({ ...(maxResults ? { MaxResults: maxResults } : {}), ...(nextToken ? { NextToken: nextToken } : {}), + ...(options.filters && options.filters.length > 0 + ? { Filters: options.filters.map((filter) => ({ Key: filter.key, Values: filter.values })) } + : {}), + ...(options.sortOrder ? { SortOrder: options.sortOrder } : {}), + ...(options.sortBy ? { SortBy: options.sortBy } : {}), + ...(options.includePlannedDeletion ? { IncludePlannedDeletion: true } : {}), }) const response = await client.send(command, { abortSignal: signal }) @@ -84,6 +102,10 @@ export async function listSecrets( name: secret.Name ?? '', arn: secret.ARN ?? '', description: secret.Description ?? null, + kmsKeyId: secret.KmsKeyId ?? null, + rotationLambdaARN: secret.RotationLambdaARN ?? null, + owningService: secret.OwningService ?? null, + primaryRegion: secret.PrimaryRegion ?? null, createdDate: secret.CreatedDate?.toISOString() ?? null, lastChangedDate: secret.LastChangedDate?.toISOString() ?? null, lastAccessedDate: secret.LastAccessedDate?.toISOString() ?? null, @@ -108,12 +130,15 @@ export async function createSecret( name: string, secretValue: string, description?: string | null, - signal?: AbortSignal + signal?: AbortSignal, + options: { kmsKeyId?: string | null; tags?: Tag[] | null } = {} ) { const command = new CreateSecretCommand({ Name: name, SecretString: secretValue, ...(description ? { Description: description } : {}), + ...(options.kmsKeyId ? { KmsKeyId: options.kmsKeyId } : {}), + ...(options.tags && options.tags.length > 0 ? { Tags: options.tags } : {}), }) const response = await client.send(command, { abortSignal: signal }) @@ -129,12 +154,14 @@ export async function updateSecretValue( secretId: string, secretValue: string, description?: string | null, - signal?: AbortSignal + signal?: AbortSignal, + kmsKeyId?: string | null ) { const command = new UpdateSecretCommand({ SecretId: secretId, SecretString: secretValue, ...(description ? { Description: description } : {}), + ...(kmsKeyId ? { KmsKeyId: kmsKeyId } : {}), }) const response = await client.send(command, { abortSignal: signal }) diff --git a/apps/sim/lib/internal/secrets-manager/operations.ts b/apps/sim/lib/internal/secrets-manager/operations.ts index fc428db3d0f..97f9777aa86 100644 --- a/apps/sim/lib/internal/secrets-manager/operations.ts +++ b/apps/sim/lib/internal/secrets-manager/operations.ts @@ -40,7 +40,12 @@ export async function executeSecretsManagerListSecrets( ) { const client = createSecretsManagerClient(input) try { - return await listSecrets(client, input.maxResults, input.nextToken, signal) + return await listSecrets(client, input.maxResults, input.nextToken, signal, { + filters: input.filters, + sortOrder: input.sortOrder, + sortBy: input.sortBy, + includePlannedDeletion: input.includePlannedDeletion, + }) } finally { client.destroy() } @@ -57,7 +62,11 @@ export async function executeSecretsManagerCreateSecret( input.name, input.secretValue, input.description, - signal + signal, + { + kmsKeyId: input.kmsKeyId, + tags: input.tags?.map((tag) => ({ Key: tag.key, Value: tag.value })), + } ) return { message: `Secret "${result.name}" created successfully`, ...result } } finally { @@ -76,7 +85,8 @@ export async function executeSecretsManagerUpdateSecret( input.secretId, input.secretValue, input.description, - signal + signal, + input.kmsKeyId ) return { message: `Secret "${result.name}" updated successfully`, ...result } } finally { diff --git a/apps/sim/lib/internal/ses/client.ts b/apps/sim/lib/internal/ses/client.ts index f5de62a80fa..783b5b994f8 100644 --- a/apps/sim/lib/internal/ses/client.ts +++ b/apps/sim/lib/internal/ses/client.ts @@ -25,13 +25,64 @@ import { z } from 'zod' import { awsClientConfig } from '@/lib/internal/aws/credentials' import type { SESConnectionConfig } from '@/tools/ses/types' +/** + * Optional per-destination Cc/Bcc. A malformed value is dropped rather than failing + * the send, matching how these keys were ignored before they were supported. + */ +const OptionalAddressListSchema = z.array(z.string().email()).optional().catch(undefined) + const SesBulkEmailDestinationSchema = z.object({ toAddresses: z.array(z.string().email()), + ccAddresses: OptionalAddressListSchema, + bccAddresses: OptionalAddressListSchema, templateData: z.string().optional(), }) type SesBulkEmailDestination = z.infer +/** A `MessageTag` applied to a send, for filtering its sending events. */ +interface SesEmailTag { + name: string + value: string +} + +/** + * The `FromEmailAddress` value with an optional friendly name. AWS requires a + * non-ASCII friendly name in MIME encoded-word syntax; an ASCII one is quoted. + */ +function formatFromAddress(address: string, name?: string | null): string { + const friendlyName = name?.replace(/[\r\n]+/g, ' ').trim() + if (!friendlyName) return address + if (/^[\x20-\x7e]*$/.test(friendlyName)) { + return `"${friendlyName.replace(/(["\\])/g, '\\$1')}" <${address}>` + } + return `${encodeMimeWords(friendlyName)} <${address}>` +} + +/** Bytes per encoded word, so `=?utf-8?B?…?=` stays within RFC 2047's 75 characters. */ +const MIME_WORD_MAX_BYTES = 45 + +/** Encodes text as RFC 2047 B-encoded words, splitting only between characters. */ +function encodeMimeWords(text: string): string { + const words: string[] = [] + let chunk = '' + for (const char of text) { + if (Buffer.byteLength(chunk + char, 'utf8') > MIME_WORD_MAX_BYTES) { + words.push(chunk) + chunk = '' + } + chunk += char + } + if (chunk) words.push(chunk) + return words + .map((word) => `=?utf-8?B?${Buffer.from(word, 'utf8').toString('base64')}?=`) + .join(' ') +} + +function toMessageTags(tags?: SesEmailTag[] | null) { + return tags?.length ? tags.map((tag) => ({ Name: tag.name, Value: tag.value })) : undefined +} + export function createSESClient(config: SESConnectionConfig): SESv2Client { return new SESv2Client({ ...awsClientConfig(config.region, config.accessKeyId, config.secretAccessKey), @@ -50,11 +101,14 @@ export async function sendEmail( bccAddresses?: string[] | null replyToAddresses?: string[] | null configurationSetName?: string | null + fromName?: string | null + emailTags?: SesEmailTag[] | null }, signal?: AbortSignal ) { + const emailTags = toMessageTags(params.emailTags) const command = new SendEmailCommand({ - FromEmailAddress: params.fromAddress, + FromEmailAddress: formatFromAddress(params.fromAddress, params.fromName), Destination: { ToAddresses: params.toAddresses, ...(params.ccAddresses?.length ? { CcAddresses: params.ccAddresses } : {}), @@ -71,6 +125,7 @@ export async function sendEmail( }, ...(params.replyToAddresses?.length ? { ReplyToAddresses: params.replyToAddresses } : {}), ...(params.configurationSetName ? { ConfigurationSetName: params.configurationSetName } : {}), + ...(emailTags ? { EmailTags: emailTags } : {}), }) const response = await client.send(command, { abortSignal: signal }) @@ -89,12 +144,16 @@ export async function sendTemplatedEmail( templateData: string ccAddresses?: string[] | null bccAddresses?: string[] | null + replyToAddresses?: string[] | null configurationSetName?: string | null + fromName?: string | null + emailTags?: SesEmailTag[] | null }, signal?: AbortSignal ) { + const emailTags = toMessageTags(params.emailTags) const command = new SendEmailCommand({ - FromEmailAddress: params.fromAddress, + FromEmailAddress: formatFromAddress(params.fromAddress, params.fromName), Destination: { ToAddresses: params.toAddresses, ...(params.ccAddresses?.length ? { CcAddresses: params.ccAddresses } : {}), @@ -106,7 +165,9 @@ export async function sendTemplatedEmail( TemplateData: params.templateData, }, }, + ...(params.replyToAddresses?.length ? { ReplyToAddresses: params.replyToAddresses } : {}), ...(params.configurationSetName ? { ConfigurationSetName: params.configurationSetName } : {}), + ...(emailTags ? { EmailTags: emailTags } : {}), }) const response = await client.send(command, { abortSignal: signal }) @@ -129,11 +190,15 @@ export async function sendBulkEmail( destinations: SesBulkEmailDestination[] defaultTemplateData?: string | null configurationSetName?: string | null + replyToAddresses?: string[] | null + fromName?: string | null + emailTags?: SesEmailTag[] | null }, signal?: AbortSignal ) { + const emailTags = toMessageTags(params.emailTags) const command = new SendBulkEmailCommand({ - FromEmailAddress: params.fromAddress, + FromEmailAddress: formatFromAddress(params.fromAddress, params.fromName), DefaultContent: { Template: { TemplateName: params.templateName, @@ -141,7 +206,11 @@ export async function sendBulkEmail( }, }, BulkEmailEntries: params.destinations.map((dest) => ({ - Destination: { ToAddresses: dest.toAddresses }, + Destination: { + ToAddresses: dest.toAddresses, + ...(dest.ccAddresses?.length ? { CcAddresses: dest.ccAddresses } : {}), + ...(dest.bccAddresses?.length ? { BccAddresses: dest.bccAddresses } : {}), + }, ...(dest.templateData ? { ReplacementEmailContent: { @@ -152,7 +221,9 @@ export async function sendBulkEmail( } : {}), })), + ...(params.replyToAddresses?.length ? { ReplyToAddresses: params.replyToAddresses } : {}), ...(params.configurationSetName ? { ConfigurationSetName: params.configurationSetName } : {}), + ...(emailTags ? { DefaultEmailTags: emailTags } : {}), }) const response = await client.send(command, { abortSignal: signal }) @@ -207,6 +278,8 @@ export async function getAccount(client: SESv2Client, signal?: AbortSignal) { max24HourSend: response.SendQuota?.Max24HourSend ?? 0, maxSendRate: response.SendQuota?.MaxSendRate ?? 0, sentLast24Hours: response.SendQuota?.SentLast24Hours ?? 0, + productionAccessEnabled: response.ProductionAccessEnabled ?? null, + enforcementStatus: response.EnforcementStatus ?? null, } } diff --git a/apps/sim/lib/internal/ses/operations.test.ts b/apps/sim/lib/internal/ses/operations.test.ts new file mode 100644 index 00000000000..9f12b09398c --- /dev/null +++ b/apps/sim/lib/internal/ses/operations.test.ts @@ -0,0 +1,124 @@ +import { SESv2Client } from '@aws-sdk/client-sesv2' +import { describe, expect, it, vi } from 'vitest' +import { + executeSesSendBulkEmail, + executeSesSendEmail, + executeSesSendTemplatedEmail, +} from '@/lib/internal/ses/operations' + +const CONNECTION = { + region: 'us-east-1', + accessKeyId: 'AKIAIOSFODNN7EXAMPLE', + secretAccessKey: 'secret', +} + +function captureSentInput() { + const send = vi + .spyOn(SESv2Client.prototype, 'send') + .mockImplementation(async () => ({ MessageId: 'message-id', BulkEmailEntryResults: [] })) + return () => { + const command = send.mock.calls[0]?.[0] + return (command && 'input' in command ? command.input : {}) as Record + } +} + +describe('SES send operations', () => { + it('sends Reply-To on a templated email', async () => { + const sentInput = captureSentInput() + + await executeSesSendTemplatedEmail({ + ...CONNECTION, + fromAddress: 'sender@example.com', + toAddresses: 'to@example.com', + templateName: 'welcome', + templateData: '{}', + replyToAddresses: 'support@example.com, sales@example.com', + }) + + expect(sentInput().ReplyToAddresses).toEqual(['support@example.com', 'sales@example.com']) + }) + + it('keeps per-destination Cc and Bcc on a bulk send', async () => { + const sentInput = captureSentInput() + + await executeSesSendBulkEmail({ + ...CONNECTION, + fromAddress: 'sender@example.com', + templateName: 'welcome', + destinations: JSON.stringify([ + { + toAddresses: ['to@example.com'], + ccAddresses: ['cc@example.com'], + bccAddresses: ['bcc@example.com'], + }, + ]), + }) + + expect(sentInput().BulkEmailEntries).toEqual([ + { + Destination: { + ToAddresses: ['to@example.com'], + CcAddresses: ['cc@example.com'], + BccAddresses: ['bcc@example.com'], + }, + }, + ]) + }) + + it('encodes a non-ASCII friendly From name and quotes an ASCII one', async () => { + const sentInput = captureSentInput() + + await executeSesSendEmail({ + ...CONNECTION, + fromAddress: 'sender@example.com', + fromName: 'Café "Ops"', + toAddresses: 'to@example.com', + subject: 'Hi', + bodyText: 'Hello', + }) + await executeSesSendEmail({ + ...CONNECTION, + fromAddress: 'sender@example.com', + fromName: 'Acme "Ops"', + toAddresses: 'to@example.com', + subject: 'Hi', + bodyText: 'Hello', + }) + + const send = vi.mocked(SESv2Client.prototype.send) + const fromOf = (index: number) => { + const command = send.mock.calls[index]?.[0] + return command && 'input' in command + ? (command.input as { FromEmailAddress?: string }).FromEmailAddress + : undefined + } + expect(sentInput().FromEmailAddress).toBe( + `=?utf-8?B?${Buffer.from('Café "Ops"').toString('base64')}?= ` + ) + expect(fromOf(1)).toBe('"Acme \\"Ops\\"" ') + }) + + it('splits a long non-ASCII From name into encoded words of at most 75 characters', async () => { + const sentInput = captureSentInput() + const name = 'Équipe de support client — Société Générale Ünïcødé Ops' + + await executeSesSendEmail({ + ...CONNECTION, + fromAddress: 'sender@example.com', + fromName: name, + toAddresses: 'to@example.com', + subject: 'Hi', + bodyText: 'Hello', + }) + + const [display, address] = String(sentInput().FromEmailAddress).split(' <') + const words: string[] = display.split(' ') + expect(words.length).toBeGreaterThan(1) + for (const word of words) expect(word.length).toBeLessThanOrEqual(75) + const decoded = words + .map((word) => Buffer.from(word.slice('=?utf-8?B?'.length, -2), 'base64').toString('utf8')) + .join('') + expect(decoded).toBe(name) + expect(address).toBe('sender@example.com>') + }) +}) diff --git a/apps/sim/lib/internal/ses/operations.ts b/apps/sim/lib/internal/ses/operations.ts index b12955770ac..cd30d7e984c 100644 --- a/apps/sim/lib/internal/ses/operations.ts +++ b/apps/sim/lib/internal/ses/operations.ts @@ -81,6 +81,8 @@ export function executeSesSendEmail(input: AwsSesSendEmailBody, signal?: AbortSi bccAddresses: splitEmailAddresses(input.bccAddresses), replyToAddresses: splitEmailAddresses(input.replyToAddresses), configurationSetName: input.configurationSetName, + fromName: input.fromName, + emailTags: input.emailTags, }, signal ) @@ -101,7 +103,10 @@ export function executeSesSendTemplatedEmail( templateData: input.templateData, ccAddresses: splitEmailAddresses(input.ccAddresses), bccAddresses: splitEmailAddresses(input.bccAddresses), + replyToAddresses: splitEmailAddresses(input.replyToAddresses), configurationSetName: input.configurationSetName, + fromName: input.fromName, + emailTags: input.emailTags, }, signal ) @@ -127,6 +132,9 @@ export function executeSesSendBulkEmail(input: AwsSesSendBulkEmailBody, signal?: destinations, defaultTemplateData: input.defaultTemplateData, configurationSetName: input.configurationSetName, + replyToAddresses: splitEmailAddresses(input.replyToAddresses), + fromName: input.fromName, + emailTags: input.emailTags, }, signal ) diff --git a/apps/sim/lib/internal/sqs/operations.test.ts b/apps/sim/lib/internal/sqs/operations.test.ts index f7f5e339c92..8c1b4b0401c 100644 --- a/apps/sim/lib/internal/sqs/operations.test.ts +++ b/apps/sim/lib/internal/sqs/operations.test.ts @@ -1,3 +1,4 @@ +import { envFlagsMock } from '@sim/testing/mocks/env-flags.mock' import { beforeEach, describe, expect, it, vi } from 'vitest' const { mockCreateSqsClient, mockDestroy, mockSend } = vi.hoisted(() => ({ @@ -13,6 +14,7 @@ vi.mock('@/lib/internal/sqs/client', () => ({ import { executeSqsDeleteMessageBatch, executeSqsListDeadLetterSourceQueues, + executeSqsSend, } from '@/lib/internal/sqs/operations' const CONNECTION = { @@ -25,6 +27,7 @@ const QUEUE_URL = 'https://sqs.us-east-1.amazonaws.com/123456789012/test-queue' describe('SQS operations', () => { beforeEach(() => { + envFlagsMock.isHosted = true mockCreateSqsClient.mockReturnValue({ send: mockSend, destroy: mockDestroy }) }) @@ -58,4 +61,50 @@ describe('SQS operations', () => { executeSqsListDeadLetterSourceQueues({ ...CONNECTION, queueUrl: QUEUE_URL }) ).resolves.toEqual({ queueUrls: [QUEUE_URL], nextToken: 'next', count: 1 }) }) + + it.each([ + 'https://attacker.example/123456789012/test-queue', + 'https://ec2-1-2-3-4.compute-1.amazonaws.com/123456789012/test-queue', + 'https://abc123.execute-api.us-east-1.amazonaws.com/123456789012/test-queue', + 'http://sqs.us-east-1.amazonaws.com/123456789012/test-queue', + 'https://sqs.us-east-1.amazonaws.com.evil.example/123456789012/test-queue', + ])('refuses %s, which the SDK would use as the request host', async (queueUrl) => { + mockSend.mockResolvedValue({ MessageId: 'id' }) + + await expect(executeSqsSend({ ...CONNECTION, queueUrl, data: { ok: true } })).rejects.toThrow( + 'Queue URL must be an Amazon SQS queue URL' + ) + expect(mockCreateSqsClient).not.toHaveBeenCalled() + }) + + it('leaves self-hosted SQS-compatible queue URLs alone', async () => { + envFlagsMock.isHosted = false + mockSend.mockResolvedValue({ MessageId: 'id' }) + + await expect( + executeSqsSend({ + ...CONNECTION, + queueUrl: 'http://localhost:4566/000000000000/test-queue', + data: { ok: true }, + }) + ).resolves.toMatchObject({ id: 'id' }) + }) + + it.each([ + QUEUE_URL, + 'https://us-east-1.queue.amazonaws.com/123456789012/test-queue', + 'https://vpce-0abc-1234.sqs.us-east-1.vpce.amazonaws.com/123456789012/test-queue', + 'https://sqs.cn-north-1.amazonaws.com.cn/123456789012/test-queue', + 'https://sqs.us-east-1.api.aws/123456789012/test-queue', + 'https://sqs-fips.us-gov-west-1.amazonaws.com/123456789012/test-queue', + 'https://queue.amazonaws.com/123456789012/test-queue', + 'https://sqs.cn-north-1.api.amazonwebservices.com.cn/123456789012/test-queue', + 'https://sqs.eusc-de-east-1.amazonaws.eu/123456789012/test-queue', + ])('accepts the AWS queue URL %s', async (queueUrl) => { + mockSend.mockResolvedValue({ MessageId: 'id' }) + + await expect( + executeSqsSend({ ...CONNECTION, queueUrl, data: { ok: true } }) + ).resolves.toMatchObject({ id: 'id' }) + }) }) diff --git a/apps/sim/lib/internal/sqs/operations.ts b/apps/sim/lib/internal/sqs/operations.ts index f445711eb8a..d98f3e3db5c 100644 --- a/apps/sim/lib/internal/sqs/operations.ts +++ b/apps/sim/lib/internal/sqs/operations.ts @@ -44,13 +44,76 @@ import type { AwsSqsSetQueueAttributesBody } from '@/lib/api/contracts/tools/aws import type { AwsSqsStartMessageMoveTaskBody } from '@/lib/api/contracts/tools/aws/sqs-start-message-move-task' import type { AwsSqsTagQueueBody } from '@/lib/api/contracts/tools/aws/sqs-tag-queue' import type { AwsSqsUntagQueueBody } from '@/lib/api/contracts/tools/aws/sqs-untag-queue' +import { isHosted } from '@/lib/core/config/env-flags' import { createSqsClient } from '@/lib/internal/sqs/client' import type { SqsConnectionConfig } from '@/tools/sqs/types' +/** DNS suffixes of every AWS partition, from the SDK partition table. */ +const AWS_DNS_SUFFIXES = [ + 'amazonaws.com', + 'amazonaws.com.cn', + 'amazonaws.eu', + 'c2s.ic.gov', + 'sc2s.sgov.gov', + 'csp.hci.ic.gov', + 'cloud.adc-e.uk', +] + +/** Dual-stack DNS suffixes of every AWS partition, from the SDK partition table. */ +const AWS_DUAL_STACK_DNS_SUFFIXES = [ + 'api.aws', + 'api.amazonwebservices.com.cn', + 'api.amazonwebservices.eu', + 'api.aws.ic.gov', + 'api.aws.scloud', + 'api.aws.hci.ic.gov', + 'api.cloud-aws.adc-e.uk', +] + +const escapeSuffix = (suffix: string) => suffix.replaceAll('.', '\\.') +const anyOf = (suffixes: string[]) => `(${suffixes.map(escapeSuffix).join('|')})` + +/** + * Hostnames of SQS endpoints: regional and FIPS, dual-stack, VPC interface, and the + * legacy `queue.amazonaws.com` forms. Anchored so other AWS hosts (EC2, API + * Gateway, ELB) never match. + */ +const AWS_SQS_HOSTS = [ + new RegExp(`^sqs(-fips)?\\.[a-z0-9-]+\\.${anyOf(AWS_DNS_SUFFIXES)}$`), + new RegExp(`^sqs(-fips)?\\.[a-z0-9-]+\\.${anyOf(AWS_DUAL_STACK_DNS_SUFFIXES)}$`), + new RegExp(`^vpce-[a-z0-9-]+\\.sqs\\.[a-z0-9-]+\\.vpce\\.${anyOf(AWS_DNS_SUFFIXES)}$`), + /^([a-z0-9-]+\.)?queue\.amazonaws\.com(\.cn)?$/, +] + +/** + * The SQS client sends each request to the host of its `QueueUrl` (the SDK's + * `useQueueUrlAsEndpoint` default), so a queue URL on any other host would carry + * the signed request, including a saved credential's session token, off AWS. + * Enforced on the hosted deployment only: self-hosted installs may point queue + * URLs at SQS-compatible endpoints (LocalStack, ElasticMQ). A value that does not + * parse as a URL is left for SQS to reject, since the SDK only redirects when it + * parses. + */ +function assertAwsQueueUrl(queueUrl: string | undefined) { + if (!queueUrl || !isHosted) return + let parsed: URL + try { + parsed = new URL(queueUrl) + } catch { + return + } + const host = parsed.hostname.toLowerCase() + if (parsed.protocol === 'https:' && AWS_SQS_HOSTS.some((pattern) => pattern.test(host))) return + throw new Error( + 'Queue URL must be an Amazon SQS queue URL (e.g., https://sqs.us-east-1.amazonaws.com/123456789012/my-queue)' + ) +} + async function withSqsClient( - config: SqsConnectionConfig, + config: SqsConnectionConfig & { queueUrl?: string }, execute: (client: SQSClient) => Promise ): Promise { + assertAwsQueueUrl(config.queueUrl) const client = createSqsClient(config) try { return await execute(client) diff --git a/apps/sim/lib/internal/sts/client.ts b/apps/sim/lib/internal/sts/client.ts index 6ec39d21825..aaf30eb5a6d 100644 --- a/apps/sim/lib/internal/sts/client.ts +++ b/apps/sim/lib/internal/sts/client.ts @@ -78,6 +78,7 @@ export async function assumeRole( policyArns?: string | null, tags?: string | null, transitiveTagKeys?: string | null, + sourceIdentity?: string | null, signal?: AbortSignal ) { const command = new AssumeRoleCommand({ @@ -88,6 +89,7 @@ export async function assumeRole( ...(externalId ? { ExternalId: externalId } : {}), ...(serialNumber ? { SerialNumber: serialNumber } : {}), ...(tokenCode ? { TokenCode: tokenCode } : {}), + ...(sourceIdentity ? { SourceIdentity: sourceIdentity } : {}), ...(() => { const arns = parsePolicyArns(policyArns) return arns ? { PolicyArns: arns } : {} diff --git a/apps/sim/lib/internal/sts/operations.ts b/apps/sim/lib/internal/sts/operations.ts index 846b842b6c0..21dd0f514da 100644 --- a/apps/sim/lib/internal/sts/operations.ts +++ b/apps/sim/lib/internal/sts/operations.ts @@ -32,6 +32,7 @@ export async function executeStsAssumeRole(input: StsAssumeRoleInput, signal?: A input.policyArns, input.tags, input.transitiveTagKeys, + input.sourceIdentity, signal ) } finally { diff --git a/apps/sim/lib/internal/sts/schema.ts b/apps/sim/lib/internal/sts/schema.ts index 3cfa219e313..c028fa34658 100644 --- a/apps/sim/lib/internal/sts/schema.ts +++ b/apps/sim/lib/internal/sts/schema.ts @@ -53,6 +53,12 @@ export const stsAssumeRoleInputSchema = authenticatedInputSchema.extend({ (value) => !value || value.split(',').filter((key) => key.trim().length > 0).length <= 50, { message: 'A maximum of 50 transitive tag keys can be provided' } ), + sourceIdentity: z + .string() + .min(2) + .max(64) + .regex(/^[\w+=,.@-]*$/, 'Source identity may contain only letters, digits, and _+=,.@-') + .nullish(), }) export const stsAssumeRoleWithWebIdentityInputSchema = z.object({ diff --git a/apps/sim/lib/internal/textract/document-input.ts b/apps/sim/lib/internal/textract/document-input.ts index 0c4cc6d32ec..a76175a8906 100644 --- a/apps/sim/lib/internal/textract/document-input.ts +++ b/apps/sim/lib/internal/textract/document-input.ts @@ -7,12 +7,12 @@ import { secureFetchWithPinnedIP, validateUrlWithDNS, } from '@/lib/core/security/input-validation.server' +import { isPayloadSizeLimitError } from '@/lib/core/utils/stream-limits' import { TextractOperationError } from '@/lib/internal/textract/errors' import { isModelSafeWorkspaceFileKey, MODEL_UNSAFE_WORKSPACE_FILE_ERROR_MESSAGE, } from '@/lib/uploads/contexts/workspace/file-secret-provenance' -import { MAX_BUFFERED_TRANSFER_BYTES } from '@/lib/uploads/shared/types' import type { RawFileInput } from '@/lib/uploads/utils/file' import { extractStorageKey, @@ -27,6 +27,16 @@ import { assertToolFileAccess } from '@/app/api/files/authorization' type TextractLogger = ReturnType +/** Textract's synchronous operations accept at most 10 MB of document bytes. */ +const TEXTRACT_SYNC_MAX_DOCUMENT_BYTES = 10 * 1024 * 1024 + +function documentTooLargeError(): TextractOperationError { + return new TextractOperationError( + 'Document exceeds the 10 MB limit for single-page Textract processing. For a larger PDF or TIFF, upload it to S3 and use Multi-Page mode.', + 413 + ) +} + export interface ResolvedDocument { bytes: Buffer contentType: string @@ -54,22 +64,28 @@ async function fetchDocumentBytes( throw new TextractOperationError(urlValidation.error || 'Invalid document URL', 400) } - const response = await secureFetchWithPinnedIP(url, urlValidation.resolvedIP, { - profile, - method: 'GET', - signal, - }) - if (!response.ok) { - await response.text().catch(() => {}) - throw new TextractOperationError( - `Failed to fetch document: ${response.statusText}`, - response.status - ) - } + try { + const response = await secureFetchWithPinnedIP(url, urlValidation.resolvedIP, { + profile, + method: 'GET', + signal, + maxResponseBytes: TEXTRACT_SYNC_MAX_DOCUMENT_BYTES, + }) + if (!response.ok) { + await response.text().catch(() => {}) + throw new TextractOperationError( + `Failed to fetch document: ${response.statusText}`, + response.status + ) + } - const arrayBuffer = await response.arrayBuffer() - const contentType = response.headers.get('content-type') || 'application/octet-stream' - return { bytes: Buffer.from(arrayBuffer), contentType } + const arrayBuffer = await response.arrayBuffer() + const contentType = response.headers.get('content-type') || 'application/octet-stream' + return { bytes: Buffer.from(arrayBuffer), contentType } + } catch (error) { + if (isPayloadSizeLimitError(error)) throw documentTooLargeError() + throw error + } } export async function resolveDocumentInput( @@ -107,12 +123,16 @@ export async function resolveDocumentInput( } signal?.throwIfAborted() - const { buffer, contentType } = await downloadServableFileFromStorage( - userFile, - requestId, - logger, - { maxBytes: MAX_BUFFERED_TRANSFER_BYTES } - ) + let downloaded: Awaited> + try { + downloaded = await downloadServableFileFromStorage(userFile, requestId, logger, { + maxBytes: TEXTRACT_SYNC_MAX_DOCUMENT_BYTES, + }) + } catch (error) { + if (isPayloadSizeLimitError(error)) throw documentTooLargeError() + throw error + } + const { buffer, contentType } = downloaded const resolvedContentType = contentType || userFile.type || 'application/octet-stream' return { diff --git a/apps/sim/lib/internal/textract/operations.ts b/apps/sim/lib/internal/textract/operations.ts index 2551ab46a29..62799a1468b 100644 --- a/apps/sim/lib/internal/textract/operations.ts +++ b/apps/sim/lib/internal/textract/operations.ts @@ -12,6 +12,7 @@ import { StartDocumentTextDetectionCommand, StartExpenseAnalysisCommand, TextractClient, + type Warning, } from '@aws-sdk/client-textract' import { createLogger } from '@sim/logger' import { NextResponse } from 'next/server' @@ -46,6 +47,7 @@ interface TextractDocumentResult { JobStatus?: string StatusMessage?: string NextToken?: string + Warnings?: Warning[] Blocks?: unknown[] DocumentMetadata?: { Pages?: number } AnalyzeDocumentModelVersion?: string @@ -56,6 +58,7 @@ interface TextractExpenseResult { JobStatus?: string StatusMessage?: string NextToken?: string + Warnings?: Warning[] ExpenseDocuments?: ExpenseDocument[] DocumentMetadata?: { Pages?: number } AnalyzeExpenseModelVersion?: string @@ -78,6 +81,26 @@ function validateModelInputProvenance(input: unknown, headers: Headers): NextRes ) } +function mergeWarnings(accumulated: Warning[] = [], page: Warning[] = []): Warning[] { + const seen = new Set(accumulated.map((warning) => JSON.stringify(warning))) + return [...accumulated, ...page.filter((warning) => !seen.has(JSON.stringify(warning)))] +} + +function asyncJobOutput(result: { + JobStatus?: string + StatusMessage?: string + Warnings?: Warning[] +}) { + return { + jobStatus: result.JobStatus ?? null, + statusMessage: result.StatusMessage ?? null, + warnings: (result.Warnings ?? []).map((warning) => ({ + errorCode: warning.ErrorCode ?? null, + pages: warning.Pages ?? [], + })), + } +} + function createTextractClient(input: { region: string accessKeyId: string @@ -170,6 +193,7 @@ export async function executeTextractParse( ...accumulated, ...page, Blocks: [...(accumulated.Blocks ?? []), ...(page.Blocks ?? [])], + Warnings: mergeWarnings(accumulated.Warnings, page.Warnings), }), signal ) @@ -186,6 +210,7 @@ export async function executeTextractParse( documentMetadata: { pages: result.DocumentMetadata?.Pages ?? 0 }, modelVersion: result.AnalyzeDocumentModelVersion ?? result.DetectDocumentTextModelVersion, + ...asyncJobOutput(result), }, }) } finally { @@ -307,6 +332,7 @@ export async function executeTextractAnalyzeExpense( ...(accumulated.ExpenseDocuments ?? []), ...(page.ExpenseDocuments ?? []), ], + Warnings: mergeWarnings(accumulated.Warnings, page.Warnings), }), signal ) @@ -317,6 +343,7 @@ export async function executeTextractAnalyzeExpense( expenseDocuments: normalizeExpenseDocuments(result.ExpenseDocuments ?? []), documentMetadata: { pages: result.DocumentMetadata?.Pages ?? 0 }, modelVersion: result.AnalyzeExpenseModelVersion, + ...asyncJobOutput(result), }, }) } finally { diff --git a/apps/sim/tools/athena/batch_get_query_execution.ts b/apps/sim/tools/athena/batch_get_query_execution.ts index 19249a70de8..df95c795adb 100644 --- a/apps/sim/tools/athena/batch_get_query_execution.ts +++ b/apps/sim/tools/athena/batch_get_query_execution.ts @@ -138,6 +138,50 @@ export const batchGetQueryExecutionTool: InternalToolConfig< description: 'S3 location of query results', optional: true, }, + servicePreProcessingTimeInMillis: { + type: 'number', + description: + 'Time Athena spent preprocessing the query before submitting it, in milliseconds', + optional: true, + }, + serviceProcessingTimeInMillis: { + type: 'number', + description: + 'Time Athena spent finalizing and publishing results after execution, in milliseconds', + optional: true, + }, + dataManifestLocation: { + type: 'string', + description: 'S3 location of the manifest file listing files written by the query', + optional: true, + }, + reusedPreviousResult: { + type: 'boolean', + description: 'Whether the query reused a previous result instead of scanning data', + optional: true, + }, + athenaError: { + type: 'json', + description: + 'Failure details for a FAILED query (errorCategory: 1 system, 2 user, 3 other; errorType; retryable; errorMessage)', + optional: true, + }, + executionParameters: { + type: 'array', + description: "Values supplied for the query's ? placeholders", + optional: true, + }, + substatementType: { + type: 'string', + description: + 'Kind of query statement that was run (e.g., SELECT, INSERT, CREATE_TABLE)', + optional: true, + }, + engineVersion: { + type: 'json', + description: 'Engine version used (selectedEngineVersion, effectiveEngineVersion)', + optional: true, + }, }, }, }, diff --git a/apps/sim/tools/athena/get_query_execution.ts b/apps/sim/tools/athena/get_query_execution.ts index 1f6896b5e8a..0f77b63cc49 100644 --- a/apps/sim/tools/athena/get_query_execution.ts +++ b/apps/sim/tools/athena/get_query_execution.ts @@ -75,6 +75,14 @@ export const getQueryExecutionTool: InternalToolConfig< queryQueueTimeInMillis: data.output.queryQueueTimeInMillis ?? null, totalExecutionTimeInMillis: data.output.totalExecutionTimeInMillis ?? null, outputLocation: data.output.outputLocation ?? null, + servicePreProcessingTimeInMillis: data.output.servicePreProcessingTimeInMillis ?? null, + serviceProcessingTimeInMillis: data.output.serviceProcessingTimeInMillis ?? null, + dataManifestLocation: data.output.dataManifestLocation ?? null, + reusedPreviousResult: data.output.reusedPreviousResult ?? null, + athenaError: data.output.athenaError ?? null, + executionParameters: data.output.executionParameters ?? null, + substatementType: data.output.substatementType ?? null, + engineVersion: data.output.engineVersion ?? null, }, } }, @@ -139,5 +147,48 @@ export const getQueryExecutionTool: InternalToolConfig< description: 'S3 location of query results', optional: true, }, + servicePreProcessingTimeInMillis: { + type: 'number', + description: + 'Time Athena spent preprocessing the query before submitting it, in milliseconds', + optional: true, + }, + serviceProcessingTimeInMillis: { + type: 'number', + description: + 'Time Athena spent finalizing and publishing results after execution, in milliseconds', + optional: true, + }, + dataManifestLocation: { + type: 'string', + description: 'S3 location of the manifest file listing files written by the query', + optional: true, + }, + reusedPreviousResult: { + type: 'boolean', + description: 'Whether the query reused a previous result instead of scanning data', + optional: true, + }, + athenaError: { + type: 'json', + description: + 'Failure details for a FAILED query (errorCategory: 1 system, 2 user, 3 other; errorType; retryable; errorMessage)', + optional: true, + }, + executionParameters: { + type: 'array', + description: "Values supplied for the query's ? placeholders", + optional: true, + }, + substatementType: { + type: 'string', + description: 'Kind of query statement that was run (e.g., SELECT, INSERT, CREATE_TABLE)', + optional: true, + }, + engineVersion: { + type: 'json', + description: 'Engine version used (selectedEngineVersion, effectiveEngineVersion)', + optional: true, + }, }, } diff --git a/apps/sim/tools/athena/get_query_results.ts b/apps/sim/tools/athena/get_query_results.ts index b3ca92bd117..e6dd1d41954 100644 --- a/apps/sim/tools/athena/get_query_results.ts +++ b/apps/sim/tools/athena/get_query_results.ts @@ -84,7 +84,7 @@ export const getQueryResultsTool: InternalToolConfig< outputs: { columns: { type: 'array', - description: 'Column metadata (name and type)', + description: 'Column metadata (name, type, label, precision, scale, nullable, caseSensitive)', }, rows: { type: 'array', @@ -97,7 +97,8 @@ export const getQueryResultsTool: InternalToolConfig< }, updateCount: { type: 'number', - description: 'Number of rows affected (for INSERT/UPDATE statements)', + description: + 'Number of rows inserted or updated by a CREATE TABLE AS SELECT, INSERT INTO, or UPDATE statement', optional: true, }, }, diff --git a/apps/sim/tools/athena/start_query.ts b/apps/sim/tools/athena/start_query.ts index c6c241d4e52..7f76779e5f1 100644 --- a/apps/sim/tools/athena/start_query.ts +++ b/apps/sim/tools/athena/start_query.ts @@ -110,6 +110,33 @@ export const startQueryTool: InternalToolConfig[] nextToken: string | null updateCount: number | null @@ -159,6 +186,14 @@ interface AthenaQueryExecutionSummary { queryQueueTimeInMillis: number | null totalExecutionTimeInMillis: number | null outputLocation: string | null + servicePreProcessingTimeInMillis?: number | null + serviceProcessingTimeInMillis?: number | null + dataManifestLocation?: string | null + reusedPreviousResult?: boolean | null + athenaError?: AthenaQueryError | null + executionParameters?: string[] | null + substatementType?: string | null + engineVersion?: AthenaEngineVersion | null } interface AthenaUnprocessedQueryExecutionId { diff --git a/apps/sim/tools/binary-downloads.test.ts b/apps/sim/tools/binary-downloads.test.ts index f05fdd1d928..7bd3e310378 100644 --- a/apps/sim/tools/binary-downloads.test.ts +++ b/apps/sim/tools/binary-downloads.test.ts @@ -64,6 +64,11 @@ const DOWNLOAD_CASES: DownloadCase[] = [ size, name: 'download.pdf', lastModified: 'Fri, 11 Sep 2026 12:00:00 GMT', + etag: null, + versionId: null, + storageClass: null, + serverSideEncryption: null, + userMetadata: {}, }) expect(output.url).toMatch( /^https:\/\/test-bucket\.s3\.us-east-1\.amazonaws\.com\/folder\/download\.pdf\?/ diff --git a/apps/sim/tools/cloudformation/create_change_set.ts b/apps/sim/tools/cloudformation/create_change_set.ts index b5c403febf4..740d6c3e608 100644 --- a/apps/sim/tools/cloudformation/create_change_set.ts +++ b/apps/sim/tools/cloudformation/create_change_set.ts @@ -88,6 +88,20 @@ export const createChangeSetTool: InternalToolConfig< visibility: 'user-or-llm', description: 'Description of the change set for reference', }, + tags: { + type: 'json', + required: false, + visibility: 'user-or-llm', + description: + 'Tags to apply to the stack and its resources when the change set executes (e.g., [{"key": "env", "value": "prod"}])', + }, + roleArn: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'ARN of an IAM service role CloudFormation assumes for stack operations (defaults to the caller credentials or the role previously used for the stack)', + }, }, operation: { @@ -105,6 +119,8 @@ export const createChangeSetTool: InternalToolConfig< ...(params.capabilities && { capabilities: params.capabilities }), ...(params.changeSetType && { changeSetType: params.changeSetType }), ...(params.description && { description: params.description }), + ...(params.tags && { tags: params.tags }), + ...(params.roleArn && { roleArn: params.roleArn }), }), }, diff --git a/apps/sim/tools/cloudformation/create_stack.ts b/apps/sim/tools/cloudformation/create_stack.ts index eac80a9cc83..11683a8e44d 100644 --- a/apps/sim/tools/cloudformation/create_stack.ts +++ b/apps/sim/tools/cloudformation/create_stack.ts @@ -5,6 +5,13 @@ import type { import { AWS_CREDENTIAL_OAUTH } from '@/tools/shared/saved-credentials' import type { InternalToolConfig } from '@/tools/types' +/** Accepts a boolean or its string form; anything else (empty, null) is left unset. */ +function parseOptionalBoolean(value: unknown): boolean | undefined { + if (value === true || value === 'true') return true + if (value === false || value === 'false') return false + return undefined +} + export const createStackTool: InternalToolConfig< CloudFormationCreateStackParams, CloudFormationCreateStackResponse @@ -79,6 +86,19 @@ export const createStackTool: InternalToolConfig< visibility: 'user-or-llm', description: 'Amount of time before the stack creation times out and rolls back', }, + roleArn: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'ARN of an IAM service role CloudFormation assumes for stack operations (defaults to the caller credentials or the role previously used for the stack)', + }, + enableTerminationProtection: { + type: 'boolean', + required: false, + visibility: 'user-or-llm', + description: 'Whether to enable termination protection on the new stack (default false)', + }, }, operation: { @@ -93,6 +113,10 @@ export const createStackTool: InternalToolConfig< ...(params.tags && { tags: params.tags }), ...(params.onFailure && { onFailure: params.onFailure }), ...(params.timeoutInMinutes !== undefined && { timeoutInMinutes: params.timeoutInMinutes }), + ...(params.roleArn && { roleArn: params.roleArn }), + ...(parseOptionalBoolean(params.enableTerminationProtection) !== undefined && { + enableTerminationProtection: parseOptionalBoolean(params.enableTerminationProtection), + }), }), }, diff --git a/apps/sim/tools/cloudformation/describe_change_set.ts b/apps/sim/tools/cloudformation/describe_change_set.ts index b32f9919b85..03ecde770ce 100644 --- a/apps/sim/tools/cloudformation/describe_change_set.ts +++ b/apps/sim/tools/cloudformation/describe_change_set.ts @@ -47,6 +47,12 @@ export const describeChangeSetTool: InternalToolConfig< description: 'Name or ID of the stack the change set belongs to (required if changeSetName is not an ARN)', }, + nextToken: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Pagination token from a previous call to fetch the next page of changes', + }, }, operation: { @@ -56,6 +62,7 @@ export const describeChangeSetTool: InternalToolConfig< secretAccessKey: params.awsSecretAccessKey, changeSetName: params.changeSetName, ...(params.stackName && { stackName: params.stackName }), + ...(params.nextToken && { nextToken: params.nextToken }), }), }, @@ -80,6 +87,15 @@ export const describeChangeSetTool: InternalToolConfig< creationTime: data.output.creationTime, capabilities: data.output.capabilities, changes: data.output.changes, + parameters: data.output.parameters ?? [], + tags: data.output.tags ?? [], + notificationArns: data.output.notificationArns ?? [], + includeNestedStacks: data.output.includeNestedStacks, + parentChangeSetId: data.output.parentChangeSetId, + rootChangeSetId: data.output.rootChangeSetId, + onStackFailure: data.output.onStackFailure, + importExistingResources: data.output.importExistingResources, + nextToken: data.output.nextToken ?? null, }, } }, @@ -109,7 +125,53 @@ export const describeChangeSetTool: InternalToolConfig< changes: { type: 'array', description: - 'List of resource changes (action, logical/physical resource ID, resource type, replacement)', + 'List of resource changes (action, logicalResourceId, physicalResourceId, resourceType, replacement, type, policyAction, scope, changeSetId, details [{attribute, name, requiresRecreation, evaluation, changeSource, causingEntity}])', + }, + parameters: { + type: 'array', + description: + 'Stack parameters for the change set (parameterKey, parameterValue, usePreviousValue, resolvedValue)', + optional: true, + }, + tags: { + type: 'array', + description: 'Tags associated with the change set (key, value)', + optional: true, + }, + notificationArns: { + type: 'array', + description: 'SNS topic ARNs that receive stack event notifications', + optional: true, + }, + includeNestedStacks: { + type: 'boolean', + description: 'Whether change sets were created for nested stacks', + optional: true, + }, + parentChangeSetId: { + type: 'string', + description: 'ID of the parent change set, for nested change sets', + optional: true, + }, + rootChangeSetId: { + type: 'string', + description: 'ID of the top-level change set, for nested change sets', + optional: true, + }, + onStackFailure: { + type: 'string', + description: 'Behavior when stack operations fail (DO_NOTHING, ROLLBACK, DELETE)', + optional: true, + }, + importExistingResources: { + type: 'boolean', + description: 'Whether the change set imports resources that already exist', + optional: true, + }, + nextToken: { + type: 'string', + description: 'Pagination token for the next page of changes, if more remain', + optional: true, }, }, } diff --git a/apps/sim/tools/cloudformation/describe_stack_events.ts b/apps/sim/tools/cloudformation/describe_stack_events.ts index 8fe5f3aba07..ab4d8be61de 100644 --- a/apps/sim/tools/cloudformation/describe_stack_events.ts +++ b/apps/sim/tools/cloudformation/describe_stack_events.ts @@ -76,7 +76,8 @@ export const describeStackEventsTool: InternalToolConfig< outputs: { events: { type: 'array', - description: 'List of stack events with resource status and timestamps', + description: + 'List of stack events (stackId, eventId, stackName, operationId, logicalResourceId, physicalResourceId, resourceType, resourceStatus, resourceStatusReason, detailedStatus, resourceProperties, clientRequestToken, hookType, hookStatus, hookStatusReason, hookInvocationPoint, hookFailureMode, timestamp)', }, }, } diff --git a/apps/sim/tools/cloudformation/describe_stacks.ts b/apps/sim/tools/cloudformation/describe_stacks.ts index 585a11438cb..75cae785b61 100644 --- a/apps/sim/tools/cloudformation/describe_stacks.ts +++ b/apps/sim/tools/cloudformation/describe_stacks.ts @@ -69,7 +69,8 @@ export const describeStacksTool: InternalToolConfig< outputs: { stacks: { type: 'array', - description: 'List of CloudFormation stacks with status, outputs, and tags', + description: + 'List of CloudFormation stacks (stackName, stackId, stackStatus, stackStatusReason, detailedStatus, creationTime, lastUpdatedTime, deletionTime, description, enableTerminationProtection, driftInformation, outputs [{outputKey, outputValue, description, exportName}], tags, parameters [{parameterKey, parameterValue, usePreviousValue, resolvedValue}], capabilities, changeSetId, roleArn, parentId, rootId, notificationArns, timeoutInMinutes, disableRollback, deletionMode, retainExceptOnCreate)', }, }, } diff --git a/apps/sim/tools/cloudformation/get_template_summary.ts b/apps/sim/tools/cloudformation/get_template_summary.ts index 5671f810b90..bdab2a8929b 100644 --- a/apps/sim/tools/cloudformation/get_template_summary.ts +++ b/apps/sim/tools/cloudformation/get_template_summary.ts @@ -85,7 +85,8 @@ export const getTemplateSummaryTool: InternalToolConfig< description: { type: 'string', description: 'Template description' }, parameters: { type: 'array', - description: 'Template parameters with types, defaults, and descriptions', + description: + 'Template parameters (parameterKey, defaultValue, parameterType, noEcho, description, allowedValues)', }, capabilities: { type: 'array', description: 'Required capabilities (e.g., CAPABILITY_IAM)' }, capabilitiesReason: { type: 'string', description: 'Reason capabilities are required' }, diff --git a/apps/sim/tools/cloudformation/types.ts b/apps/sim/tools/cloudformation/types.ts index af7a782df9a..39791ac1152 100644 --- a/apps/sim/tools/cloudformation/types.ts +++ b/apps/sim/tools/cloudformation/types.ts @@ -56,6 +56,8 @@ export interface CloudFormationCreateStackParams extends CloudFormationConnectio tags?: CloudFormationTagInput[] onFailure?: 'ROLLBACK' | 'DELETE' | 'DO_NOTHING' timeoutInMinutes?: number + roleArn?: string + enableTerminationProtection?: boolean } export interface CloudFormationUpdateStackParams extends CloudFormationConnectionConfig { @@ -65,6 +67,7 @@ export interface CloudFormationUpdateStackParams extends CloudFormationConnectio parameters?: CloudFormationParameterInput[] capabilities?: string tags?: CloudFormationTagInput[] + roleArn?: string } export interface CloudFormationDeleteStackParams extends CloudFormationConnectionConfig { @@ -85,11 +88,14 @@ export interface CloudFormationCreateChangeSetParams extends CloudFormationConne capabilities?: string changeSetType?: 'CREATE' | 'UPDATE' | 'IMPORT' description?: string + roleArn?: string + tags?: CloudFormationTagInput[] } export interface CloudFormationDescribeChangeSetParams extends CloudFormationConnectionConfig { changeSetName: string stackName?: string + nextToken?: string } export interface CloudFormationExecuteChangeSetParams extends CloudFormationConnectionConfig { @@ -102,6 +108,13 @@ export interface CloudFormationGetTemplateSummaryParams extends CloudFormationCo stackName?: string } +interface CloudFormationParameterOutput { + parameterKey: string + parameterValue: string | undefined + usePreviousValue: boolean | undefined + resolvedValue: string | undefined +} + export interface CloudFormationDescribeStacksResponse extends ToolResponse { output: { stacks: { @@ -117,8 +130,26 @@ export interface CloudFormationDescribeStacksResponse extends ToolResponse { stackDriftStatus: string | undefined lastCheckTimestamp: number | undefined } | null - outputs: { outputKey: string; outputValue: string; description: string | undefined }[] + outputs: { + outputKey: string + outputValue: string + description: string | undefined + exportName?: string + }[] tags: { key: string; value: string }[] + parameters?: CloudFormationParameterOutput[] + capabilities?: string[] + changeSetId?: string + deletionTime?: number + disableRollback?: boolean + notificationArns?: string[] + timeoutInMinutes?: number + roleArn?: string + parentId?: string + rootId?: string + detailedStatus?: string + deletionMode?: string + retainExceptOnCreate?: boolean }[] } } @@ -170,6 +201,15 @@ export interface CloudFormationDescribeStackEventsResponse extends ToolResponse resourceStatus: string | undefined resourceStatusReason: string | undefined timestamp: number | undefined + operationId?: string + resourceProperties?: string + clientRequestToken?: string + detailedStatus?: string + hookType?: string + hookStatus?: string + hookStatusReason?: string + hookInvocationPoint?: string + hookFailureMode?: string }[] } } @@ -245,7 +285,28 @@ export interface CloudFormationDescribeChangeSetResponse extends ToolResponse { physicalResourceId: string | undefined resourceType: string | undefined replacement: string | undefined + type?: string + policyAction?: string + scope?: string[] + changeSetId?: string + details?: { + attribute: string | undefined + name: string | undefined + requiresRecreation: string | undefined + evaluation: string | undefined + changeSource: string | undefined + causingEntity: string | undefined + }[] }[] + parameters?: CloudFormationParameterOutput[] + tags?: { key: string; value: string }[] + notificationArns?: string[] + includeNestedStacks?: boolean + parentChangeSetId?: string + rootChangeSetId?: string + onStackFailure?: string + importExistingResources?: boolean + nextToken?: string | null } } @@ -264,6 +325,7 @@ export interface CloudFormationGetTemplateSummaryResponse extends ToolResponse { parameterType: string | undefined noEcho: boolean | undefined description: string | undefined + allowedValues?: string[] }[] capabilities: string[] capabilitiesReason: string | undefined diff --git a/apps/sim/tools/cloudformation/update_stack.ts b/apps/sim/tools/cloudformation/update_stack.ts index afbb86399ef..22de5858b54 100644 --- a/apps/sim/tools/cloudformation/update_stack.ts +++ b/apps/sim/tools/cloudformation/update_stack.ts @@ -75,6 +75,13 @@ export const updateStackTool: InternalToolConfig< description: 'Tags to apply to the stack and its resources (e.g., [{"key": "env", "value": "prod"}])', }, + roleArn: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'ARN of an IAM service role CloudFormation assumes for stack operations (defaults to the caller credentials or the role previously used for the stack)', + }, }, operation: { @@ -90,6 +97,7 @@ export const updateStackTool: InternalToolConfig< ...(params.parameters && { parameters: params.parameters }), ...(params.capabilities && { capabilities: params.capabilities }), ...(params.tags && { tags: params.tags }), + ...(params.roleArn && { roleArn: params.roleArn }), }), }, diff --git a/apps/sim/tools/cloudwatch/describe_alarm_history.ts b/apps/sim/tools/cloudwatch/describe_alarm_history.ts index 626443bce21..501d597160a 100644 --- a/apps/sim/tools/cloudwatch/describe_alarm_history.ts +++ b/apps/sim/tools/cloudwatch/describe_alarm_history.ts @@ -120,6 +120,15 @@ export const describeAlarmHistoryTool: InternalToolConfig< description: 'ConfigurationUpdate, StateUpdate, Action, or contributor variants', }, historySummary: { type: 'string', description: 'Human-readable summary of the event' }, + historyData: { + type: 'string', + description: + 'JSON string with event details (e.g., old and new state with reason data for StateUpdate)', + }, + alarmContributorId: { + type: 'string', + description: 'ID of the alarm contributor, for contributor history items', + }, }, }, }, diff --git a/apps/sim/tools/cloudwatch/describe_alarms.ts b/apps/sim/tools/cloudwatch/describe_alarms.ts index f4400d1c034..d50ae887c63 100644 --- a/apps/sim/tools/cloudwatch/describe_alarms.ts +++ b/apps/sim/tools/cloudwatch/describe_alarms.ts @@ -58,6 +58,12 @@ export const describeAlarmsTool: InternalToolConfig< visibility: 'user-or-llm', description: 'Maximum number of alarms to return', }, + nextToken: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Pagination token from a previous call', + }, }, operation: { @@ -69,6 +75,7 @@ export const describeAlarmsTool: InternalToolConfig< ...(params.stateValue && { stateValue: params.stateValue }), ...(params.alarmType && { alarmType: params.alarmType }), ...(params.limit !== undefined && { limit: params.limit }), + ...(params.nextToken && { nextToken: params.nextToken }), }), }, @@ -83,6 +90,7 @@ export const describeAlarmsTool: InternalToolConfig< success: true, output: { alarms: data.output.alarms, + nextToken: data.output.nextToken ?? null, }, } }, @@ -104,12 +112,81 @@ export const describeAlarmsTool: InternalToolConfig< metricName: { type: 'string', description: 'Metric name (MetricAlarm only)' }, namespace: { type: 'string', description: 'Metric namespace (MetricAlarm only)' }, threshold: { type: 'number', description: 'Threshold value (MetricAlarm only)' }, + comparisonOperator: { + type: 'string', + description: 'Comparison operator (MetricAlarm only)', + }, + evaluationPeriods: { + type: 'number', + description: 'Number of periods evaluated (MetricAlarm only)', + }, stateUpdatedTimestamp: { type: 'number', description: 'Epoch ms when state last changed', }, + alarmType: { type: 'string', description: 'MetricAlarm or CompositeAlarm' }, + alarmDescription: { type: 'string', description: 'Alarm description' }, + actionsEnabled: { + type: 'boolean', + description: 'Whether actions run on state changes', + }, + alarmActions: { type: 'array', description: 'ARNs of actions run on ALARM' }, + okActions: { type: 'array', description: 'ARNs of actions run on OK' }, + insufficientDataActions: { + type: 'array', + description: 'ARNs of actions run on INSUFFICIENT_DATA', + }, + stateReasonData: { + type: 'string', + description: 'Machine-readable JSON explaining the state', + }, + stateTransitionedTimestamp: { + type: 'number', + description: 'Epoch ms when the state value last changed', + }, + alarmConfigurationUpdatedTimestamp: { + type: 'number', + description: 'Epoch ms when the alarm configuration last changed', + }, + statistic: { type: 'string', description: 'Statistic evaluated (MetricAlarm only)' }, + extendedStatistic: { + type: 'string', + description: 'Percentile statistic evaluated (MetricAlarm only)', + }, + dimensions: { + type: 'array', + description: 'Metric dimensions as {name, value} (MetricAlarm only)', + }, + period: { + type: 'number', + description: 'Evaluation period in seconds (MetricAlarm only)', + }, + unit: { type: 'string', description: 'Metric unit (MetricAlarm only)' }, + datapointsToAlarm: { + type: 'number', + description: 'Breaching datapoints needed to alarm (MetricAlarm only)', + }, + treatMissingData: { + type: 'string', + description: 'How missing data is treated (MetricAlarm only)', + }, + thresholdMetricId: { + type: 'string', + description: 'ID of the metric-math threshold query (anomaly detection alarms)', + }, + metrics: { + type: 'array', + description: + 'Metric-math queries [{id, expression, label, returnData, period, accountId, metricStat}] (MetricAlarm only)', + }, + alarmRule: { type: 'string', description: 'Rule expression (CompositeAlarm only)' }, }, }, }, + nextToken: { + type: 'string', + description: 'Pagination token for the next page of alarms', + optional: true, + }, }, } diff --git a/apps/sim/tools/cloudwatch/filter_log_events.ts b/apps/sim/tools/cloudwatch/filter_log_events.ts index e36b648e90c..8f879296f93 100644 --- a/apps/sim/tools/cloudwatch/filter_log_events.ts +++ b/apps/sim/tools/cloudwatch/filter_log_events.ts @@ -78,6 +78,12 @@ export const filterLogEventsTool: InternalToolConfig< visibility: 'user-or-llm', description: 'Maximum number of events to return', }, + nextToken: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Pagination token from a previous call to continue where it stopped', + }, }, operation: { @@ -92,6 +98,7 @@ export const filterLogEventsTool: InternalToolConfig< ...(params.endTime !== undefined && { endTime: params.endTime }), ...(params.startFromHead !== undefined && { startFromHead: params.startFromHead }), ...(params.limit !== undefined && { limit: params.limit }), + ...(params.nextToken && { nextToken: params.nextToken }), }), }, @@ -106,6 +113,7 @@ export const filterLogEventsTool: InternalToolConfig< success: true, output: { events: data.output.events, + nextToken: data.output.nextToken ?? null, }, } }, @@ -121,8 +129,14 @@ export const filterLogEventsTool: InternalToolConfig< timestamp: { type: 'number', description: 'Event timestamp in epoch milliseconds' }, message: { type: 'string', description: 'Log event message' }, ingestionTime: { type: 'number', description: 'Ingestion time in epoch milliseconds' }, + eventId: { type: 'string', description: 'Unique ID of the log event' }, }, }, }, + nextToken: { + type: 'string', + description: 'Token to fetch the next page of matching events, if more remain', + optional: true, + }, }, } diff --git a/apps/sim/tools/cloudwatch/get_log_events.ts b/apps/sim/tools/cloudwatch/get_log_events.ts index d66a9a5c5d1..7f46034892c 100644 --- a/apps/sim/tools/cloudwatch/get_log_events.ts +++ b/apps/sim/tools/cloudwatch/get_log_events.ts @@ -64,6 +64,13 @@ export const getLogEventsTool: InternalToolConfig< visibility: 'user-or-llm', description: 'Maximum number of events to return', }, + nextToken: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'Token from a previous call (nextForwardToken or nextBackwardToken) to page through the stream', + }, }, operation: { @@ -76,6 +83,7 @@ export const getLogEventsTool: InternalToolConfig< ...(params.startTime !== undefined && { startTime: params.startTime }), ...(params.endTime !== undefined && { endTime: params.endTime }), ...(params.limit !== undefined && { limit: params.limit }), + ...(params.nextToken && { nextToken: params.nextToken }), }), }, @@ -90,6 +98,8 @@ export const getLogEventsTool: InternalToolConfig< success: true, output: { events: data.output.events, + nextForwardToken: data.output.nextForwardToken ?? null, + nextBackwardToken: data.output.nextBackwardToken ?? null, }, } }, @@ -107,5 +117,16 @@ export const getLogEventsTool: InternalToolConfig< }, }, }, + nextForwardToken: { + type: 'string', + description: + 'Token for the next, newer page of events (returns the same token when the end of the stream is reached)', + optional: true, + }, + nextBackwardToken: { + type: 'string', + description: 'Token for the previous, older page of events', + optional: true, + }, }, } diff --git a/apps/sim/tools/cloudwatch/get_metric_statistics.ts b/apps/sim/tools/cloudwatch/get_metric_statistics.ts index 9e8c397860b..79743a47225 100644 --- a/apps/sim/tools/cloudwatch/get_metric_statistics.ts +++ b/apps/sim/tools/cloudwatch/get_metric_statistics.ts @@ -76,6 +76,20 @@ export const getMetricStatisticsTool: InternalToolConfig< visibility: 'user-or-llm', description: 'Dimensions as JSON (e.g., {"InstanceId": "i-1234"})', }, + extendedStatistics: { + type: 'array', + required: false, + visibility: 'user-or-llm', + description: + 'Percentile statistics to retrieve (e.g., ["p99", "p95"]). AWS accepts either Statistics or ExtendedStatistics, so when set these are requested instead of statistics', + }, + unit: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'Only return data reported with this unit (e.g., Percent, Milliseconds). Omit to return all units', + }, }, operation: { @@ -90,6 +104,11 @@ export const getMetricStatisticsTool: InternalToolConfig< period: params.period, statistics: params.statistics, ...(params.dimensions && { dimensions: params.dimensions }), + ...(params.extendedStatistics && + params.extendedStatistics.length > 0 && { + extendedStatistics: params.extendedStatistics, + }), + ...(params.unit && { unit: params.unit }), }), }, @@ -124,6 +143,10 @@ export const getMetricStatisticsTool: InternalToolConfig< maximum: { type: 'number', description: 'Maximum statistic value' }, sampleCount: { type: 'number', description: 'Sample count statistic value' }, unit: { type: 'string', description: 'Unit of the metric' }, + extendedStatistics: { + type: 'json', + description: 'Percentile values keyed by statistic (e.g., {"p99": 120.5})', + }, }, }, }, diff --git a/apps/sim/tools/cloudwatch/query_logs.ts b/apps/sim/tools/cloudwatch/query_logs.ts index d18c3daf998..6f956a1eef8 100644 --- a/apps/sim/tools/cloudwatch/query_logs.ts +++ b/apps/sim/tools/cloudwatch/query_logs.ts @@ -92,6 +92,7 @@ export const queryLogsTool: InternalToolConfig< results: data.output.results, statistics: data.output.statistics, status: data.output.status, + queryId: data.output.queryId ?? null, }, } }, @@ -117,5 +118,10 @@ export const queryLogsTool: InternalToolConfig< type: 'string', description: 'Query completion status (Complete, Failed, Cancelled, or Timeout)', }, + queryId: { + type: 'string', + description: 'ID of the Logs Insights query', + optional: true, + }, }, } diff --git a/apps/sim/tools/cloudwatch/types.ts b/apps/sim/tools/cloudwatch/types.ts index 9efd98f8de3..bf98456120f 100644 --- a/apps/sim/tools/cloudwatch/types.ts +++ b/apps/sim/tools/cloudwatch/types.ts @@ -25,6 +25,7 @@ export interface CloudWatchGetLogEventsParams extends CloudWatchConnectionConfig startTime?: number endTime?: number limit?: number + nextToken?: string } export interface CloudWatchQueryLogsResponse extends ToolResponse { @@ -36,6 +37,7 @@ export interface CloudWatchQueryLogsResponse extends ToolResponse { recordsScanned: number } status: string + queryId?: string | null } } @@ -58,6 +60,8 @@ export interface CloudWatchGetLogEventsResponse extends ToolResponse { message: string | undefined ingestionTime: number | undefined }[] + nextForwardToken?: string | null + nextBackwardToken?: string | null } } @@ -104,6 +108,8 @@ export interface CloudWatchGetMetricStatisticsParams extends CloudWatchConnectio period: number statistics: string[] dimensions?: string + extendedStatistics?: string[] + unit?: string } export interface CloudWatchGetMetricStatisticsResponse extends ToolResponse { @@ -117,6 +123,7 @@ export interface CloudWatchGetMetricStatisticsResponse extends ToolResponse { maximum?: number sampleCount?: number unit?: string + extendedStatistics?: Record }[] } } @@ -126,6 +133,7 @@ export interface CloudWatchDescribeAlarmsParams extends CloudWatchConnectionConf stateValue?: string alarmType?: string limit?: number + nextToken?: string } export interface CloudWatchDescribeAlarmsResponse extends ToolResponse { @@ -141,7 +149,27 @@ export interface CloudWatchDescribeAlarmsResponse extends ToolResponse { threshold: number | undefined evaluationPeriods: number | undefined stateUpdatedTimestamp: number | undefined + alarmType?: string + alarmDescription?: string + actionsEnabled?: boolean + alarmActions?: string[] + okActions?: string[] + insufficientDataActions?: string[] + stateReasonData?: string + stateTransitionedTimestamp?: number + alarmConfigurationUpdatedTimestamp?: number + statistic?: string + extendedStatistic?: string + dimensions?: { name: string; value: string }[] + period?: number + unit?: string + datapointsToAlarm?: number + treatMissingData?: string + thresholdMetricId?: string + metrics?: Record[] + alarmRule?: string }[] + nextToken?: string | null } } @@ -222,6 +250,8 @@ export interface CloudWatchDescribeAlarmHistoryResponse extends ToolResponse { timestamp: number | undefined historyItemType: string | undefined historySummary: string | undefined + historyData?: string + alarmContributorId?: string }[] } } @@ -234,6 +264,7 @@ export interface CloudWatchFilterLogEventsParams extends CloudWatchConnectionCon endTime?: number startFromHead?: boolean limit?: number + nextToken?: string } export interface CloudWatchFilterLogEventsResponse extends ToolResponse { @@ -243,7 +274,9 @@ export interface CloudWatchFilterLogEventsResponse extends ToolResponse { timestamp: number | undefined message: string | undefined ingestionTime: number | undefined + eventId?: string }[] + nextToken?: string | null } } diff --git a/apps/sim/tools/dynamodb/delete.ts b/apps/sim/tools/dynamodb/delete.ts index d4eb9635f74..9d81fd91967 100644 --- a/apps/sim/tools/dynamodb/delete.ts +++ b/apps/sim/tools/dynamodb/delete.ts @@ -62,6 +62,12 @@ export const deleteTool: InternalToolConfig visibility: 'user-or-llm', description: 'Use strongly consistent read', }, + projectionExpression: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'Attributes to retrieve (e.g., "pk, #name, email"). Returns all attributes if omitted', + }, + expressionAttributeNames: { + type: 'json', + required: false, + visibility: 'user-or-llm', + description: + 'Attribute name mappings for reserved words used in projectionExpression (e.g., {"#name": "name"})', + }, }, operation: { @@ -57,6 +71,11 @@ export const getTool: InternalToolConfig tableName: params.tableName, key: params.key, ...(params.consistentRead !== undefined && { consistentRead: params.consistentRead }), + ...(params.projectionExpression && { projectionExpression: params.projectionExpression }), + ...(params.projectionExpression && + params.expressionAttributeNames && { + expressionAttributeNames: params.expressionAttributeNames, + }), }), }, diff --git a/apps/sim/tools/dynamodb/introspect.ts b/apps/sim/tools/dynamodb/introspect.ts index 3f102777cfc..2a73c6b1f36 100644 --- a/apps/sim/tools/dynamodb/introspect.ts +++ b/apps/sim/tools/dynamodb/introspect.ts @@ -73,7 +73,8 @@ export const introspectTool: InternalToolConfig< tables: { type: 'array', description: 'List of table names in the region' }, tableDetails: { type: 'json', - description: 'Detailed schema information for a specific table', + description: + 'Detailed schema for a specific table (tableName, tableStatus, keySchema, attributeDefinitions, globalSecondaryIndexes, localSecondaryIndexes, itemCount, tableSizeBytes, billingMode, tableArn, creationDateTime, deletionProtectionEnabled, streamEnabled, streamViewType, latestStreamArn)', optional: true, }, }, diff --git a/apps/sim/tools/dynamodb/put.ts b/apps/sim/tools/dynamodb/put.ts index c3a099527fe..d916262dbfc 100644 --- a/apps/sim/tools/dynamodb/put.ts +++ b/apps/sim/tools/dynamodb/put.ts @@ -62,6 +62,13 @@ export const putTool: InternalToolConfig description: 'Expression attribute values used in conditionExpression (e.g., {":expected": "value"})', }, + returnValues: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + 'Set to "ALL_OLD" to return the item this put replaced as attributes (default: "NONE")', + }, }, operation: { @@ -78,6 +85,7 @@ export const putTool: InternalToolConfig ...(params.expressionAttributeValues && { expressionAttributeValues: params.expressionAttributeValues, }), + ...(params.returnValues && { returnValues: params.returnValues }), }), }, @@ -93,6 +101,7 @@ export const putTool: InternalToolConfig output: { message: data.message || 'Item created successfully', item: data.item, + ...(data.attributes !== undefined && { attributes: data.attributes ?? null }), }, error: undefined, } @@ -101,5 +110,10 @@ export const putTool: InternalToolConfig outputs: { message: { type: 'string', description: 'Operation status message' }, item: { type: 'json', description: 'Created item', optional: true }, + attributes: { + type: 'json', + description: 'Item that was replaced, when returnValues is ALL_OLD (null if no item existed)', + optional: true, + }, }, } diff --git a/apps/sim/tools/dynamodb/query.ts b/apps/sim/tools/dynamodb/query.ts index d7c70462afd..2cd11c2f9b2 100644 --- a/apps/sim/tools/dynamodb/query.ts +++ b/apps/sim/tools/dynamodb/query.ts @@ -85,6 +85,19 @@ export const queryTool: InternalToolConfig consistentRead?: boolean + projectionExpression?: string + expressionAttributeNames?: Record } export interface DynamoDBPutParams extends DynamoDBConnectionConfig { @@ -18,6 +20,7 @@ export interface DynamoDBPutParams extends DynamoDBConnectionConfig { conditionExpression?: string expressionAttributeNames?: Record expressionAttributeValues?: Record + returnValues?: 'NONE' | 'ALL_OLD' } export interface DynamoDBQueryParams extends DynamoDBConnectionConfig { @@ -30,6 +33,8 @@ export interface DynamoDBQueryParams extends DynamoDBConnectionConfig { limit?: number exclusiveStartKey?: Record scanIndexForward?: boolean + projectionExpression?: string + consistentRead?: boolean } export interface DynamoDBScanParams extends DynamoDBConnectionConfig { @@ -40,6 +45,10 @@ export interface DynamoDBScanParams extends DynamoDBConnectionConfig { expressionAttributeValues?: Record limit?: number exclusiveStartKey?: Record + indexName?: string + consistentRead?: boolean + segment?: number + totalSegments?: number } export interface DynamoDBUpdateParams extends DynamoDBConnectionConfig { @@ -49,6 +58,7 @@ export interface DynamoDBUpdateParams extends DynamoDBConnectionConfig { expressionAttributeNames?: Record expressionAttributeValues?: Record conditionExpression?: string + returnValues?: 'NONE' | 'ALL_OLD' | 'UPDATED_OLD' | 'ALL_NEW' | 'UPDATED_NEW' } export interface DynamoDBDeleteParams extends DynamoDBConnectionConfig { @@ -57,6 +67,7 @@ export interface DynamoDBDeleteParams extends DynamoDBConnectionConfig { conditionExpression?: string expressionAttributeNames?: Record expressionAttributeValues?: Record + returnValues?: 'NONE' | 'ALL_OLD' } interface DynamoDBBaseResponse extends ToolResponse { @@ -65,7 +76,9 @@ interface DynamoDBBaseResponse extends ToolResponse { item?: Record items?: Record[] count?: number + scannedCount?: number | null lastEvaluatedKey?: Record + attributes?: Record | null } } @@ -106,6 +119,12 @@ export interface DynamoDBTableSchema { itemCount: number tableSizeBytes: number billingMode: string + tableArn?: string | null + creationDateTime?: string | null + deletionProtectionEnabled?: boolean | null + streamEnabled?: boolean | null + streamViewType?: string | null + latestStreamArn?: string | null } export interface DynamoDBIntrospectResponse extends ToolResponse { diff --git a/apps/sim/tools/dynamodb/update.ts b/apps/sim/tools/dynamodb/update.ts index 8393d9a28d0..1dec7989dce 100644 --- a/apps/sim/tools/dynamodb/update.ts +++ b/apps/sim/tools/dynamodb/update.ts @@ -68,6 +68,13 @@ export const updateTool: InternalToolConfig }[] nextToken: string | null diff --git a/apps/sim/tools/generated/tool-metadata.ts b/apps/sim/tools/generated/tool-metadata.ts index bb921d14ec6..1ae0ea2d802 100644 --- a/apps/sim/tools/generated/tool-metadata.ts +++ b/apps/sim/tools/generated/tool-metadata.ts @@ -3,7 +3,7 @@ /** Serializable metadata for every built-in tool, keyed by tool id. */ const toolMetadata: Record = 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)"}},"hostedApiKey":"none"},"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)"}},"hostedApiKey":"none"},"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)"}},"hostedApiKey":"none"},"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)"}},"hostedApiKey":"none"},"affinity_batch_update_entity_fields":{"id":"affinity_batch_update_entity_fields","name":"Affinity Batch Update Entity Fields","description":"Write up to 100 non-list field values on one company or person in a single request.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which entity to write the fields on: companies or persons"},"entityId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of that company or person"},"updates":{"type":"json","required":true,"visibility":"user-or-llm","description":"Up to 100 field updates as [{\\"id\\":\\"\\",\\"value\\":{\\"type\\":\\"…\\",\\"data\\":…}}], using the same value shapes as a single field update"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_batch_update_list_entry_fields":{"id":"affinity_batch_update_list_entry_fields","name":"Affinity Batch Update List Entry Fields","description":"Write up to 100 field values on one list row in a single request. Requires the \\"Export data from Lists\\" permission.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"listEntryId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list entry ID"},"updates":{"type":"json","required":true,"visibility":"user-or-llm","description":"Up to 100 field updates as [{\\"id\\":\\"\\",\\"value\\":{\\"type\\":\\"…\\",\\"data\\":…}}], using the same value shapes as a single field update"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_create_list":{"id":"affinity_create_list","name":"Affinity Create List","description":"Create a list. Its type fixes which entities it can hold, and the API key holder becomes its creator and owner.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"name":{"type":"string","required":true,"visibility":"user-or-llm","description":"Name of the new list"},"type":{"type":"string","required":true,"visibility":"user-or-llm","description":"Entity kind the list holds: company, opportunity, or person"},"isPublic":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Whether everyone in the organization can see the list"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_create_list_field_dropdown_option":{"id":"affinity_create_list_field_dropdown_option","name":"Affinity Create List Field Dropdown Option","description":"Add a selectable option to a dropdown field on a list. A ranked or status option also needs a rank and a color.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"fieldId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The dropdown field ID on that list"},"type":{"type":"string","required":true,"visibility":"user-or-llm","description":"Kind of option to create, matching the field. dropdown takes only a label; ranked-dropdown also requires rank and color; status-dropdown additionally requires a status category. Sending a field the kind does not accept is rejected"},"text":{"type":"string","required":true,"visibility":"user-or-llm","description":"The option label"},"rank":{"type":"number","required":false,"visibility":"user-or-llm","description":"Sort order. Required on a ranked-dropdown or status-dropdown option"},"color":{"type":"string","required":false,"visibility":"user-or-llm","description":"Option color: white, gray, blue, green, purple, orange, or red. Required on a ranked-dropdown or status-dropdown option"},"statusCategory":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pipeline meaning of the option: open, won, lost, or on-hold. Status-dropdown options only"},"winRate":{"type":"number","required":false,"visibility":"user-or-llm","description":"Expected win rate of the status. Status-dropdown options only"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_create_merge":{"id":"affinity_create_merge","name":"Affinity Create Merge","description":"Fold a duplicate company or person into the record you are keeping. The merge runs asynchronously — poll the returned task to see it finish. Requires the \\"Manage duplicates\\" permission and an admin role.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"What to merge: companies or persons"},"primaryId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the record to keep"},"duplicateId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of the duplicate record to fold in"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_create_note":{"id":"affinity_create_note","name":"Affinity Create Note","description":"Write a note — attached to companies, persons, and opportunities, anchored to a meeting, call, or chat message, or posted as a reply to an existing note.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"type":{"type":"string","required":true,"visibility":"user-or-llm","description":"Note shape: entities to attach it to records, interaction to anchor it to a meeting, call, or chat message, or user-reply to reply to a note"},"html":{"type":"string","required":true,"visibility":"user-or-llm","description":"The note body as HTML"},"companyIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Companies to attach the note to, e.g. [1, 2]. Not used on a reply"},"personIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Persons to attach the note to, e.g. [1, 2]. Not used on a reply"},"opportunityIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Opportunities to attach the note to, e.g. [1, 2]. Not used on a reply"},"interactionId":{"type":"string","required":false,"visibility":"user-or-llm","description":"The interaction to anchor the note to. Required for an interaction note"},"interactionType":{"type":"string","required":false,"visibility":"user-or-llm","description":"Kind of the anchoring interaction: meeting, call, or chat-message. Required for an interaction note"},"parentId":{"type":"string","required":false,"visibility":"user-or-llm","description":"The note being replied to. Required for a user-reply note"},"creatorId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Attribute the note to another internal person. Defaults to the API key holder"},"createdAt":{"type":"string","required":false,"visibility":"user-or-llm","description":"Backdate the note to this ISO 8601 timestamp"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_create_reminder":{"id":"affinity_create_reminder","name":"Affinity Create Reminder","description":"Create a reminder on one company, person, or opportunity. A recurring reminder resets whenever the chosen signal happens instead of firing once.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"type":{"type":"string","required":true,"visibility":"user-or-llm","description":"one-time to fire once, or recurring to reset on a signal"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"What the reminder is about: company, person, or opportunity"},"entityId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of that company, person, or opportunity"},"dueDate":{"type":"string","required":false,"visibility":"user-or-llm","description":"When the reminder is due, as an ISO 8601 timestamp. Required for a one-time reminder; on a recurring one Affinity computes it from the period when omitted"},"content":{"type":"string","required":false,"visibility":"user-or-llm","description":"What the reminder says"},"ownerId":{"type":"string","required":true,"visibility":"user-or-llm","description":"User the reminder is assigned to. Must be an internal user. The API key holder is recorded as the creator, which is a separate field"},"resetTrigger":{"type":"string","required":false,"visibility":"user-or-llm","description":"What restarts a recurring reminder: interaction, email, or event. Required when the type is recurring"},"periodDays":{"type":"number","required":false,"visibility":"user-or-llm","description":"Days between firings of a recurring reminder. Required when the type is recurring"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_delete_list_field_dropdown_option":{"id":"affinity_delete_list_field_dropdown_option","name":"Affinity Delete List Field Dropdown Option","description":"Permanently delete a dropdown option on a list field. Every list entry currently set to it is cleared, and those values cannot be recovered.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"fieldId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The dropdown field ID on that list"},"dropdownOptionId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The dropdown option ID to delete"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_delete_note":{"id":"affinity_delete_note","name":"Affinity Delete Note","description":"Delete a note you created. Deleting a root note also deletes its replies; deleting a reply removes only that reply.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"noteId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The note ID to delete"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_company":{"id":"affinity_get_company","name":"Affinity Get Company","description":"Look up one company by ID. Field data is returned only for the Field IDs or Field Types asked for.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"companyId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The company ID"},"fieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs to return values for, e.g. [\\"affinity-data-location\\"]. Mutually exclusive with Field Types"},"fieldTypes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field categories to return values for: enriched, global, or relationship-intelligence. Mutually exclusive with Field IDs"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_current_user":{"id":"affinity_get_current_user","name":"Affinity Get Current User","description":"Verify an Affinity API key and return the tenant, the user behind the key, and the scopes the grant carries.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_entity_field_value":{"id":"affinity_get_entity_field_value","name":"Affinity Get Entity Field Value","description":"Read one non-list field value from a company or person.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which entity to read the field from: companies or persons"},"entityId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of that company or person"},"fieldId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The field ID to read"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_list":{"id":"affinity_get_list","name":"Affinity Get List","description":"Read one list — its name, type, owner, and privacy setting.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_list_entry":{"id":"affinity_get_list_entry","name":"Affinity Get List Entry","description":"Read one row of a list with its entity. Field data is returned only for the Field IDs or Field Types asked for.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"listEntryId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list entry ID"},"fieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs to return values for, e.g. [\\"affinity-data-location\\"]. Mutually exclusive with Field Types"},"fieldTypes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field categories to return values for: enriched, global, list, or relationship-intelligence. Mutually exclusive with Field IDs"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_list_entry_field":{"id":"affinity_get_list_entry_field","name":"Affinity Get List Entry Field","description":"Read one field value on a list row.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"listEntryId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list entry ID"},"fieldId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The field ID to read"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_list_field_dropdown_option":{"id":"affinity_get_list_field_dropdown_option","name":"Affinity Get List Field Dropdown Option","description":"Read one dropdown option on a list field.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"fieldId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The dropdown field ID on that list"},"dropdownOptionId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The dropdown option ID"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_merge":{"id":"affinity_get_merge","name":"Affinity Get Merge","description":"Read the status of one company or person merge, including why it failed if it did.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which merge to read: companies or persons"},"mergeId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The merge ID"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_merge_task":{"id":"affinity_get_merge_task","name":"Affinity Get Merge Task","description":"Read one merge task and how its merges are progressing. Poll this after starting a merge.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which merge task to read: companies or persons"},"taskId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The merge task ID"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_note":{"id":"affinity_get_note","name":"Affinity Get Note","description":"Read one note with its body, author, mentions, and attached records.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"noteId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The note ID"},"includes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Extra properties to return, e.g. [\\"repliesCount\\",\\"personsPreview\\",\\"companiesPreview\\",\\"opportunitiesPreview\\"]. Those four fields are omitted unless requested here"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_opportunity":{"id":"affinity_get_opportunity","name":"Affinity Get Opportunity","description":"Read one opportunity and the list it belongs to. Its field data lives on the list entry.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"opportunityId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The opportunity ID"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_person":{"id":"affinity_get_person","name":"Affinity Get Person","description":"Look up one person by ID. Field data is returned only for the Field IDs or Field Types asked for.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"personId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The person ID"},"fieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs to return values for, e.g. [\\"affinity-data-location\\"]. Mutually exclusive with Field Types"},"fieldTypes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field categories to return values for: enriched, global, or relationship-intelligence. Mutually exclusive with Field IDs"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_saved_view":{"id":"affinity_get_saved_view","name":"Affinity Get Saved View","description":"Read one saved view — its name, kind, and creation date.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"viewId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The saved view ID"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_transcript":{"id":"affinity_get_transcript","name":"Affinity Get Transcript","description":"Read one transcript with its first 100 fragments. Page the fragments endpoint for a longer meeting.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"transcriptId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The transcript ID"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_get_user":{"id":"affinity_get_user","name":"Affinity Get User","description":"Read one internal user. A user and their person record share the same numeric ID, so a person ID works here.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"userId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The user ID, which is also their person ID"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_calls":{"id":"affinity_list_calls","name":"Affinity List Calls","description":"Page through logged calls and their participants. Only calls the API key holder can see are returned.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression, e.g. \\"createdAt>=2026-01-01\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_chat_messages":{"id":"affinity_list_chat_messages","name":"Affinity List Chat Messages","description":"Page through logged chat messages and their participants. Only messages the API key holder can see are returned.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression, e.g. \\"createdAt>=2026-01-01\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_companies":{"id":"affinity_list_companies","name":"Affinity List Companies","description":"Page through companies. Companies come back without field data unless Field IDs or Field Types asks for it.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"ids":{"type":"json","required":false,"visibility":"user-or-llm","description":"Restrict the page to these company IDs, e.g. [1, 2, 3]"},"fieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs to return values for, e.g. [\\"affinity-data-location\\"]. Mutually exclusive with Field Types"},"fieldTypes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field categories to return values for: enriched, global, or relationship-intelligence. Mutually exclusive with Field IDs"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_coworker_connections":{"id":"affinity_list_coworker_connections","name":"Affinity List Coworker Connections","description":"Find warm paths into a company through shared work history: who in your Affinity data once worked alongside the people you want to reach. Grouped by target, strongest first.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"filter":{"type":"string","required":true,"visibility":"user-or-llm","description":"Required scope. The only supported filter is target.currentCompany.id, e.g. \\"target.currentCompany.id=123\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of targets to return per page, 1-50. Defaults to 20"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_emails":{"id":"affinity_list_emails","name":"Affinity List Emails","description":"Page through email metadata — subject, participants, and timestamps. Affinity never exposes email bodies through the API.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression, e.g. \\"createdAt>=2026-01-01\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_entity_field_values":{"id":"affinity_list_entity_field_values","name":"Affinity List Entity Field Values","description":"Page through a company\'s or person\'s non-list field values. List fields are not returned here — read those through the list entry.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which entity to read field values from: companies or persons"},"entityId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of that company or person"},"ids":{"type":"json","required":false,"visibility":"user-or-llm","description":"Restrict to these field IDs. Mutually exclusive with Field Types"},"types":{"type":"json","required":false,"visibility":"user-or-llm","description":"Restrict to these field categories: enriched, global, relationship-intelligence. Mutually exclusive with Field IDs"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 20"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_entity_list_entries":{"id":"affinity_list_entity_list_entries","name":"Affinity List Entity List Entries","description":"Page through a company\'s or person\'s rows across every list, each carrying that list\'s field values and when the entity was added.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which entity to look up the rows of: companies or persons"},"entityId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of that company or person"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_entity_lists":{"id":"affinity_list_entity_lists","name":"Affinity List Entity Lists","description":"List every list a company or person appears on that the caller can view.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which entity to look up the lists of: companies or persons"},"entityId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of that company or person"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_entity_notes":{"id":"affinity_list_entity_notes","name":"Affinity List Entity Notes","description":"List the notes relevant to one company, person, or opportunity — directly attached notes plus notes reaching it through its people and meetings.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which entity the notes hang off: companies, persons, or opportunities"},"entityId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of that company, person, or opportunity"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression, e.g. \\"createdAt>=2026-01-01\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_entity_relationships":{"id":"affinity_list_entity_relationships","name":"Affinity List Entity Relationships","description":"List who knows a company or person, scored 0.0 to 1.0 by how much the two actually interact. Strongest first by default.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which entity to look up relationships for: companies or persons"},"entityId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of that company or person"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression. This endpoint filters on interactionScore only, e.g. \\"interactionScore>=0.5\\""},"orderBy":{"type":"json","required":false,"visibility":"user-or-llm","description":"Sort order: [\\"interactionScore\\"] for weakest first, [\\"-interactionScore\\"] for strongest first (the default)"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_field_dropdown_options":{"id":"affinity_list_field_dropdown_options","name":"Affinity List Field Dropdown Options","description":"List the selectable options on a dropdown or ranked-dropdown company or person field. Writing such a field needs the option ID, not its text.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which field family the field belongs to: companies or persons"},"fieldId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The dropdown or ranked-dropdown field ID"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_field_metadata":{"id":"affinity_list_field_metadata","name":"Affinity List Field Metadata","description":"List the non-list company or person fields, with the value type, filter operators, and sort support of each. Start here to find the Field IDs the read and write tools take.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which fields to describe: companies or persons"},"includes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Extra properties to return: [\\"filterability\\",\\"sortability\\"]. Both are omitted unless requested here"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression. This endpoint filters on name only, e.g. \\"name=~Status\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_field_value_changes":{"id":"affinity_list_field_value_changes","name":"Affinity List Field Value Changes","description":"Page through field value changes across the whole workspace. Built for delta sync: follow nextCursor to the end of a run, then resume from the last cursor next time.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression over field.id, listEntry.id, changer.id, changedAt, or actionType. Resume a sync with e.g. \\"changedAt>2026-06-01T12:00:00Z\\""},"orderBy":{"type":"json","required":false,"visibility":"user-or-llm","description":"Sort order: [\\"changedAt\\"] for oldest first (the default), [\\"-changedAt\\"] for newest first"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_investor_executive_connections":{"id":"affinity_list_investor_executive_connections","name":"Affinity List Investor Executive Connections","description":"Find warm paths into a company through investment history: which investors in your Affinity data backed a company the people you want to reach once led. Grouped by target, strongest first.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"filter":{"type":"string","required":true,"visibility":"user-or-llm","description":"Required scope. The only supported filter is target.currentCompany.id, e.g. \\"target.currentCompany.id=123\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of targets to return per page, 1-50. Defaults to 20"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_list_entries":{"id":"affinity_list_list_entries","name":"Affinity List List Entries","description":"Page through the rows of a list. Rows come back without field data unless Field IDs or Field Types asks for it.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"fieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs to return values for, e.g. [\\"affinity-data-location\\"]. Mutually exclusive with Field Types"},"fieldTypes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field categories to return values for: enriched, global, list, or relationship-intelligence. Mutually exclusive with Field IDs"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_list_entry_field_value_changes":{"id":"affinity_list_list_entry_field_value_changes","name":"Affinity List List Entry Field Value Changes","description":"Page through the history of one list row — who changed which field, when, and to what.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"listEntryId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list entry ID"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression over field.id, changer.id, changedAt, or actionType, e.g. \\"field.id=field-1234\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_list_entry_fields":{"id":"affinity_list_list_entry_fields","name":"Affinity List List Entry Fields","description":"Page through every field value on one list row, including the list-specific columns. All fields are returned unless narrowed.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"listEntryId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list entry ID"},"ids":{"type":"json","required":false,"visibility":"user-or-llm","description":"Restrict to these field IDs. Mutually exclusive with Field Types"},"types":{"type":"json","required":false,"visibility":"user-or-llm","description":"Restrict to these field categories: enriched, global, list, relationship-intelligence. Mutually exclusive with Field IDs"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 20"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_list_field_dropdown_options":{"id":"affinity_list_list_field_dropdown_options","name":"Affinity List List Field Dropdown Options","description":"List the selectable options on a dropdown, ranked-dropdown, or status-dropdown field of a list.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"fieldId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The dropdown field ID on that list"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_list_fields":{"id":"affinity_list_list_fields","name":"Affinity List List Fields","description":"List the fields available on one list, including its list-specific columns. Use these Field IDs when reading or writing list entries.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"includes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Extra properties to return: [\\"filterability\\",\\"sortability\\"]. Both are omitted unless requested here"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression. This endpoint filters on name only, e.g. \\"name=~Stage\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_lists":{"id":"affinity_list_lists","name":"Affinity List Lists","description":"Page through the lists in the organization that the caller can view.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"term":{"type":"string","required":false,"visibility":"user-or-llm","description":"Case-insensitive substring match on the list name"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_meetings":{"id":"affinity_list_meetings","name":"Affinity List Meetings","description":"Page through past and upcoming meetings with their organizer and attendees.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression, e.g. \\"createdAt>=2026-01-01\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_merge_tasks":{"id":"affinity_list_merge_tasks","name":"Affinity List Merge Tasks","description":"Page through merge tasks, each summarizing how many of its merges are in progress, succeeded, or failed.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which merge tasks to list: companies or persons"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression. This endpoint filters on status only, e.g. \\"status=in-progress\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_merges":{"id":"affinity_list_merges","name":"Affinity List Merges","description":"Page through the company or person merges the organization has run, with the status and the records involved in each.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which merges to list: companies or persons"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression over status or taskId, e.g. \\"status=failed\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_note_attached_companies":{"id":"affinity_list_note_attached_companies","name":"Affinity List Note Attached Companies","description":"List the companies directly attached to one note.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"noteId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The note ID"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_note_attached_opportunities":{"id":"affinity_list_note_attached_opportunities","name":"Affinity List Note Attached Opportunities","description":"List the opportunities directly attached to one note.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"noteId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The note ID"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_note_attached_persons":{"id":"affinity_list_note_attached_persons","name":"Affinity List Note Attached Persons","description":"List the persons directly attached to one note.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"noteId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The note ID"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_note_replies":{"id":"affinity_list_note_replies","name":"Affinity List Note Replies","description":"Page through the replies on one note, including AI Notetaker replies.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"noteId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The note ID whose replies to read"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression, e.g. \\"createdAt>=2026-01-01\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_notes":{"id":"affinity_list_notes","name":"Affinity List Notes","description":"Page through every note the caller can see. Replies are excluded.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"includes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Extra properties to return, e.g. [\\"repliesCount\\",\\"personsPreview\\",\\"companiesPreview\\",\\"opportunitiesPreview\\"]. Those four fields are omitted unless requested here"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression, e.g. \\"createdAt>=2026-01-01\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_opportunities":{"id":"affinity_list_opportunities","name":"Affinity List Opportunities","description":"Page through opportunities. Field data lives on the list entry, not here — read it through the list or saved view the opportunity belongs to.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"ids":{"type":"json","required":false,"visibility":"user-or-llm","description":"Restrict the page to these opportunity IDs, e.g. [1, 2, 3]"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_persons":{"id":"affinity_list_persons","name":"Affinity List Persons","description":"Page through persons. Persons come back without field data unless Field IDs or Field Types asks for it.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"ids":{"type":"json","required":false,"visibility":"user-or-llm","description":"Restrict the page to these person IDs, e.g. [1, 2, 3]"},"fieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs to return values for, e.g. [\\"affinity-data-location\\"]. Mutually exclusive with Field Types"},"fieldTypes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field categories to return values for: enriched, global, or relationship-intelligence. Mutually exclusive with Field IDs"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_reminders":{"id":"affinity_list_reminders","name":"Affinity List Reminders","description":"Page through the reminders the caller can see. Filter by status to surface what is overdue.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression, e.g. \\"createdAt>=2026-01-01\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_saved_view_entries":{"id":"affinity_list_saved_view_entries","name":"Affinity List Saved View Entries","description":"Page through the rows of a saved view. The view\'s own filters and columns decide which rows and which field data come back.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"viewId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The saved view ID"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_saved_views":{"id":"affinity_list_saved_views","name":"Affinity List Saved Views","description":"List the saved views on a list that the caller can view.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_transcript_fragments":{"id":"affinity_list_transcript_fragments","name":"Affinity List Transcript Fragments","description":"Page through everything said in a meeting, segment by segment with the speaker.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"transcriptId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The transcript ID"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_transcripts":{"id":"affinity_list_transcripts","name":"Affinity List Transcripts","description":"Page through meeting transcript metadata. Read one transcript to get what was actually said.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression, e.g. \\"createdAt>=2026-01-01\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_list_users":{"id":"affinity_list_users","name":"Affinity List Users","description":"Page through the internal users in the organization. Email addresses and roles are returned only to callers with the \\"Manage Users\\" permission.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"term":{"type":"string","required":false,"visibility":"user-or-llm","description":"Case-insensitive match across first name, last name, and primary email"},"filter":{"type":"string","required":false,"visibility":"user-or-llm","description":"Affinity Filtering Language expression over id or status, e.g. \\"status=active\\""},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_search_companies":{"id":"affinity_search_companies","name":"Affinity Search Companies","description":"Search companies by filters, sorts, and a free-text term. Requires the \\"Export All Organizations directory\\" permission.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"filters":{"type":"json","required":false,"visibility":"user-or-llm","description":"Filter group as {operator: \\"and\\"|\\"or\\", filters: [...]}, at most 50 leaves. Each leaf is {valueType, fieldId, operator, value}, and a leaf may itself be a nested group"},"searchTerm":{"type":"string","required":false,"visibility":"user-or-llm","description":"Free-text term matched against the searchable fields. At least 3 characters"},"searchFieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs the search term is matched against. Defaults to the searchable fields"},"sorts":{"type":"json","required":false,"visibility":"user-or-llm","description":"Sort order as [{fieldId, direction: \\"asc\\"|\\"desc\\", attributeId?}], up to 5, applied in order"},"fieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs to return values for, e.g. [\\"affinity-data-location\\"]. Mutually exclusive with Field Types"},"fieldTypes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field categories to return values for: enriched, global, or relationship-intelligence. Mutually exclusive with Field IDs"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_search_files":{"id":"affinity_search_files","name":"Affinity Search Files","description":"Search files by keyword, ordered by relevance. Narrow to specific files or to one company, or leave both unset to search the whole account.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"prompt":{"type":"string","required":true,"visibility":"user-or-llm","description":"What to search for. Between 3 and 500 characters"},"ids":{"type":"json","required":false,"visibility":"user-or-llm","description":"Restrict the search to these file IDs. Cannot be combined with Company ID"},"companyId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Restrict the search to one company\'s files. Cannot be combined with file IDs"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of files to return, 1-100. Defaults to 20"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_search_list_entries":{"id":"affinity_search_list_entries","name":"Affinity Search List Entries","description":"Search the rows of one list by filters, sorts, and a free-text term. Requires the \\"Export data from Lists\\" permission.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID to search"},"filters":{"type":"json","required":false,"visibility":"user-or-llm","description":"Filter group as {operator: \\"and\\"|\\"or\\", filters: [...]}, at most 50 leaves. Each leaf is {valueType, fieldId, operator, value}, and a leaf may itself be a nested group"},"searchTerm":{"type":"string","required":false,"visibility":"user-or-llm","description":"Free-text term matched against the searchable fields. At least 3 characters"},"searchFieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs the search term is matched against. Defaults to the searchable fields"},"sorts":{"type":"json","required":false,"visibility":"user-or-llm","description":"Sort order as [{fieldId, direction: \\"asc\\"|\\"desc\\", attributeId?}], up to 5, applied in order"},"fieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs to return values for, e.g. [\\"affinity-data-location\\"]. Mutually exclusive with Field Types"},"fieldTypes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field categories to return values for: enriched, global, list, or relationship-intelligence. Mutually exclusive with Field IDs"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_search_notes":{"id":"affinity_search_notes","name":"Affinity Search Notes","description":"Search notes by keyword, ordered by relevance. Narrow to specific notes or to one company, or leave both unset to search the whole account.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"prompt":{"type":"string","required":true,"visibility":"user-or-llm","description":"What to search for. Between 3 and 500 characters"},"ids":{"type":"json","required":false,"visibility":"user-or-llm","description":"Restrict the search to these note IDs. Cannot be combined with Company ID"},"companyId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Restrict the search to one company\'s notes. Cannot be combined with note IDs"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of notes to return, 1-100. Defaults to 20"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_search_persons":{"id":"affinity_search_persons","name":"Affinity Search Persons","description":"Search persons by filters, sorts, and a free-text term. Requires the \\"Export All People directory\\" permission.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"filters":{"type":"json","required":false,"visibility":"user-or-llm","description":"Filter group as {operator: \\"and\\"|\\"or\\", filters: [...]}, at most 50 leaves. Each leaf is {valueType, fieldId, operator, value}, and a leaf may itself be a nested group"},"searchTerm":{"type":"string","required":false,"visibility":"user-or-llm","description":"Free-text term matched against the searchable fields. At least 3 characters"},"searchFieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs the search term is matched against. Defaults to the searchable fields"},"sorts":{"type":"json","required":false,"visibility":"user-or-llm","description":"Sort order as [{fieldId, direction: \\"asc\\"|\\"desc\\", attributeId?}], up to 5, applied in order"},"fieldIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field IDs to return values for, e.g. [\\"affinity-data-location\\"]. Mutually exclusive with Field Types"},"fieldTypes":{"type":"json","required":false,"visibility":"user-or-llm","description":"Field categories to return values for: enriched, global, or relationship-intelligence. Mutually exclusive with Field IDs"},"cursor":{"type":"string","required":false,"visibility":"user-or-llm","description":"Cursor from a previous page, returned as nextCursor or prevCursor"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Number of items to return per page, 1-100. Defaults to 100"},"totalCount":{"type":"boolean","required":false,"visibility":"user-or-llm","description":"Include the total size of the collection. Costs an extra query"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_semantic_search":{"id":"affinity_semantic_search","name":"Affinity Semantic Search","description":"Find companies from a description in plain language — industry, technology, stage, or business model. Currently searches companies only.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"prompt":{"type":"string","required":true,"visibility":"user-or-llm","description":"What to look for, in plain language, e.g. \\"climate tech companies in our pipeline\\". Up to 500 characters"},"listIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Restrict the search to companies on these lists, e.g. [1, 2]"},"limit":{"type":"number","required":false,"visibility":"user-or-llm","description":"Maximum number of companies to return, 1-100. Defaults to 100"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_update_entity_field_value":{"id":"affinity_update_entity_field_value","name":"Affinity Update Entity Field Value","description":"Write one non-list field value on a company or person. The value type must match how the field is defined.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"entityType":{"type":"string","required":true,"visibility":"user-or-llm","description":"Which entity to write the field on: companies or persons"},"entityId":{"type":"string","required":true,"visibility":"user-or-llm","description":"ID of that company or person"},"fieldId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The field ID to write"},"value":{"type":"json","required":true,"visibility":"user-or-llm","description":"The new value as {type, data}, where type matches the field\'s value type. Examples: {\\"type\\":\\"text\\",\\"data\\":\\"Series B\\"}, {\\"type\\":\\"number\\",\\"data\\":42}, {\\"type\\":\\"dropdown\\",\\"data\\":{\\"dropdownOptionId\\":7}}, {\\"type\\":\\"person\\",\\"data\\":{\\"id\\":123}}, {\\"type\\":\\"person-multi\\",\\"data\\":[{\\"id\\":123}]}. Pass data as null to clear the field"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_update_list_entry_field":{"id":"affinity_update_list_entry_field","name":"Affinity Update List Entry Field","description":"Write one field value on a list row. Requires the \\"Export data from Lists\\" permission.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"listEntryId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list entry ID"},"fieldId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The field ID to write"},"value":{"type":"json","required":true,"visibility":"user-or-llm","description":"The new value as {type, data}, where type matches the field\'s value type. Examples: {\\"type\\":\\"text\\",\\"data\\":\\"Series B\\"}, {\\"type\\":\\"number\\",\\"data\\":42}, {\\"type\\":\\"dropdown\\",\\"data\\":{\\"dropdownOptionId\\":7}}, {\\"type\\":\\"person\\",\\"data\\":{\\"id\\":123}}, {\\"type\\":\\"person-multi\\",\\"data\\":[{\\"id\\":123}]}. Pass data as null to clear the field"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_update_list_field_dropdown_option":{"id":"affinity_update_list_field_dropdown_option","name":"Affinity Update List Field Dropdown Option","description":"Change a dropdown option on a list field. Every field is optional — supply only what should change, and only fields the option\'s kind actually has.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"listId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The list ID"},"fieldId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The dropdown field ID on that list"},"dropdownOptionId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The dropdown option ID to update"},"text":{"type":"string","required":false,"visibility":"user-or-llm","description":"Replacement option label. Supply at least one field to change"},"rank":{"type":"number","required":false,"visibility":"user-or-llm","description":"Sort order. Required on a ranked-dropdown or status-dropdown option"},"color":{"type":"string","required":false,"visibility":"user-or-llm","description":"Option color: white, gray, blue, green, purple, orange, or red. Required on a ranked-dropdown or status-dropdown option"},"statusCategory":{"type":"string","required":false,"visibility":"user-or-llm","description":"Pipeline meaning of the option: open, won, lost, or on-hold. Status-dropdown options only"},"winRate":{"type":"number","required":false,"visibility":"user-or-llm","description":"Expected win rate of the status. Status-dropdown options only"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"affinity_update_note":{"id":"affinity_update_note","name":"Affinity Update Note","description":"Rewrite a note\'s body or replace which records it is attached to. Each list of IDs replaces that association wholesale, an empty list clears it, and omitting one leaves it untouched. A note\'s type cannot be changed.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Affinity API key, sent as a bearer token"},"noteId":{"type":"string","required":true,"visibility":"user-or-llm","description":"The note ID to update"},"html":{"type":"string","required":false,"visibility":"user-or-llm","description":"Replacement note body as HTML"},"companyIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Replacement set of attached companies, e.g. [1, 2]. Send [] to detach every company; omit to leave them unchanged"},"personIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Replacement set of attached persons, e.g. [1, 2]. Send [] to detach every person; omit to leave them unchanged"},"opportunityIds":{"type":"json","required":false,"visibility":"user-or-llm","description":"Replacement set of attached opportunities, e.g. [1, 2]. Send [] to detach every opportunity; omit to leave them unchanged"}},"oauth":{"required":false,"provider":"affinity","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentmail","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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."}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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."}},"oauth":{"required":false,"provider":"agentphone","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"hostedApiKey":"none"},"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"}},"hostedApiKey":"none"},"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"}},"hostedApiKey":"none"},"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\\"})"}},"hostedApiKey":"none"},"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"}},"hostedApiKey":"none"},"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\\")"}},"hostedApiKey":"none"},"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"}},"hostedApiKey":"none"},"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."}},"hostedApiKey":"none"},"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"}},"hostedApiKey":"none"},"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"}},"hostedApiKey":"none"},"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)"}},"hostedApiKey":"none"},"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)"}},"hostedApiKey":"none"},"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\\")"}},"hostedApiKey":"none"},"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\\")"}},"hostedApiKey":"none"},"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."}},"hostedApiKey":"none"},"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."}},"hostedApiKey":"none"},"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\\"})"}},"hostedApiKey":"none"},"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."}},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"ahrefs","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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."}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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\\"."}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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)"}},"oauth":{"required":false,"provider":"algolia","credentialKind":"service-account","credentialParams":{"applicationId":"providerWorkspaceId","apiKey":"accessToken"},"credentialSuppliedParams":["applicationId","apiKey"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","secretKey":"accessToken","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","secretKey","dataResidency"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","secretKey":"accessToken","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","secretKey","dataResidency"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","secretKey":"accessToken","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","secretKey","dataResidency"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","secretKey":"accessToken","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","secretKey","dataResidency"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","dataResidency"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","dataResidency"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","secretKey":"accessToken","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","secretKey","dataResidency"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","secretKey":"accessToken","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","secretKey","dataResidency"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","secretKey":"accessToken","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","secretKey","dataResidency"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","dataResidency"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","secretKey":"accessToken","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","secretKey","dataResidency"]},"hostedApiKey":"none"},"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":{"apiKey":{"type":"string","required":false,"visibility":"user-only","description":"Amplitude API Key. With it, the request authenticates with both keys over Basic auth"},"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)"}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","secretKey":"accessToken"},"credentialSuppliedParams":["apiKey","secretKey"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"amplitude","credentialKind":"service-account","credentialParams":{"apiKey":"providerWorkspaceId","secretKey":"accessToken","dataResidency":"domain"},"credentialSuppliedParams":["apiKey","secretKey","dataResidency"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"apify","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"apify","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"apify_run_actor_async":{"id":"apify_run_actor_async","name":"APIFY Run Actor (Async)","description":"Start an APIFY Actor run and poll it within the same workflow step until completion or the polling deadline","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\\""}},"oauth":{"required":false,"provider":"apify","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"apify","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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\\""}},"oauth":{"required":false,"provider":"apify","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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)"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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."}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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)"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"apollo_contact_search":{"id":"apollo_contact_search","name":"Apollo Search Contacts","description":"Search your team\'s contacts in Apollo","version":"1.0.0","params":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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)"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Apollo API key (master key required)"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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\\")"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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)"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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\\"])"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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\\")"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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)"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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)"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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)"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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)"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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)"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"apollo_task_search":{"id":"apollo_task_search","name":"Apollo Search Tasks","description":"Search for tasks in Apollo","version":"1.0.0","params":{"credentialType":{"type":"string","required":false,"visibility":"hidden","description":"Stored credential type supplied by credential resolution"},"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)"}},"oauth":{"required":false,"provider":"apollo","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"],"authoritativeParams":["credentialType"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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"}},"oauth":{"required":false,"provider":"aws","credentialKind":"service-account","credentialSuppliedParams":["accessKeyId","secretAccessKey","awsAccessKeyId","awsSecretAccessKey"]},"hostedApiKey":"none"},"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)"}},"hostedApiKey":"none"},"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\\")"}},"hostedApiKey":"none"},"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)"}},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"hostedApiKey":"none"},"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"},"onBehalfOfUserId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Active Ashby user UUID to attribute this mutation to; the API key must permit on-behalf-of calls"},"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"}},"oauth":{"required":false,"provider":"ashby","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"ashby_anonymize_candidate":{"id":"ashby_anonymize_candidate","name":"Ashby Anonymize Candidate","description":"Remove personally identifiable information from an Ashby candidate while retaining the candidate record and its applications. This operation does not delete the candidate. Requires the candidatesWrite permission.","version":"1.0.0","params":{"apiKey":{"type":"string","required":true,"visibility":"user-only","description":"Ashby API Key"},"onBehalfOfUserId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Active Ashby user UUID to attribute this mutation to; the API key must permit on-behalf-of calls"},"candidateId":{"type":"string","required":true,"visibility":"user-or-llm","description":"UUID of the candidate to anonymize"}},"oauth":{"required":false,"provider":"ashby","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"},"onBehalfOfUserId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Active Ashby user UUID to attribute this mutation to; the API key must permit on-behalf-of calls"},"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."}},"oauth":{"required":false,"provider":"ashby","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"},"onBehalfOfUserId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Active Ashby user UUID to attribute this mutation to; the API key must permit on-behalf-of calls"},"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"},"archiveEmail":{"type":"json","required":false,"visibility":"user-or-llm","description":"Archive email configuration with communicationTemplateId and optional sendAt ISO 8601 timestamp. Pass null or omit to send no archive email."}},"oauth":{"required":false,"provider":"ashby","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"},"onBehalfOfUserId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Active Ashby user UUID to attribute this mutation to; the API key must permit on-behalf-of calls"},"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, or FirstPreInterviewScreen (defaults to the 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)"},"applicationHistory":{"type":"json","required":false,"visibility":"user-or-llm","description":"Optional documented application history entries to create with the application"}},"oauth":{"required":false,"provider":"ashby","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"},"onBehalfOfUserId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Active Ashby user UUID to attribute this mutation to; the API key must permit on-behalf-of calls"},"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\\"]"},"location":{"type":"json","required":false,"visibility":"user-or-llm","description":"Candidate location object with optional city, region, and country"}},"oauth":{"required":false,"provider":"ashby","credentialKind":"service-account","credentialParams":{"apiKey":"accessToken"},"credentialSuppliedParams":["apiKey"]},"hostedApiKey":"none"},"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"},"onBehalfOfUserId":{"type":"string","required":false,"visibility":"user-or-llm","description":"Active Ashby user UUID to attribute this mutation to; the API key must permit on-behalf-of calls"},"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: , , , ,