Skip to main content
Glama
count_files.yaml1.77 kB
version: "1.0" # MCP Server Metadata server: name: "fileUtils" version: "1.0.0" description: "File utilities" # 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" # MCP Servers used by the graph servers: # Stdio server (type is optional, defaults to stdio) filesystem: command: "npx" args: - "-y" - "@modelcontextprotocol/server-filesystem" - "/Users/bob/Documents/GitHub/mcpGraph/tests/files" # Example: Streamable HTTP server (preferred for HTTP/SSE) # httpServer: # type: "streamableHttp" # url: "https://api.example.com/mcp" # headers: # Authorization: "Bearer token" # X-Custom-Header: "value" # Graph Nodes nodes: # Entry node: Receives tool arguments - id: "entry_count_files" type: "entry" tool: "count_files" next: "list_directory_node" # List directory contents - id: "list_directory_node" type: "mcp" server: "filesystem" tool: "list_directory" args: path: "$.entry_count_files.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" tool: "count_files"

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