Skip to content

Add toolset system with per-org enable/disable config #4

@siddhant3030

Description

@siddhant3030

Problem

All 51 tools are always registered with no way to restrict them. NGO orgs with strict data policies (e.g. no AI access to raw warehouse data) have no way to disable specific categories of tools without forking the codebase.

What to do

Implement a toolset grouping system inspired by dbt-mcp's toolsets.py:

1. Define toolsets

# src/dalgo_mcp/toolsets.py
from enum import Enum

class Toolset(Enum):
    WAREHOUSE_META = "warehouse_meta"   # schemas, tables, columns, row count (safe)
    WAREHOUSE_DATA = "warehouse_data"   # actual row data (PII risk)
    PIPELINES      = "pipelines"        # list, get, trigger, history
    TRANSFORMS     = "transforms"       # dbt run, git, sync
    ANALYTICS      = "analytics"        # charts, dashboards, reports
    SOURCES        = "sources"          # airbyte sources/connections
    ADMIN          = "admin"            # all delete operations
    DOCS           = "docs"             # documentation search
    ORG            = "org"              # users, feature flags, notifications

2. Support env var config

# Disable raw data and delete operations for a privacy-sensitive NGO
DALGO_DISABLE_TOOLSETS=warehouse_data,admin

3. Conditional registration in each tool module

def register(app, get_client, disabled_toolsets=set()):
    if Toolset.WAREHOUSE_DATA not in disabled_toolsets:
        @app.tool()
        async def dalgo_get_table_data(...): ...

Reference

  • dbt-mcp src/dbt_mcp/tools/toolsets.py — toolset enum + tool mapping
  • dbt-mcp src/dbt_mcp/tools/register.py — precedence-based registration logic

Precedence order (from dbt-mcp)

individual tool enable > individual tool disable > toolset enable > toolset disable > default (all enabled)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions