Skip to main content
Glama

Search Code

search_code
Read-onlyIdempotent

Find implementations, usages, and patterns across ZK-Kit source code via GitHub Code Search, with optional filters for package and programming language.

Instructions

Search across ZK-Kit source code using GitHub Code Search. Find implementations, usages, and patterns. Optionally scope to a specific package for more relevant results.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesCode search query (e.g., 'PoseidonT3', 'function insert', 'pragma solidity')
packageNoScope search to a specific package (e.g., '@zk-kit/lean-imt', 'lean-imt')
languageNoFilter by programming language (e.g., 'typescript', 'solidity', 'rust')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, and openWorld, so safety is covered. The description adds the useful fact that results come from GitHub Code Search, implying GitHub query syntax and potentially incomplete/ranked results, but it does not disclose result limits, pagination, or rate-limit behavior that would matter for an open-world 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 short sentences, front-loaded with the action and backend, then the purpose, then the scoping option. No filler, though the middle sentence is somewhat redundant with the first.

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 simple three-parameter read-only search with no output schema, the definition is adequate. It is missing query-syntax expectations and any sense of result shape or volume, which are the main unknowns an agent faces when calling a code search.

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 description coverage is 100% with examples for all three parameters, so the baseline is 3. The description only restates the optional package scoping and adds no syntax or format meaning beyond the schema.

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?

The description names a specific verb and resource ('Search across ZK-Kit source code') and clarifies the mechanism (GitHub Code Search) plus the intent (implementations, usages, patterns). It is clearly distinct from retrieval siblings like get_package_source, though it does not explicitly name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Find implementations, usages, and patterns' implies the discovery use case, and the optional package scoping hints at when to narrow. However, there is no explicit when-not guidance and no named alternative for reading a whole file or package source, leaving the agent to infer the boundary with get_package_source.

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