Skip to main content
Glama
SK-DEV-AI

codesearch MCP Server

by SK-DEV-AI

code_search

Search code, docs, and symbols across npm/PyPI/crates packages or public repositories. Filter by language, source type, and qualifiers to find relevant implementations and API usage.

Instructions

Search code, docs, and symbols across indexed dependencies and public repositories. Package scope (npm:express, pypi:requests) via PkgSeer; global public-code search via Sourcegraph (keyless). Supports qualifiers like kind:, category:, lang:. e.g. code_search(query='handleAuth', target='npm:express')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoProgramming language filter
limitNoMax results (1-100)
queryYesSearch query supporting implicit AND, OR, parens, -exclude, and qualifiers (kind:, lang:, path:)
sourceNoRestrict results to a specific source type
targetNoPackage scope: registry:name[@version] (npm:express, pypi:requests, crates:serde). PkgSeer indexes npm/pypi/crates only. Omit target for global public-repo search via Sourcegraph (keyless). For single GitHub repos use `searchcode` (repository=URL) or `analyze`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral burden, and it does disclose useful traits: two backends, keyless Sourcegraph access, and that PkgSeer only covers npm/pypi/crates. However it says nothing about rate limits, result caps/pagination, latency, or what a result record contains, which matters for a multi-backend search.

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?

Three compact sentences plus a worked example, with the dual-scope distinction front-loaded. Every sentence contributes; the example earns its place by demonstrating the target syntax concretely.

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?

No output schema and no annotations, so the description must cover everything. It explains routing between backends well but leaves return-shape, result limits (beyond the schema's `limit` field), and ranking behavior unaddressed for what is effectively a federated search tool.

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 coverage is 100%, so the schema already documents `query`, `target`, `source`, `lang`, and `limit` thoroughly. The description adds a concrete call example and mentions qualifiers, though its `kind:`/`category:` list is a looser/partly divergent restatement of the schema's `kind:`/`lang:`/`path:` qualifiers. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Search') and resources (code, docs, symbols) with two distinct scopes: package-scoped indexes via PkgSeer and global public repos via Sourcegraph. It does not name alternative sibling tools in the description itself (the `searchcode`/`analyze` routing hint lives only in the schema's `target` field), so it stops short of full sibling differentiation.

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?

Clearly explains the selection rule between modes: supply `target` for package-scoped search, omit it for global public-repo search via the keyless Sourcegraph path. It also constrains PkgSeer to npm/pypi/crates, so the agent knows the boundary. No explicit 'use X instead' routing for siblings appears in the description text.

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