Skip to main content
Glama
tbrandenburg

PyContextify

by tbrandenburg

index_filebase

Index a directory tree or single file for semantic search, covering code, documents, and PDFs with a unified pipeline.

Instructions

Index a filebase (directory tree or single file) for semantic search.

This is the unified indexing function that handles all file types (code, documents, PDFs) with a single consistent pipeline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsYesComma-separated tags for organizing indexed content (required)
excludeNoOptional list of fnmatch patterns to exclude (e.g., ["*_test.py"])
includeNoOptional list of fnmatch patterns to include (e.g., ["*.py", "*.md"])
base_pathYesRoot directory path or individual file to index
exclude_dirsNoOptional list of directory names to exclude (e.g., ["node_modules", ".git"])

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries the full burden and does disclose core behavior: indexing a directory tree or single file, handling code/docs/PDFs through a consistent pipeline. However, it omits side-effect details such as whether existing index entries are overwritten, whether authorization is needed, or if indexing is expensive for 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences that lead with the action, clearly state scope (directory or file), and justify why this tool exists ('unified...single consistent pipeline'). No wasted words.

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?

The description gives a clear high-level purpose and covers all file types, but it does not orient the agent within the tool family (e.g., that indexing is a prerequisite for search, or when to use discover/status instead). Given output schema exists and param schema is complete, this is adequate but not fully contextual.

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?

Input schema covers 100% of parameters with descriptive text (base_path, tags, include, exclude, exclude_dirs), so the baseline is 3. The description adds no additional parameter meaning beyond the schema's definitions.

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?

Description begins with action verb 'Index' and a specific resource 'filebase (directory tree or single file)', making its function immediately clear. It also notes it is the unified indexing function handling all file types, which differentiates it from sibling tools like search or discover.

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

Usage Guidelines4/5

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

The phrase 'unified indexing function that handles all file types' gives clear context that this tool is the go-to for any indexing task, implying it should be used over any specialized alternatives. It does not explicitly state when not to use it or name sibling alternatives, so it stops short of a 5.

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/tbrandenburg/pycontextify'

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