Add MCP allow and ask name tables per integration.

This commit is contained in:
CREDO23 2026-05-01 20:30:20 +02:00
parent 5f84d46f96
commit cf3acd87aa
7 changed files with 132 additions and 0 deletions

View file

@ -0,0 +1,23 @@
"""Bundled MCP allow/ask name rows per connector agent (MCP-backed routes only)."""
from __future__ import annotations
from app.agents.multi_agent_with_deepagents.subagents.shared.permissions import (
ToolsPermissions,
)
from .airtable import TOOLS_PERMISSIONS as _AIRTABLE
from .clickup import TOOLS_PERMISSIONS as _CLICKUP
from .jira import TOOLS_PERMISSIONS as _JIRA
from .linear import TOOLS_PERMISSIONS as _LINEAR
from .slack import TOOLS_PERMISSIONS as _SLACK
TOOLS_PERMISSIONS_BY_AGENT: dict[str, ToolsPermissions] = {
"airtable": _AIRTABLE,
"clickup": _CLICKUP,
"jira": _JIRA,
"linear": _LINEAR,
"slack": _SLACK,
}
__all__ = ["TOOLS_PERMISSIONS_BY_AGENT"]

View file

@ -0,0 +1,16 @@
"""Airtable MCP: which server tool names are allow vs ask."""
from __future__ import annotations
from app.agents.multi_agent_with_deepagents.subagents.shared.permissions import (
ToolsPermissions,
)
TOOLS_PERMISSIONS: ToolsPermissions = {
"allow": [
{"name": "list_bases"},
{"name": "list_tables_for_base"},
{"name": "list_records_for_table"},
],
"ask": [],
}

View file

@ -0,0 +1,15 @@
"""ClickUp MCP: which server tool names are allow vs ask."""
from __future__ import annotations
from app.agents.multi_agent_with_deepagents.subagents.shared.permissions import (
ToolsPermissions,
)
TOOLS_PERMISSIONS: ToolsPermissions = {
"allow": [
{"name": "clickup_search"},
{"name": "clickup_get_task"},
],
"ask": [],
}

View file

@ -0,0 +1,10 @@
"""Re-exports permission row types for MCP policy modules."""
from __future__ import annotations
from app.agents.multi_agent_with_deepagents.subagents.shared.permissions import (
ToolPermissionItem,
ToolsPermissions,
)
__all__ = ["ToolPermissionItem", "ToolsPermissions"]

View file

@ -0,0 +1,20 @@
"""Jira MCP: which server tool names are allow vs ask."""
from __future__ import annotations
from app.agents.multi_agent_with_deepagents.subagents.shared.permissions import (
ToolsPermissions,
)
TOOLS_PERMISSIONS: ToolsPermissions = {
"allow": [
{"name": "getAccessibleAtlassianResources"},
{"name": "searchJiraIssuesUsingJql"},
{"name": "getVisibleJiraProjects"},
{"name": "getJiraProjectIssueTypesMetadata"},
],
"ask": [
{"name": "createJiraIssue"},
{"name": "editJiraIssue"},
],
}

View file

@ -0,0 +1,32 @@
"""Linear MCP: which server tool names are allow vs ask."""
from __future__ import annotations
from app.agents.multi_agent_with_deepagents.subagents.shared.permissions import (
ToolsPermissions,
)
_TOOLS_ALLOW = (
"list_issues",
"get_issue",
"list_my_issues",
"list_issue_statuses",
"list_issue_labels",
"list_comments",
"list_users",
"get_user",
"list_teams",
"get_team",
"list_projects",
"get_project",
"list_project_labels",
"list_cycles",
"list_documents",
"get_document",
"search_documentation",
)
TOOLS_PERMISSIONS: ToolsPermissions = {
"allow": [{"name": n} for n in _TOOLS_ALLOW],
"ask": [{"name": "save_issue"}],
}

View file

@ -0,0 +1,16 @@
"""Slack MCP: which server tool names are allow vs ask."""
from __future__ import annotations
from app.agents.multi_agent_with_deepagents.subagents.shared.permissions import (
ToolsPermissions,
)
TOOLS_PERMISSIONS: ToolsPermissions = {
"allow": [
{"name": "slack_search_channels"},
{"name": "slack_read_channel"},
{"name": "slack_read_thread"},
],
"ask": [],
}