Skip to main content
Glama

add_workspace_folder

Add a directory to the LSP workspace to enable cross-repo references, definitions, and diagnostics across multiple repositories.

Instructions

Add a directory to the LSP workspace, enabling cross-repo references, definitions, and diagnostics. Useful when working across a library and its consumers — after adding the consumer repo, get_references on a library function returns call sites in both repos. Requires start_lsp to have been called first. Language servers that support multi-root workspaces (gopls, rust-analyzer, typescript-language-server) will re-index the new folder automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
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 adding a folder triggers automatic re-indexing for supported language servers, and implies it is non-destructive. Missing details on whether the folder must be valid or if it can be removed later, but the core behavior is covered.

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?

Three sentences, each adding value: purpose, use case with prerequisite, and automatic re-indexing behavior. Front-loaded with the key verb and resource. No unnecessary words.

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?

The tool has one parameter, no output schema, and no annotations. The description covers purpose, prerequisite, and a key behavioral trait (auto-reindexing). However, it omits edge cases like duplicate folders or invalid paths, and does not describe the return value or success/failure indicators.

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

Parameters2/5

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

The schema has 0% coverage (no parameter descriptions), so the description should compensate. It only mentions 'a directory' with no additional details about the 'path' parameter format (absolute/relative), validation, or consequences of invalid paths. This leaves the agent guessing.

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 action ('Add a directory') and the resource ('LSP workspace'), explaining the benefit of enabling cross-repo references. It distinguishes from sibling tools like 'list_workspace_folders' and 'remove_workspace_folder' by focusing on adding and the cross-repo use case.

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 a concrete use case ('working across a library and its consumers') with an example ('get_references on a library function returns call sites in both repos'). It also specifies a prerequisite ('Requires start_lsp to have been called first'). No explicit when-not-to-use or alternatives are given, but the context is clear.

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/blackwell-systems/agent-lsp'

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