Skip to main content
Glama

read_symbol

Read-only

Extract specific code symbols like functions or classes from multiple file formats using streaming for efficient performance.

Instructions

Find and extract symbol block by name from files, supports a lot of file formats (like TS, JS, GraphQL, CSS and most that use braces for blocks). Uses streaming with concurrency control for better performance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolsYesSymbol name(s) to find (functions, classes, types, etc.), case-sensitive, supports * for wildcard
file_pathsNoFile paths to search (supports relative and glob). Defaults to "." (current directory). IMPORTANT: Be specific with paths when possible, minimize broad patterns like "node_modules/**" to avoid mismatches
limitNoMaximum number of results to return. Defaults to 5
optimizeNoUnless explicitly false, this tool will strip comments and spacing to preserve AI's context window, omit unless you REALLY it unchanged (default: true)
Behavior3/5

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

Annotations indicate readOnlyHint=true and openWorldHint=false, confirming this is a safe read operation with limited scope. The description adds value by mentioning streaming with concurrency control for performance and the ability to handle multiple file formats, but it does not disclose details like rate limits, authentication needs, or error handling beyond what annotations provide.

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 front-loaded with the core purpose in the first sentence, followed by supporting details in a second sentence. It avoids unnecessary elaboration, though the second sentence could be slightly more concise by integrating performance notes more tightly.

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

Completeness3/5

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

Given the tool's complexity (4 parameters, no output schema) and rich annotations, the description is adequate but lacks details on return values, error cases, or examples of symbol extraction. It covers the what and how but not the full behavioral context needed for optimal agent use.

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?

Schema description coverage is 100%, so the schema fully documents all four parameters. The description does not add specific meaning or usage details beyond the schema, such as explaining wildcard patterns in 'symbols' or performance implications of 'optimize'. Baseline 3 is appropriate as the schema handles the heavy lifting.

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 specific action ('Find and extract symbol block by name from files') and resource ('files'), with explicit mention of supported file formats (TS, JS, GraphQL, CSS, etc.). It distinguishes itself from sibling tools like 'insert_text' and 'os_notification' by focusing on symbol extraction rather than text insertion or OS notifications.

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 provides clear context for when to use this tool—for extracting symbol blocks from various file formats using streaming with concurrency control. However, it does not explicitly state when not to use it or name alternatives, such as using 'insert_text' for adding content instead of reading it.

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/OrionPotter/flesler-mcp-tools'

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