@@ -188,21 +188,21 @@ agentcore add gateway \
188188
189189### add gateway-target
190190
191- Add a gateway target to the project. Targets are backend tools exposed through a gateway as an external MCP server
192- endpoint .
191+ Add a gateway target to the project. Targets are backend tools exposed through a gateway. Supports five target types:
192+ ` mcp-server ` , ` api-gateway ` , ` open-api-schema ` , ` smithy-model ` , and ` lambda-function-arn ` .
193193
194194``` bash
195195# Interactive mode (select 'Gateway Target' from the menu)
196196agentcore add
197197
198- # External MCP server endpoint
198+ # MCP Server endpoint
199199agentcore add gateway-target \
200200 --name WeatherTools \
201201 --type mcp-server \
202202 --endpoint https://mcp.example.com/mcp \
203203 --gateway MyGateway
204204
205- # External endpoint with OAuth outbound auth
205+ # MCP Server with OAuth outbound auth
206206agentcore add gateway-target \
207207 --name SecureTools \
208208 --type mcp-server \
@@ -212,22 +212,69 @@ agentcore add gateway-target \
212212 --oauth-client-id my-client \
213213 --oauth-client-secret my-secret \
214214 --oauth-discovery-url https://auth.example.com/.well-known/openid-configuration
215+
216+ # API Gateway REST API
217+ agentcore add gateway-target \
218+ --name PetStore \
219+ --type api-gateway \
220+ --rest-api-id abc123 \
221+ --stage prod \
222+ --tool-filter-path ' /pets/*' \
223+ --tool-filter-methods GET,POST \
224+ --gateway MyGateway
225+
226+ # OpenAPI Schema (auto-derive tools from spec)
227+ agentcore add gateway-target \
228+ --name PetStoreAPI \
229+ --type open-api-schema \
230+ --schema specs/petstore.json \
231+ --gateway MyGateway \
232+ --outbound-auth oauth \
233+ --credential-name MyOAuth
234+
235+ # Smithy Model (auto-derive tools from model)
236+ agentcore add gateway-target \
237+ --name MyService \
238+ --type smithy-model \
239+ --schema models/service.json \
240+ --gateway MyGateway
241+
242+ # Lambda Function ARN
243+ agentcore add gateway-target \
244+ --name MyLambdaTools \
245+ --type lambda-function-arn \
246+ --lambda-arn arn:aws:lambda:us-east-1:123456789012:function:my-func \
247+ --tool-schema-file tools.json \
248+ --gateway MyGateway
215249```
216250
217- | Flag | Description |
218- | -------------------------------- | ----------------------------------------------- |
219- | ` --name <name> ` | Target name |
220- | ` --description <desc> ` | Target description |
221- | ` --type <type> ` | Target type (required): ` mcp-server ` |
222- | ` --endpoint <url> ` | MCP server endpoint URL |
223- | ` --gateway <name> ` | Gateway to attach target to |
224- | ` --outbound-auth <type> ` | ` oauth ` , ` api-key ` , or ` none ` |
225- | ` --credential-name <name> ` | Existing credential name for outbound auth |
226- | ` --oauth-client-id <id> ` | OAuth client ID (creates credential inline) |
227- | ` --oauth-client-secret <secret> ` | OAuth client secret (creates credential inline) |
228- | ` --oauth-discovery-url <url> ` | OAuth discovery URL (creates credential inline) |
229- | ` --oauth-scopes <scopes> ` | OAuth scopes, comma-separated |
230- | ` --json ` | JSON output |
251+ | Flag | Description |
252+ | --------------------------------- | ------------------------------------------------------------------------------------------------------------- |
253+ | ` --name <name> ` | Target name |
254+ | ` --description <desc> ` | Target description |
255+ | ` --type <type> ` | Target type (required): ` mcp-server ` , ` api-gateway ` , ` open-api-schema ` , ` smithy-model ` , ` lambda-function-arn ` |
256+ | ` --endpoint <url> ` | MCP server endpoint URL (mcp-server) |
257+ | ` --language <lang> ` | Language hint for MCP server (mcp-server) |
258+ | ` --host <host> ` | Host header override (mcp-server) |
259+ | ` --gateway <name> ` | Gateway to attach target to |
260+ | ` --outbound-auth <type> ` | ` oauth ` , ` api-key ` , or ` none ` (mcp-server, api-gateway, open-api-schema) |
261+ | ` --credential-name <name> ` | Existing credential name for outbound auth |
262+ | ` --oauth-client-id <id> ` | OAuth client ID (creates credential inline) |
263+ | ` --oauth-client-secret <secret> ` | OAuth client secret (creates credential inline) |
264+ | ` --oauth-discovery-url <url> ` | OAuth discovery URL (creates credential inline) |
265+ | ` --oauth-scopes <scopes> ` | OAuth scopes, comma-separated |
266+ | ` --rest-api-id <id> ` | API Gateway REST API ID (api-gateway) |
267+ | ` --stage <stage> ` | API Gateway stage name (api-gateway) |
268+ | ` --tool-filter-path <path> ` | Filter API paths, supports wildcards (api-gateway) |
269+ | ` --tool-filter-methods <methods> ` | Comma-separated HTTP methods to expose (api-gateway) |
270+ | ` --schema <path> ` | Path to schema file, relative to project root (open-api-schema, smithy-model) |
271+ | ` --schema-s3-account <account> ` | AWS account for S3-hosted schema (open-api-schema, smithy-model) |
272+ | ` --lambda-arn <arn> ` | Lambda function ARN (lambda-function-arn) |
273+ | ` --tool-schema-file <path> ` | Tool schema file, relative to project root or absolute path (lambda-function-arn) |
274+ | ` --json ` | JSON output |
275+
276+ > ** Note** : ` smithy-model ` and ` lambda-function-arn ` use IAM role auth and do not support ` --outbound-auth ` .
277+ > ` open-api-schema ` requires ` --outbound-auth ` (` oauth ` or ` api-key ` ). ` api-gateway ` supports ` api-key ` or ` none ` .
231278
232279### add identity
233280
0 commit comments