Skip to content
Back to skills

Example 1 Database Query Tool

ASecurity

Sub-skill of mcp-builder: Example 1: Database Query Tool (+1).

  • 17 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
developmenttypescriptgosqlapidatabase

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill example-1-database-query-tool --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Example 1 Database Query Tool?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Example 1 Database Query Tool
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-example-1-database-query-tool/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-example-1-database-query-tool)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.