Skip to main content
Glama
SK-DEV-AI

codesearch MCP Server

by SK-DEV-AI

code_files

Lists source files in an indexed npm, PyPI, or crates package by package-scoped path, with optional path-prefix filtering for source navigation.

Instructions

List files in an indexed dependency by package-scoped path (e.g. npm:express/src/). PkgSeer + jsDelivr; indexes npm/pypi/crates ONLY (github: specs rejected). e.g. code_files(spec='npm:express')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYesPackage spec: registry:name[@version] (e.g. npm:express, pypi:requests)
path_prefixNoOptional path prefix filter (e.g. src/)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the backing sources (PkgSeer + jsDelivr) and the registry restriction, and 'List' implies a read-only operation. However it says nothing about recursion depth, pagination/truncation for large packages, or auth/rate-limit behavior, which matters for a listing tool.

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 short clauses, front-loaded with the action and resource, then constraints, then an example. No filler sentences; every phrase carries information.

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?

For a two-parameter listing tool with full schema coverage and no output schema, the core invocation info is present. The remaining gaps — whether listing is recursive, how results are shaped or limited, and what an empty result means — leave the agent guessing at behavior after the call.

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 both parameters are already documented; the description only reinforces them via the example 'code_files(spec='npm:express')' and the 'npm:express/src/' path form. That illustrates how spec and path combine but adds little beyond the schema text.

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 and resource — 'List files in an indexed dependency' — and scopes it to a package path, with a concrete example call. It is distinguishable from siblings like code_read or searchcode by being a directory-listing operation over an indexed package, though it never explicitly contrasts itself with those tools.

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?

'indexes npm/pypi/crates ONLY (github: specs rejected)' is an explicit exclusion that prevents a whole class of wrong calls. What is missing is the positive routing: nothing says to use code_read for file contents or searchcode for content search, so the agent must infer the alternative.

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