Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions packages/mcp-core/src/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ vi.mock("@sentry/core", () => ({
wrapMcpServerWithSentry: vi.fn((server) => server),
}));

// Mock the agent provider factory
vi.mock("./internal/agents/provider-factory", () => ({
hasAgentProvider: vi.fn(() => false),
}));

/**
* Helper to get registered tool names from an McpServer.
* Uses the internal _registeredTools object which exists directly on McpServer instances.
Expand Down
21 changes: 1 addition & 20 deletions packages/mcp-core/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ import type {
ServerRequest,
ServerNotification,
} from "@modelcontextprotocol/sdk/types.js";
import tools, {
AGENT_DEPENDENT_TOOLS,
SIMPLE_REPLACEMENT_TOOLS,
} from "./tools/index";
import tools from "./tools/index";
import {
type ToolConfig,
resolveDescription,
Expand All @@ -50,7 +47,6 @@ import {
getConstraintParametersToInject,
getConstraintKeysToFilter,
} from "./internal/constraint-helpers";
import { hasAgentProvider } from "./internal/agents/provider-factory";

/**
* Creates and configures a complete MCP server with Sentry instrumentation.
Expand Down Expand Up @@ -166,21 +162,6 @@ function configureServer({
? { use_sentry: tools.use_sentry }
: (customTools ?? tools);

// Filter tools based on agent provider availability
// Skip filtering in agent mode (use_sentry handles all tools internally) or when custom tools are provided
if (!agentMode && !customTools) {
const hasAgent = hasAgentProvider();
const toolsToExclude = new Set<string>(
hasAgent ? SIMPLE_REPLACEMENT_TOOLS : AGENT_DEPENDENT_TOOLS,
);

toolsToRegister = Object.fromEntries(
Object.entries(toolsToRegister).filter(
([key]) => !toolsToExclude.has(key),
),
) as typeof toolsToRegister;
}

// Filter tools based on public visibility and experimental mode
// (applies to all tools, including custom)
// Skip in agent mode (use_sentry handles filtering internally)
Expand Down
62 changes: 11 additions & 51 deletions packages/mcp-core/src/skillDefinitions.json

Large diffs are not rendered by default.

304 changes: 75 additions & 229 deletions packages/mcp-core/src/toolDefinitions.json

Large diffs are not rendered by default.

27 changes: 0 additions & 27 deletions packages/mcp-core/src/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,9 @@ import getDoc from "./get-doc";
import searchIssues from "./search-issues";
import searchIssueEvents from "./search-issue-events";
import useSentry from "./use-sentry";
import listIssues from "./list-issues";
import listEvents from "./list-events";
import listIssueEvents from "./list-issue-events";
import getProfileDetails from "./get-profile-details";
import getSentryResource from "./get-sentry-resource";

/**
* Tools that require an embedded agent provider (LLM-powered).
* These are excluded when no agent provider is configured.
* Note: use_sentry is handled separately via agentMode.
*/
export const AGENT_DEPENDENT_TOOLS = [
"search_events",
"search_issues",
"search_issue_events",
] as const;

/**
* Simple tools that replace agent-dependent tools when no provider is available.
* These are excluded when an agent provider IS configured.
*/
export const SIMPLE_REPLACEMENT_TOOLS = [
"list_issues",
"list_events",
"list_issue_events",
] as const;

// Default export: object mapping tool names to tools
export default {
whoami,
Expand Down Expand Up @@ -75,9 +51,6 @@ export default {
search_issues: searchIssues,
search_issue_events: searchIssueEvents,
use_sentry: useSentry,
list_issues: listIssues,
list_events: listEvents,
list_issue_events: listIssueEvents,
get_profile_details: getProfileDetails,
get_sentry_resource: getSentryResource,
} as const;
Expand Down
204 changes: 0 additions & 204 deletions packages/mcp-core/src/tools/list-events/index.ts

This file was deleted.

54 changes: 0 additions & 54 deletions packages/mcp-core/src/tools/list-events/list-events.test.ts

This file was deleted.

Loading
Loading