Skip to main content
Glama
timohaa

Scopewalker MCP

by timohaa

Line Counts

get_line_counts
Read-onlyIdempotent

Count code, blank, and comment lines across files or directories. Filter by extensions or path text and sort results by total lines or name.

Instructions

Returns file line counts (code/blank/comment). Use extensions to filter.

Input Schema

NameRequiredDescriptionDefault
grepNoKeep files whose path contains this text (case-insensitive)
pathYesFile or directory to analyze; must be inside the allowed roots
limitNoMax files returned (default 20)
sort_byNoSort by total lines or path (default lines_desc)
extensionsNoOnly scan these extensions, e.g. [".ts", ".py"] (default all supported)
include_hiddenNoInclude dotfiles and dot-directories (default false)
ignore_patternsNoExtra gitignore-style patterns to exclude, relative to path

Output Schema

NameRequiredDescriptionDefault
pathYes
_metaNo
filesYes
summaryYes
is_directoryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv1.4.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / extensions / description
      Previous value: -"Filter by extensions"New value: +"Only scan these extensions, e.g. [\".ts\", \".py\"] (default all supported)"
    • changedInput schema / properties / grep / description
      Previous value: -"Filter by keyword"New value: +"Keep files whose path contains this text (case-insensitive)"
    • changedInput schema / properties / ignore_patterns / description
      Previous value: -"Exclude patterns"New value: +"Extra gitignore-style patterns to exclude, relative to path"
    • changedInput schema / properties / include_hidden / description
      Previous value: -"Include hidden"New value: +"Include dotfiles and dot-directories (default false)"
    • changedInput schema / properties / limit / description
      Previous value: -"Max results"New value: +"Max files returned (default 20)"
    • changedInput schema / properties / path / description
      Previous value: -"Target path"New value: +"File or directory to analyze; must be inside the allowed roots"
    • changedInput schema / properties / sort_by / description
      Previous value: -"Sort order"New value: +"Sort by total lines or path (default lines_desc)"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "_meta": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "funding": {
      +          "type": "string"
      +        },
      +        "item_count": {
      +          "type": "number"
      +        },
      +        "response_size_chars": {
      +          "type": "number"
      +        },
      +        "warning": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "item_count",
      +        "response_size_chars",
      +        "funding"
      +      ],
      +      "type": "object"
      +    },
      +    "files": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "lines": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "blank": {
      +                "type": "number"
      +              },
      +              "code": {
      +                "type": "number"
      +              },
      +              "comment": {
      +                "type": "number"
      +              },
      +              "total": {
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "total",
      +              "code",
      +              "blank",
      +              "comment"
      +            ],
      +            "type": "object"
      +          },
      +          "path": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "path",
      +          "lines"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "is_directory": {
      +      "type": "boolean"
      +    },
      +    "path": {
      +      "type": "string"
      +    },
      +    "summary": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "total_blank_lines": {
      +          "type": "number"
      +        },
      +        "total_code_lines": {
      +          "type": "number"
      +        },
      +        "total_comment_lines": {
      +          "type": "number"
      +        },
      +        "total_files": {
      +          "type": "number"
      +        },
      +        "total_lines": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "total_files",
      +        "total_lines",
      +        "total_code_lines",
      +        "total_blank_lines",
      +        "total_comment_lines"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "path",
      +    "is_directory",
      +    "files",
      +    "summary"
      +  ],
      +  "type": "object"
      +}
  2. Changed6 schema fields changedv1.3.0
    • addedInput schema / properties / extensions / items / maxLength
      Added value: +32
    • addedInput schema / properties / extensions / items / pattern
      Added value: +"^\\.?[A-Za-z0-9_+-]+$"
    • addedInput schema / properties / extensions / maxItems
      Added value: +100
    • addedInput schema / properties / ignore_patterns / items / maxLength
      Added value: +512
    • addedInput schema / properties / ignore_patterns / maxItems
      Added value: +100
    • changedInput schema / properties / limit / maximum
      Previous value: -9007199254740991New value: +5000
  3. First observedv1.0.4

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and a closed-world scope, so the safety profile is covered. The description adds the count categories and the extension-filtering hint, but says nothing about the allowed-roots constraint, sort/default behavior, or scan cost on large trees.

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?

Two compact sentences with no filler, front-loading the return semantics before the filtering hint. Slightly under-specified rather than padded, which costs little here.

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?

An output schema exists, so return-value details are rightly omitted, and annotations cover safety. However, for a 7-parameter tool with path scoping, ignore patterns, and limits, the description leaves the agent to infer filtering and scope behavior entirely from the schema.

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%, so all seven parameters are already documented in the schema. The description only echoes the extensions filter and adds no format or interaction details beyond it, so baseline 3 applies.

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+resource ('Returns file line counts') and adds the useful breakdown of code/blank/comment. It is distinct enough from metric-oriented siblings like get_complexity_metrics, but does not explicitly name what it is not or how it differs from them.

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

Usage Guidelines2/5

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

The only guidance is 'Use extensions to filter,' which points at a parameter rather than saying when this tool is the right choice. There is no when-to-use, when-not-to-use, or reference to alternatives among the many sibling analysis tools.

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