Skip to main content
Glama

memcp_filter_context

Filter context content by applying a regex pattern to include or exclude matching lines, enabling precise control over stored information.

Instructions

Filter context content by regex pattern.

Returns only lines matching (or not matching) the pattern.

Args:
    name: Context name
    pattern: Regex pattern to match lines
    invert: If True, return lines that DON'T match the pattern

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
invertNo
patternYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the filtering behavior and the invert option, but does not mention side effects (none apparent), authorization needs, or error conditions. It is adequate but not rich.

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 front-loaded with the core purpose in one sentence, followed by a clear statement of behavior, then a terse docstring-style parameter list. No fluff; every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the existence of an output schema (not shown), the description need not detail return values. It covers the main functionality adequately. Minor gaps: no mention of required parameter validity or error handling, but acceptable for a simple filter tool.

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 description coverage is 0%, so the description must compensate. It explains all three parameters: name ('Context name'), pattern ('Regex pattern to match lines'), and invert ('If True, return lines that DON'T match the pattern'). This adds meaning beyond the schema's bare titles.

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?

The description clearly states the verb 'Filter', the resource 'context content', and the mechanism 'by regex pattern'. It distinguishes from siblings like memcp_get_context (which returns entire context) and memcp_search (which likely searches across contexts).

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?

The description explains what the tool does (filters lines by regex) but does not explicitly state when to use it versus alternatives like memcp_get_context or memcp_inspect_context. It lacks usage context or exclusions.

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/maydali28/memcp'

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