Skip to main content
Glama

analyze_function

Analyzes a Lambda function to identify infrastructure issues: table queries, queue publishing, secret access, and trigger event shapes. Provides findings for writing or reviewing handlers.

Instructions

Analyzes a single named function or Lambda handler for infrastructure issues: which tables it queries, how it queries them (scan vs query), queue publishing, secret access, and the correct event shape for each trigger (SQS, DynamoDB Streams, Kinesis, EventBridge). Call this before writing or reviewing a Lambda handler to get the exact trigger event shape and all findings scoped to this function. Returns found: false if the function name was not discovered during analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
functionYesFunction name to analyze
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Details all analysis aspects (tables, scan/query, queues, secrets, event shape) and mentions 'found: false' behavior. No annotations present, so description fully handles transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise, front-loaded with purpose, and every sentence adds value. No redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, description covers all key aspects: what is analyzed, when to use, and edge case behavior. Complete for an analysis tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Single parameter 'function' has a schema description. Tool description adds context that it refers to a named function or Lambda handler, providing extra meaning beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool analyzes a single Lambda function for infrastructure issues including table queries, scan vs query, queue publishing, secret access, and event shape. This distinguishes it from siblings like get_lambda_overview.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to call: 'before writing or reviewing a Lambda handler' and notes the return behavior for missing functions. Provides clear usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sidd27/infrawise'

If you have feedback or need assistance with the MCP directory API, please join our Discord server