Skip to main content
Glama
detection-forge

agentic-detection-lookups

List Available Lookups

detection_list_lookups
Read-onlyIdempotent

Discover available detection lookup files with row counts and column metadata to find datasets for SIEM enrichment and threat queries.

Instructions

List all available lookup files and their metadata (row counts, columns).

Use this tool to discover what datasets are available before querying.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function for the 'detection_list_lookups' tool. It reads all CSV files from LOOKUPS_DIR, returning a list with each file's name, row count, and column headers.
    def detection_list_lookups() -> dict[str, Any]:
        """List all available lookup files and their metadata (row counts, columns).
    
        Use this tool to discover what datasets are available before querying.
        """
        lookups = []
        for csv_file in sorted(LOOKUPS_DIR.glob("*.csv")):
            with open(csv_file, "r", encoding="utf-8") as f:
                reader = csv.DictReader(f)
                rows = list(reader)
                lookups.append({
                    "filename": csv_file.name,
                    "rows": len(rows),
                    "columns": reader.fieldnames or [],
                })
    
        return {"count": len(lookups), "lookups": lookups}
  • Registration of the 'detection_list_lookups' function as an MCP tool via the @mcp.tool() decorator with annotations including title 'List Available Lookups', readOnlyHint=True, destructiveHint=False, idempotentHint=True, openWorldHint=False.
    @mcp.tool(
        annotations={
            "title": "List Available Lookups",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": False,
        },
    )
  • The return type is dict[str, Any] with the schema: {'count': int, 'lookups': list[{'filename': str, 'rows': int, 'columns': list[str]}]}. No input parameters. No explicit pydantic model, inferred from the function return logic.
    def detection_list_lookups() -> dict[str, Any]:
        """List all available lookup files and their metadata (row counts, columns).
    
        Use this tool to discover what datasets are available before querying.
        """
        lookups = []
        for csv_file in sorted(LOOKUPS_DIR.glob("*.csv")):
            with open(csv_file, "r", encoding="utf-8") as f:
                reader = csv.DictReader(f)
                rows = list(reader)
                lookups.append({
                    "filename": csv_file.name,
                    "rows": len(rows),
                    "columns": reader.fieldnames or [],
                })
    
        return {"count": len(lookups), "lookups": lookups}
  • Helper function _load_csv used by the tool handler to load CSV files from the LOOKUPS_DIR directory.
    def _load_csv(filename: str) -> list[dict[str, str]]:
        """Load a CSV lookup file and return rows as list of dicts."""
        filepath = LOOKUPS_DIR / filename
        if not filepath.exists():
            return []
        with open(filepath, "r", encoding="utf-8") as f:
            return list(csv.DictReader(f))
  • LOOKUPS_DIR path definition used by the tool to find CSV files.
    LOOKUPS_DIR = Path(__file__).parent.parent / "lookups"
Behavior4/5

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

Annotations (readOnlyHint, idempotentHint) already establish safety, and the description adds valuable context about return metadata (row counts, columns). No contradictions.

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?

Two sentences, each earning its place. First states purpose, second provides usage guidance. No fluff.

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?

Tool has no parameters, output schema exists, annotations are thorough. Description adds the remaining 'when to use' context, making it fully complete.

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?

No parameters, schema coverage 100%. Baseline is 4; description adds nothing needed for parameters.

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?

Clearly states verb 'list' and resource 'all available lookup files' with specific metadata (row counts, columns). Differentiates from filtered sibling list tools by implying completeness.

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?

Explicitly tells agent to use this 'before querying', providing clear context. Lacks explicit when-not-to-use or naming sibling alternatives, but context is sufficient.

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/detection-forge/agentic-detection-lookups'

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