Skip to main content
Glama
timohaa

Scopewalker MCP

by timohaa

Functions

get_functions
Read-onlyIdempotent

Analyze files or directories to return function and method counts per file, or line counts per function, with filtering by path, name, and extension.

Instructions

Returns function/method info. Use detail=lines for line counts per function.

Input Schema

NameRequiredDescriptionDefault
grepNoKeep files or functions whose path or name contains this text (case-insensitive)
pathYesFile or directory to analyze; must be inside the allowed roots
limitNoMax files returned (default 20)
detailNocounts: functions per file; lines: lines per function (default counts)
sort_byNoSort order (default count_desc for counts, lines_desc for lines)
max_depthNoMax directory depth to descend (default unlimited)
max_filesNoStop after scanning this many files (default unlimited)
min_linesNoLines mode only: skip functions shorter than this many lines
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. Changed13 schema fields changedv1.4.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / detail / description
      Previous value: -"Detail level"New value: +"counts: functions per file; lines: lines per function (default counts)"
    • 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 or functions whose path or name 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 / max_depth / description
      Previous value: -"Max depth"New value: +"Max directory depth to descend (default unlimited)"
    • changedInput schema / properties / max_files / description
      Previous value: -"Max files to scan"New value: +"Stop after scanning this many files (default unlimited)"
    • changedInput schema / properties / min_lines / description
      Previous value: -"Min lines (lines mode)"New value: +"Lines mode only: skip functions shorter than this many lines"
    • 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 order (default count_desc for counts, lines_desc for lines)"
    • 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": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "function_count": {
      +                "type": "number"
      +              },
      +              "functions": {
      +                "items": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "line": {
      +                      "type": "number"
      +                    },
      +                    "name": {
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "name",
      +                    "line"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "language": {
      +                "type": "string"
      +              },
      +              "path": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "path",
      +              "language",
      +              "function_count",
      +              "functions"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "functions": {
      +                "items": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "end_line": {
      +                      "type": "number"
      +                    },
      +                    "lines": {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "blank": {
      +                          "type": "number"
      +                        },
      +                        "code": {
      +                          "type": "number"
      +                        },
      +                        "comment": {
      +                          "type": "number"
      +                        },
      +                        "total": {
      +                          "type": "number"
      +                        }
      +                      },
      +                      "required": [
      +                        "total",
      +                        "code",
      +                        "blank",
      +                        "comment"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    "name": {
      +                      "type": "string"
      +                    },
      +                    "start_line": {
      +                      "type": "number"
      +                    }
      +                  },
      +                  "required": [
      +                    "name",
      +                    "start_line",
      +                    "end_line",
      +                    "lines"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "language": {
      +                "type": "string"
      +              },
      +              "path": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "path",
      +              "language",
      +              "functions"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "type": "array"
      +    },
      +    "is_directory": {
      +      "type": "boolean"
      +    },
      +    "path": {
      +      "type": "string"
      +    },
      +    "summary": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "files_with_no_functions": {
      +              "type": "number"
      +            },
      +            "total_files_analyzed": {
      +              "type": "number"
      +            },
      +            "total_functions": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "total_files_analyzed",
      +            "total_functions",
      +            "files_with_no_functions"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "average_lines_per_function": {
      +              "type": "number"
      +            },
      +            "functions_over_50_lines": {
      +              "type": "number"
      +            },
      +            "largest_function": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "file": {
      +                      "type": "string"
      +                    },
      +                    "lines": {
      +                      "type": "number"
      +                    },
      +                    "name": {
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "name",
      +                    "file",
      +                    "lines"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "total_functions": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "total_functions",
      +            "average_lines_per_function",
      +            "largest_function",
      +            "functions_over_50_lines"
      +          ],
      +          "type": "object"
      +        }
      +      ]
      +    }
      +  },
      +  "required": [
      +    "path",
      +    "is_directory",
      +    "files",
      +    "summary"
      +  ],
      +  "type": "object"
      +}
  2. Changed9 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
    • changedInput schema / properties / max_depth / maximum
      Previous value: -9007199254740991New value: +64
    • changedInput schema / properties / max_files / maximum
      Previous value: -9007199254740991New value: +10000
    • changedInput schema / properties / min_lines / maximum
      Previous value: -9007199254740991New value: +10000
  3. First observedv1.0.4

TDQS

C2.7/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds no behavioral context beyond that — nothing about scan cost, depth/file traversal limits, or what 'info' is produced — so it does little work the agent couldn't infer.

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 short sentences, no padding, and the core capability leads. It is efficient, though the terseness edges toward under-specification rather than disciplined brevity.

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 and the input schema is fully documented, so the agent can call it, but for an 11-parameter analyzer the description omits operating scope (allowed roots), result granularity, and any relation to sibling analysis tools. Adequate but with clear gaps.

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 11 parameters, both enums, and defaults are already documented in the schema. The description's only addition is restating the detail=lines mode, which the schema already explains; baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

It names the resource (functions/methods) but the verb is the generic 'Returns ... info', which doesn't say what kind of info or what analysis is performed. Nothing in the text distinguishes it from siblings like get_line_counts, get_complexity_metrics, or get_code_inventory, which are the closest overlaps.

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 a parameter hint ('Use detail=lines for line counts per function'), which points at behavior rather than when to pick this tool over get_line_counts or get_complexity_metrics. There is no stated context, no exclusions, and no alternative named.

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