Skip to main content
Glama

analyze_function

Analyze a Lambda function to detect infrastructure issues: query patterns, queue publishing, secret access, and trigger event shape validation. Returns scoped findings.

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
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions that the tool returns 'found: false' if the function is not discovered, offering some transparency. However, it does not disclose whether the tool is read-only, has side effects, or requires specific permissions, leaving behavioral gaps.

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

Conciseness4/5

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

The description is concise and front-loaded with the main purpose. It could be improved with bullet points for readability, but it avoids unnecessary words and is efficiently written.

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

Completeness4/5

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

Given the simple single-parameter tool and no output schema, the description provides sufficient context: what it analyzes, when to use it, and a note on return (found: false). It lacks explicit output structure details but covers core functionality well.

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

Parameters3/5

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

The input schema has one parameter with a clear description. The tool description does not add significant new meaning beyond the schema's 'Function name to analyze' but provides usage context. With 100% schema coverage, baseline is 3, and this description meets it without adding extra clarity on the parameter.

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?

The description clearly states the tool analyzes a single named function or Lambda handler for infrastructure issues, listing specific checks (tables, query methods, queue publishing, etc.). It distinguishes itself from sibling tools (e.g., get_lambda_overview) by focusing on detailed analysis with actionable findings.

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

Usage Guidelines4/5

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

The description explicitly advises to call this tool before writing or reviewing a Lambda handler, providing clear context. It does not explicitly exclude alternatives, but the guidance is sufficient for typical use.

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