Agent skill
mcp-builder-example-1-database-query-tool
Sub-skill of mcp-builder: Example 1: Database Query Tool (+1).
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/development/mcp-builder/example-1-database-query-tool
SKILL.md
Example 1: Database Query Tool (+1)
Example 1: Database Query Tool
server.setRequestHandler(CallToolRequestSchema, async (request) => {
if (request.params.name === "query_database") {
const { sql, params } = request.params.arguments;
const result = await db.query(sql, params);
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
}
});
Example 2: API Integration
server.setRequestHandler(CallToolRequestSchema, async (request) => {
if (request.params.name === "fetch_weather") {
const { city } = request.params.arguments;
const response = await fetch(`https://api.weather.com/v1/${city}`);
const data = await response.json();
return { content: [{ type: "text", text: `Temperature: ${data.temp}F` }] };
}
});
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?