Skip to main content
Glama
codemcp

agentic-knowledge

by codemcp

search_docs

Search documentation in available docsets using regex patterns. Returns file path, line number, matched content, and surrounding context for precise navigation.

Instructions

Search for documentation in available docsets. Returns file path, line number, matched content, and surrounding context lines.

📚 AVAILABLE DOCSETS: • mcp-typescript-sdk (MCP TypeScript SDK) - Official TypeScript SDK for Model Context Protocol • vitepress-docs (VitePress Documentation) - VitePress static site generator documentation • local-docs (Local Documentation) - Local documentation: ./docs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesThe search pattern (regex) to find in the documentation. Supports full regex syntax (e.g. "log.*Error", "function\s+\w+", "auth|login"). Returns file path, line number, matched line, and surrounding context lines. ⚠️ IMPORTANT: This is a regex pattern, NOT a list of keywords. Spaces are literal (match a space character). To search for multiple alternative terms, use | (pipe): e.g. "auth|login" matches lines containing either "auth" OR "login".
docset_idYesChoose the docset to search in.
context_linesNoNumber of lines to show before and after each matching line (default: 2). Set to 0 for just the matching lines, or increase for more context.
Behavior5/5

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

Since no annotations are provided, the description carries the full burden. It discloses the return format (file path, line number, matched content, context lines), the regex nature of the pattern with examples and warnings, and the available docsets. This goes beyond a simple generic description.

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 concise and front-loaded: it starts with the purpose, then lists available docsets. The regex explanation is detailed but necessary to prevent misuse, and every sentence adds value without 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?

With no output schema, the description explains return values (file path, line number, matched content, context lines). It also covers docset enumeration and regex nuances. For a search tool with 3 parameters, this is complete enough for an agent to invoke correctly.

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 schema already covers all parameters with descriptions (100% coverage), so the baseline is 3. The description adds extra value for the 'pattern' parameter by giving example regexes and warning that spaces are literal and to use '|' for alternatives, which is not fully captured in the 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?

The description clearly states the tool's purpose with a specific verb ('Search') and resource ('documentation in available docsets'), and it distinguishes itself from sibling tools (list_docsets, init_docset) by focusing on searching rather than listing or initializing.

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?

It provides clear context: search across available docsets, lists those docsets, and explains return format. It doesn't explicitly mention when not to use or alternative tools, but the context is clear enough an agent would know this is for searching docs, not for listing or initializing docsets.

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/codemcp/knowledge'

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