Skip to main content
Glama
rajnaveen344

LSP Tools MCP Server

by rajnaveen344

LSP Tools MCP Server

A Model Context Protocol (MCP) server providing Language Server Protocol-like functionality for text analysis.

Features

  • Find Regex Position: Find the 0-indexed line and column positions of regex pattern matches in a file

  • List Allowed Directories: Get a list of directories the server is allowed to access

Related MCP server: TokenScope

Installation

npm install
npm run build

Usage

# Start the server allowing access to a specific directory
node dist/index.js /path/to/allowed/directory

# Start the server with multiple allowed directories
node dist/index.js /path/to/dir1 /path/to/dir2 /path/to/dir3

Development

Running Tests

The project uses Jest for testing. Run the tests with:

npm test

To run tests in watch mode during development:

npm run test:watch

Linting

Lint the code with ESLint:

npm run lint

Tool Documentation

find_regex_position

This tool finds the 0-indexed line and column positions of regex pattern matches in a file.

Parameters:

  • path: The path to the file to search in

  • regex: The regular expression pattern to search for

Returns:

  • An array of matches with the following properties:

    • match: The matched text

    • line: The starting line (0-indexed)

    • column: The starting column (0-indexed)

    • endLine: The ending line (0-indexed)

    • endColumn: The ending column (0-indexed, exclusive)

list_allowed_directories

This tool lists all directories that this server is allowed to access.

Parameters:

  • None

Returns:

  • An array of absolute paths to allowed directories

License

MIT

Available Tools

2 tools
find_regex_positionA

Find the positions (line and column) of regex pattern matches in a file. Returns an array of matches with their positions. Line and column numbers are 0-indexed (first line is 0). Each match includes: match (matched text), line (starting line), column (starting column), endLine (ending line), and endColumn (ending column, exclusive). IMPORTANT: The path parameter must be an absolute path. Relative paths are not supported.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the file to search in. Relative paths are not supported.
regexYesRegular expression pattern to search for

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the return format (array structure with specific fields), indexing convention (0-indexed), and path requirement (absolute only). It doesn't mention error handling, performance characteristics, or permission requirements, but provides substantial behavioral context.

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?

The description is efficiently structured with zero wasted sentences. It front-loads the core purpose, details the return format, and ends with the critical constraint. Every sentence adds essential information for tool understanding and usage.

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?

For a tool with 2 parameters, 100% schema coverage, and no output schema, the description provides excellent context about the return format and behavioral constraints. It could potentially mention error cases or performance considerations, but covers the essential information needed to use the tool effectively.

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 already documents both parameters thoroughly. The description reinforces the 'absolute path' requirement for the path parameter but doesn't add meaningful semantic context beyond what's in the schema. This meets the baseline for high schema coverage.

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 the positions of regex pattern matches'), resource ('in a file'), and output format ('Returns an array of matches with their positions'). It distinguishes itself from the sibling tool 'list_allowed_directories' by focusing on regex matching rather than directory listing.

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 (searching for regex matches in files) and includes an important constraint ('path parameter must be an absolute path'). However, it doesn't explicitly state when NOT to use it or mention alternatives to regex-based searching.

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

list_allowed_directoriesA

Lists all directories that this server is allowed to access. Use this to understand which paths are accessible before trying to access files. Returns an array of absolute paths to allowed directories.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.6/5.0
Behavior4/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 discloses that the tool returns 'an array of absolute paths to allowed directories,' which is useful behavioral context about the output format. However, it doesn't mention potential limitations like rate limits, permissions needed, or whether the list is cached.

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?

The description is two sentences with zero waste: the first states the purpose, and the second provides usage guidance and output details. It's front-loaded and efficiently structured.

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 tool's simplicity (0 parameters, no annotations, no output schema), the description is mostly complete. It explains what the tool does, when to use it, and the return format. However, without annotations or output schema, it could benefit from more behavioral details like error conditions or performance characteristics.

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?

The input schema has 0 parameters with 100% coverage, so the baseline is 4. The description appropriately doesn't add parameter information since none exist, maintaining focus on the tool's purpose and output.

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 ('Lists all directories') and resource ('that this server is allowed to access'), distinguishing it from the sibling tool 'find_regex_position' which appears unrelated to directory listing. It provides a complete picture of what the tool does.

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?

The description explicitly states when to use this tool: 'Use this to understand which paths are accessible before trying to access files.' This provides clear context and purpose for invocation, though it doesn't mention alternatives since the sibling tool is unrelated.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updates
    • First observedfind_regex_position
    • First observedlist_allowed_directories

TDQS

A4/5.0
Disambiguation5/5

The two tools have completely distinct purposes with no overlap. find_regex_position performs a specific text search operation on files, while list_allowed_directories provides metadata about server permissions. An agent would never confuse these tools as they serve fundamentally different functions in the workflow.

Naming Consistency4/5

Both tools follow a clear verb_noun naming pattern (find_regex_position, list_allowed_directories) with consistent snake_case formatting. The naming is logical and predictable, though with only two tools it's difficult to assess full consistency across a larger set.

Tool Count2/5

With only 2 tools, this server feels severely underpowered for an LSP (Language Server Protocol) context. LSP servers typically handle numerous language operations like diagnostics, completions, definitions, and references. This minimal toolset suggests either an incomplete implementation or a very narrow specialization that doesn't match typical LSP expectations.

Completeness2/5

For an LSP server, this toolset is severely incomplete. While the two provided tools are useful (file search and directory listing), they represent only a tiny fraction of expected LSP functionality. Missing are core language features like code completion, hover information, go-to-definition, references, diagnostics, formatting, and other standard LSP capabilities that agents would expect from such a server.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/rajnaveen344/lsp-tools-mcp'

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