Back to skills
SKILL.md
Example 1 Database Query Tool
ASecuritySub-skill of mcp-builder: Example 1: Database Query Tool (+1).
- 17 stars
- 0 votes
- 0 copies
- 1 view
- Added September 9, 2026
Works with
Security analysis
100/100npx -y skills add vamseeachanta/workspace-hub --skill example-1-database-query-tool --agent claude-codeAre you the author of Example 1 Database Query Tool?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vamseeachanta-example-1-database-query-tool)---
name: mcp-builder-example-1-database-query-tool
description: 'Sub-skill of mcp-builder: Example 1: Database Query Tool (+1).'
version: 1.2.0
category: development
type: reference
scripts_exempt: true
---
# Example 1: Database Query Tool (+1)
## Example 1: Database Query Tool
```typescript
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
```typescript
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` }] };
}
});
```
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.