Searches CDK code samples, examples, constructs, and patterns documentation. ## Usage This tool searches across CDK code samples, community constructs, and implementation patterns to find working examples and reusable components for your CDK projects. ## When to Use - Find working CDK code ex...
Accepts freeform code/query input (query)
Part of the AWS Infrastructure as Code MCP Server MCP server. Enforce policies on this tool with Intercept, the open-source MCP proxy.
AI agents call search_cdk_samples_and_constructs to retrieve information from AWS Infrastructure as Code MCP Server without modifying any data. This is common in research, monitoring, and reporting workflows where the agent needs context before taking action. Because read operations don't change state, they are generally safe to allow without restrictions -- but you may still want rate limits to control API costs.
Even though search_cdk_samples_and_constructs only reads data, uncontrolled read access can leak sensitive information or rack up API costs. An agent caught in a retry loop could make thousands of calls per minute. A rate limit gives you a safety net without blocking legitimate use.
Read-only tools are safe to allow by default. No rate limit needed unless you want to control costs.
tools:
search_cdk_samples_and_constructs:
rules:
- action: allow See the full AWS Infrastructure as Code MCP Server policy for all 8 tools.
Agents calling read-class tools like search_cdk_samples_and_constructs have been implicated in these attack patterns. Read the full case and prevention policy for each:
Other tools in the Read risk category across the catalogue. The same policy patterns (rate-limit, allow) apply to each.
Searches CDK code samples, examples, constructs, and patterns documentation. ## Usage This tool searches across CDK code samples, community constructs, and implementation patterns to find working examples and reusable components for your CDK projects. ## When to Use - Find working CDK code examples and samples - Look up implementation patterns for specific use cases - Get sample code for AWS service integrations - Research complete CDK application examples - Find L3 constructs created by the community - Discover construct documentation and usage patterns - Find architectural patterns and best practices ## Search Tips - Use exact phrases for specific patterns: "serverless API", "microservices architecture" - Combine services with boolean operators: "Lambda AND API Gateway", "S3 OR DynamoDB" - Exclude unwanted results: "TypeScript NOT Python", "L2 NOT L1" - Use wildcards for broader searches: "example*", "*pattern", "*construct" - Search for specific constructs: "aws-s3.Bucket", "aws-lambda.Function" - Include language preferences: "Python examples", "TypeScript patterns" - Target construct levels: "L3 constructs", "higher-level constructs" ## Language Filtering Specify your preferred programming language to get relevant examples: - typescript (default) - python - java - csharp - go ## Result Interpretation Returns JSON with: - knowledge_response: Details of the response - results: Array with single result containing: - rank: Search relevance ranking (1 = most relevant, higher is less relevant) - title: Document title or filename - url: Source URL of the document - context: Full or paginated document content - next_step_guidance: If present, suggested next actions to take for answering user query Use rank to prioritize results. Check error field first - if not null, the search failed. Args: query: Search query for CDK samples and constructs language: Programming language filter (default: "typescript") Returns: List of search results with URLs, titles, and context snippets. It is categorised as a Read tool in the AWS Infrastructure as Code MCP Server MCP Server, which means it retrieves data without modifying state.
Add a rule in your Intercept YAML policy under the tools section for search_cdk_samples_and_constructs. You can allow, deny, rate-limit, or validate arguments. Then run Intercept as a proxy in front of the AWS Infrastructure as Code MCP Server MCP server.
search_cdk_samples_and_constructs is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the search_cdk_samples_and_constructs rule in your Intercept policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the Intercept policy for search_cdk_samples_and_constructs. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
search_cdk_samples_and_constructs is provided by the AWS Infrastructure as Code MCP Server MCP server (awslabs.aws-iac-mcp-server). Intercept sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Deterministic policy on every MCP tool call. Per-identity grants. Full audit log.