Skip to main content
Glama
pavelpikta

lampa-mcp-server

Search Lampa source contents

search_code
Read-onlyIdempotent

Search Lampa source contents for a literal or regex pattern to find matching path:line locations with previews; use when you know a symbol or pattern.

Instructions

Search Lampa source contents for a literal or regex and return path:line plus a preview. Use this when you know a symbol or pattern; do not use it to list files by name (find_files), dump catalogs (list_catalog), or read one known path (read_source). Defaults: literal, case-sensitive match (regex=true compiles RegExp exactly as written — no implicit i); extensions .js/.ts/.css/.scss/.html/.json unless globs is set — an empty globs array is treated the same as omitting it, not as 'no extensions'. prefix narrows which folder is walked and globs still filters extensions within it — the two combine rather than override each other. Limits: 100 hits total, 5 per file, 200-char preview per line (fixed, to keep results small enough for one call); invalid regex → error naming the bad pattern; no matches → empty markdown, not an error.

Input Schema

NameRequiredDescriptionDefault
globsNoExtension globs to restrict search, e.g. ['*.js','*.ts']. When omitted, searches .js/.ts/.css/.scss/.html/.json.
queryYesLiteral substring (default, case-sensitive) or regex when regex=true.
regexNoIf true, compile query as a JS RegExp with no extra flags (no implicit case-insensitive). Default false (literal).
prefixNoRepo-relative folder to walk, e.g. 'src' or 'plugins/iptv'. Combines with globs (prefix walks, globs filter extensions).

Output Schema

NameRequiredDescriptionDefault
markdownYesHuman-readable markdown report. Always present, including empty-result cases. Does not write files.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.8.0
    • changedInput schema / properties / prefix / description
      Previous value: -"Repo-relative folder to walk, e.g. 'src' or 'plugins/iptv'. Preferred over globs when the area is known."New value: +"Repo-relative folder to walk, e.g. 'src' or 'plugins/iptv'. Combines with globs (prefix walks, globs filter extensions)."
  2. Changed4 schema fields changedv1.7.0
    • changedInput schema / properties / globs / description
      Previous value: -"File glob patterns to restrict search, e.g. ['*.js','*.ts']."New value: +"Extension globs to restrict search, e.g. ['*.js','*.ts']. When omitted, searches .js/.ts/.css/.scss/.html/.json."
    • changedInput schema / properties / prefix / description
      Previous value: -"Repo-relative folder to search within, e.g. 'src' or 'plugins/iptv'."New value: +"Repo-relative folder to walk, e.g. 'src' or 'plugins/iptv'. Preferred over globs when the area is known."
    • changedInput schema / properties / query / description
      Previous value: -"Text or regex to search for in file contents."New value: +"Literal substring (default, case-sensitive) or regex when regex=true."
    • changedInput schema / properties / regex / description
      Previous value: -"Treat query as a regex. Default false (literal)."New value: +"If true, compile query as a JS RegExp with no extra flags (no implicit case-insensitive). Default false (literal)."
  3. Changed5 schema fields changedv1.6.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / prefix
      Added value: +{
      +  "description": "Repo-relative folder to search within, e.g. 'src' or 'plugins/iptv'.",
      +  "type": "string"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Text or regex to search for."New value: +"Text or regex to search for in file contents."
    • changedInput schema / properties / regex / description
      Previous value: -"Treat query as a regex. Default false."New value: +"Treat query as a regex. Default false (literal)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "markdown": {
      +      "description": "Human-readable markdown report. Always present, including empty-result cases. Does not write files.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "markdown"
      +  ],
      +  "type": "object"
      +}
  4. First observedv1.0.0

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnly/idempotent/non-destructive and closed-world, so the safety profile is covered structurally. The description adds genuinely useful disclosure beyond that — default match mode, case-sensitivity, extension defaults, empty-globs equivalence, prefix+globs interaction, hard limits (100 hits, 5/file, 200-char preview), and the invalid-regex / no-match behaviors. Those limits and edge-case semantics are real added value, though return shape is mostly delegated to the output schema.

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?

Front-loaded with purpose and sibling routing before defaults/limits, and each sentence carries distinct information. It is dense but not padded; the backtick-heavy prose is slightly harder to scan than necessary.

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?

An output schema exists, so return values need not be spelled out, yet the description still characterizes the hit format (path:line plus preview) and truncation size. Combined with defaults, limits, and failure modes, an agent has everything needed to call it correctly and interpret the result bounds.

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?

Schema coverage is 100%, so baseline is 3. The description goes beyond it on two points the schema does not state plainly: an empty `globs` array is treated as omitted rather than 'no extensions', and `prefix` and `globs` combine rather than override. The regex wording largely restates the schema's own note about no implicit `i`.

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?

States a specific verb (search contents) and resource (Lampa source), and explicitly distinguishes itself from three siblings — find_files, list_catalog, read_source — by naming what each of those does instead. An agent can route correctly without opening any schema.

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?

Gives an explicit positive trigger ('when you know a symbol or pattern') and three explicit exclusions with the correct alternative named for each. Nothing about tool selection is left to inference.

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