Skip to main content
Glama

MCP Toolkit

by zxfgds
README.md3.07 kB
# 工具接口说明 ## 数据库工具 ### db_connect 连接到数据库(MySQL/PostgreSQL/Redis)。连接信息从 config.yaml 读取。 ```typescript { type: "mysql" | "postgres" | "redis"; // 数据库类型 id: string; // 连接标识符 } ``` ### db_query 执行 SQL 查询或 Redis 命令 ```typescript { connectionId: string; // 连接标识符 query: string; // SQL查询语句或Redis命令 params?: any[]; // 查询参数(可选) } ``` ### db_begin_transaction 开始数据库事务(仅MySQL/PostgreSQL) ```typescript { connectionId: string; // 连接标识符 } ``` ### db_commit_transaction 提交数据库事务 ```typescript { connectionId: string; // 连接标识符 } ``` ### db_rollback_transaction 回滚数据库事务 ```typescript { connectionId: string; // 连接标识符 } ``` ### db_close 关闭数据库连接 ```typescript { connectionId: string; // 连接标识符 } ``` ## GitHub 工具 ### github_ls 列出仓库中的文件和目录。使用 config.yaml 中的 token。 ```typescript { owner: string; // 仓库所有者 repo: string; // 仓库名称 path?: string; // 目录路径(可选) branch?: string; // 分支名称(可选) } ``` ### github_tree 显示仓库的目录树结构 ```typescript { owner: string; // 仓库所有者 repo: string; // 仓库名称 branch?: string; // 分支名称(可选) } ``` ### github_search_repo 搜索 GitHub 仓库 ```typescript { query: string; // 搜索关键词 } ``` ### github_search_code 搜索 GitHub 代码 ```typescript { query: string; // 搜索关键词 } ``` ### github_cat 查看文件内容 ```typescript { owner: string; // 仓库所有者 repo: string; // 仓库名称 path: string; // 文件路径 } ``` ## 网页工具 ### read_webpage 读取网页内容,支持 JavaScript 渲染和链接提取。使用 config.yaml 中的代理配置。 ```typescript { url: string; // 网页URL requiresJavaScript?: boolean; // 是否需要JavaScript渲染(可选) extractLinks?: boolean; // 是否提取链接(可选) selector?: string; // 指定内容选择器(可选) } ``` ## 搜索工具 ### brave_search 使用 Brave Search 进行搜索。使用 config.yaml 中的 API 密钥和代理配置。 ```typescript { query: string; // 搜索关键词 count?: number; // 结果数量(可选,默认10) } ``` ### everything_search 使用 Everything 搜索文件。使用 config.yaml 中的配置。 ```typescript { pattern: string; // 搜索模式 maxResults?: number; // 最大结果数量(可选) offset?: number; // 结果偏移量(可选) } ``` ## 配置说明 所有工具都使用 config.yaml 中的配置: - 数据库连接信息 - GitHub token - 代理设置 - Brave Search API 密钥 - Everything 配置 配置修改只能通过编辑 config.yaml 文件完成,不提供运行时修改功能。

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/zxfgds/mcp-toolkit'

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