From b7b7f254510aff98ea001fcd0dd84bca3d83d679 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 20 Jun 2025 14:55:54 +0800 Subject: [PATCH] refactor: remove unused response variables in database, git, node, project, schedule, spider, task modules --- mcp/src/tools.ts | 20 ++++++++++---------- mcp/src/tools/databases.ts | 2 +- mcp/src/tools/git.ts | 6 +++--- mcp/src/tools/nodes.ts | 4 ++-- mcp/src/tools/projects.ts | 2 +- mcp/src/tools/schedules.ts | 6 +++--- mcp/src/tools/spiders.ts | 4 ++-- mcp/src/tools/tasks.ts | 4 ++-- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/mcp/src/tools.ts b/mcp/src/tools.ts index abceae82..de4cd82e 100644 --- a/mcp/src/tools.ts +++ b/mcp/src/tools.ts @@ -1,16 +1,16 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { CrawlabClient } from "./client.js"; -import { configureSpiderTools } from "./tools/spiders.js"; -import { configureTaskTools } from "./tools/tasks.js"; -import { configureNodeTools } from "./tools/nodes.js"; -import { configureScheduleTools } from "./tools/schedules.js"; -import { configureSystemTools } from "./tools/system.js"; -import { configureProjectTools } from "./tools/projects.js"; -import { configureDatabaseTools } from "./tools/databases.js"; -import { configureGitTools } from "./tools/git.js"; -import { configureStatsTools } from "./tools/stats.js"; -import { configureAITools } from "./tools/ai.js"; +import { configureSpiderTools } from '@tools/spiders'; +import { configureTaskTools } from '@tools/tasks'; +import { configureNodeTools } from '@tools/nodes'; +import { configureScheduleTools } from '@tools/schedules'; +import { configureSystemTools } from '@tools/system'; +import { configureProjectTools } from '@tools/projects'; +import { configureDatabaseTools } from '@tools/databases'; +import { configureGitTools } from '@tools/git'; +import { configureStatsTools } from '@tools/stats'; +import { configureAITools } from '@tools/ai'; export function configureAllTools(server: McpServer, client: CrawlabClient) { configureSpiderTools(server, client); diff --git a/mcp/src/tools/databases.ts b/mcp/src/tools/databases.ts index 623d4b23..49494246 100644 --- a/mcp/src/tools/databases.ts +++ b/mcp/src/tools/databases.ts @@ -184,7 +184,7 @@ export function configureDatabaseTools(server: McpServer, client: CrawlabClient) }, async ({ database_id }) => { try { - const response = await client.deleteDatabase(database_id); + await client.deleteDatabase(database_id); return { content: [ { diff --git a/mcp/src/tools/git.ts b/mcp/src/tools/git.ts index f57bd5b8..5e7dd9bf 100644 --- a/mcp/src/tools/git.ts +++ b/mcp/src/tools/git.ts @@ -169,7 +169,7 @@ export function configureGitTools(server: McpServer, client: CrawlabClient) { }, async ({ git_id }) => { try { - const response = await client.deleteGitRepo(git_id); + await client.deleteGitRepo(git_id); return { content: [ { @@ -200,7 +200,7 @@ export function configureGitTools(server: McpServer, client: CrawlabClient) { }, async ({ git_id }) => { try { - const response = await client.cloneGitRepo(git_id); + await client.cloneGitRepo(git_id); return { content: [ { @@ -231,7 +231,7 @@ export function configureGitTools(server: McpServer, client: CrawlabClient) { }, async ({ git_id }) => { try { - const response = await client.pullGitRepo(git_id); + await client.pullGitRepo(git_id); return { content: [ { diff --git a/mcp/src/tools/nodes.ts b/mcp/src/tools/nodes.ts index 3afef79f..cdb8828d 100644 --- a/mcp/src/tools/nodes.ts +++ b/mcp/src/tools/nodes.ts @@ -123,7 +123,7 @@ export function configureNodeTools(server: McpServer, client: CrawlabClient) { }, async ({ node_id }) => { try { - const response = await client.enableNode(node_id); + await client.enableNode(node_id); return { content: [ { @@ -154,7 +154,7 @@ export function configureNodeTools(server: McpServer, client: CrawlabClient) { }, async ({ node_id }) => { try { - const response = await client.disableNode(node_id); + await client.disableNode(node_id); return { content: [ { diff --git a/mcp/src/tools/projects.ts b/mcp/src/tools/projects.ts index b9c0e549..bf5fd83b 100644 --- a/mcp/src/tools/projects.ts +++ b/mcp/src/tools/projects.ts @@ -155,7 +155,7 @@ export function configureProjectTools(server: McpServer, client: CrawlabClient) }, async ({ project_id }) => { try { - const response = await client.deleteProject(project_id); + await client.deleteProject(project_id); return { content: [ { diff --git a/mcp/src/tools/schedules.ts b/mcp/src/tools/schedules.ts index c793e742..60187097 100644 --- a/mcp/src/tools/schedules.ts +++ b/mcp/src/tools/schedules.ts @@ -189,7 +189,7 @@ export function configureScheduleTools(server: McpServer, client: CrawlabClient) }, async ({ schedule_id }) => { try { - const response = await client.deleteSchedule(schedule_id); + await client.deleteSchedule(schedule_id); return { content: [ { @@ -220,7 +220,7 @@ export function configureScheduleTools(server: McpServer, client: CrawlabClient) }, async ({ schedule_id }) => { try { - const response = await client.enableSchedule(schedule_id); + await client.enableSchedule(schedule_id); return { content: [ { @@ -251,7 +251,7 @@ export function configureScheduleTools(server: McpServer, client: CrawlabClient) }, async ({ schedule_id }) => { try { - const response = await client.disableSchedule(schedule_id); + await client.disableSchedule(schedule_id); return { content: [ { diff --git a/mcp/src/tools/spiders.ts b/mcp/src/tools/spiders.ts index 4f45d0d7..f99843b2 100644 --- a/mcp/src/tools/spiders.ts +++ b/mcp/src/tools/spiders.ts @@ -207,7 +207,7 @@ export function configureSpiderTools(server: McpServer, client: CrawlabClient) { }, async ({ spider_id }) => { try { - const response = await client.deleteSpider(spider_id); + await client.deleteSpider(spider_id); return { content: [ { @@ -347,7 +347,7 @@ export function configureSpiderTools(server: McpServer, client: CrawlabClient) { }, async ({ spider_id, file_path, content }) => { try { - const response = await client.saveSpiderFile(spider_id, file_path, content); + await client.saveSpiderFile(spider_id, file_path, content); return { content: [ { diff --git a/mcp/src/tools/tasks.ts b/mcp/src/tools/tasks.ts index 51099410..6ad2f2a2 100644 --- a/mcp/src/tools/tasks.ts +++ b/mcp/src/tools/tasks.ts @@ -86,7 +86,7 @@ export function configureTaskTools(server: McpServer, client: CrawlabClient) { }, async ({ task_id }) => { try { - const response = await client.cancelTask(task_id); + await client.cancelTask(task_id); return { content: [ { @@ -148,7 +148,7 @@ export function configureTaskTools(server: McpServer, client: CrawlabClient) { }, async ({ task_id }) => { try { - const response = await client.deleteTask(task_id); + await client.deleteTask(task_id); return { content: [ {