home/ecommerce/prompt-11-tools-feature

PROMPT 11 Tools Feature

GPTClaudeGemini··1,388 copies·updated 2026-07-14
prompt-11-tools-feature.prompt
# PROMPT_11: Tools Feature Module

**Goal:** Implement `McpClient.Tools` module for listing and calling MCP tools.

**Duration:** ~45 minutes

**Dependencies:** PROMPT_01-10 (Core + Infrastructure)

---

## Context

Tools allow servers to expose executable functions. This module provides:
- `list/2` - List available tools from server
- `call/4` - Execute a tool with arguments

All errors are normalized through `McpClient.Error`, and all operations use the core `Connection.call/4` function. Tool definitions also declare a `mode` (`:stateful` or `:stateless`) that must be surfaced via the typed struct so the Connection can decide how to execute each call (ADR-0012).

---

## Required Reading

**ADR-0011:** Client Features Architecture - Section: "McpClient.Tools"
**ADR-0012:** Tool Modes and Session Flexibility - Execution mode semantics
**CLIENT_FEATURES.md:** Section: "McpClient.Tools" - Complete API specification
**PROTOCOL_DETAILS.md:** Sections: "tools/list" and "tools/call" message schemas

---

## Implementation

**File:** `lib/mcp_client/tools.ex`

when to use it

Community prompt sourced from the open-source GitHub repo nshkrdotcom/mcp_client (MIT). A "PROMPT 11 Tools Feature" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

ecommercecommunitygeneral

source

nshkrdotcom/mcp_client · MIT