Skip to main content
Glama
liminalpepe

x402-codesearch-mcp

by liminalpepe

Index Code

index_code

Chunk and embed repository files into a semantic code search index, making them searchable by repoId. Free and unauthenticated.

Instructions

Index a repo's files into the live x402-codesearch Worker (https://x402-codesearch-poc.theliminalguy.workers.dev) so they become semantically searchable: each file is chunked, embedded via Workers AI, and upserted into that repoId's Vectorize index. Free, unauthenticated MCP tool — no payment required to index. IMPORTANT: this tool only calls the free POST /index endpoint. The matching semantic search step (POST /search on the same Worker) is real but x402-gated at $0.01 USDC on Base per query, and depends on Cloudflare Vectorize + Workers AI bindings that have no free or local equivalent — so it is NOT exposed here. To actually search a repo you've indexed with this tool, call POST https://x402-codesearch-poc.theliminalguy.workers.dev/search directly with an x402-aware HTTP client (e.g. x402-fetch / x402-axios) and a funded Base wallet, passing { repoId, query }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesOne or more files to index for this repoId
repoIdYesIdentifier to group this repo's indexed chunks under, e.g. "my-repo" or "owner/repo"
Behavior4/5

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

With no annotations, the description carries the burden; it discloses the exact operation (chunk, embed, upsert), that it is unauthenticated and free, and warns that search is gated and requires external dependencies. It does not mention potential behavior like idempotency or overwriting existing chunks, but overall provides substantial transparency.

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?

The description is front-loaded with the core action and efficiently covers the important caveats. The extensive explanation of the external search endpoint and x402 dependency is relevant but somewhat lengthy; still, every sentence contributes to correct 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?

The description covers the tool's role in a broader pipeline, clarifies limitations (no search), and provides alternative invocation guidance. It omits the return value/response format, but for an indexing tool with no output schema, the provided context is largely sufficient.

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% with both repoId and files described in the schema. The description does not add syntax or format details beyond the schema, though it does explain the end-to-end processing (chunked, embedded, upserted), leaving the schema as the primary documentation.

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 explicitly states the tool indexes repo files into a specific Worker and makes them semantically searchable, detailing chunking/embedding/upserting. It distinguishes itself from search by stating this tool only calls the free POST /index endpoint.

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?

It clearly explains when to use this tool (for indexing) and when not to (for searching), explicitly noting the search endpoint is not exposed and directing users to call POST /search directly with an x402-aware client. It also mentions it is free and unauthenticated.

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/liminalpepe/x402-codesearch-mcp'

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