Skip to main content
Glama
count_files.yaml1.33 kB
version: "1.0" # MCP Server Metadata server: name: "mcpGraph" version: "1.0.0" description: "MCP server that executes directed graphs of MCP tool calls" # Tool Definitions tools: - name: "count_files" description: "Counts the number of files in a directory" inputSchema: type: "object" properties: directory: type: "string" description: "The directory path to count files in" required: - directory outputSchema: type: "object" properties: count: type: "number" description: "The number of files in the directory" entryNode: "entry_count_files" exitNode: "exit_count_files" # Graph Nodes nodes: # Entry node: Receives tool arguments - id: "entry_count_files" type: "entry" next: "list_directory_node" # List directory contents - id: "list_directory_node" type: "mcp_tool" server: "filesystem" tool: "list_directory" args: path: "$.input.directory" next: "count_files_node" # Transform and count files - id: "count_files_node" type: "transform" transform: expr: | { "count": $count($split(list_directory_node, "\n")) } next: "exit_count_files" # Exit node: Returns the count - id: "exit_count_files" type: "exit"

Latest Blog Posts

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/TeamSparkAI/mcpGraph'

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