Skip to main content
Glama

Sumanshu Arora

call.mdโ€ข3.02 kB
# `call` Command Call a tool from a template (via stdio or HTTP transport). ## Functionality - Executes the specified tool, prompting for missing configuration if needed. - Handles both stdio and HTTP transports. - Displays results in user-friendly tabular format by default. - Provides raw JSON output when using the `--raw` flag. ## Syntax ``` call [options] <template_name> <tool_name> [json_args] ``` ## Options & Arguments - `<template_name>`: Name of the template to use. - `<tool_name>`: Name of the tool to call. - `[json_args]`: Optional JSON string of arguments for the tool (e.g. '{"param": "value"}'). ### Options - `-c, --config-file`: Path to JSON config file - `-e, --env`: Environment variables (KEY=VALUE format, can be used multiple times) - `-C, --config`: Temporary config KEY=VALUE pairs (can be used multiple times) - `-NP, --no-pull`: Do not pull the Docker image - `-R, --raw`: Show raw JSON response instead of formatted table ## Configuration - Configuration for the template may be required; CLI will prompt if missing. - For HTTP templates, server must be running. ## Examples ### Basic call with tabular output (default) ``` call demo say_hello '{"name": "Sam"}' ``` ### Using raw JSON output ``` call --raw demo say_hello '{"name": "Sam"}' ``` ### With configuration options ``` call --config-file config.json --env API_KEY=xyz demo my_tool '{"input": "value"}' ``` ## When and How to Run - Use to execute a tool from a deployed template. - Run after configuring the template and ensuring the server is running (for HTTP transport). ## Example Output ### Default Tabular Format ``` mcpt> call demo say_hello {"name": "Sam"} ๐Ÿš€ Calling tool 'say_hello' from template 'demo' Checking for running server (HTTP first, stdio fallback)... ๐ŸŽฏ say_hello Results โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ Type โ”‚ Content โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ text โ”‚ Hello Sam! Greetings from "MCP Platform"! โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ``` ### Raw JSON Format (--raw flag) ``` mcpt> call --raw demo say_hello {"name": "Sam"} ๐Ÿš€ Calling tool 'say_hello' from template 'demo' Checking for running server (HTTP first, stdio fallback)... Tool Result: say_hello โ”œโ”€โ”€ content โ”‚ โ””โ”€โ”€ [0] โ”‚ โ”œโ”€โ”€ type: text โ”‚ โ””โ”€โ”€ text: Hello Sam! Greetings from "MCP Platform"! โ”œโ”€โ”€ structuredContent โ”‚ โ””โ”€โ”€ result: Hello Sam! Greetings from "MCP Platform"! โ””โ”€โ”€ isError: โœ— ```

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/Data-Everything/mcp-server-templates'

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