Skip to main content
Glama

create_test_folder

Generate a test folder with a specified name on Android Debug Bridge MCP for organizing automation and testing environments efficiently.

Instructions

Create a test folder with the specified name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
test_nameYesName of the test folder to create

Implementation Reference

  • The main handler function that extracts test_name from args, computes the test path using path.join and getBaseTestPath, creates the directory with createDirectory, and returns a text content response.
    create_test_folder: async (args: any) => { const { test_name } = args as { test_name: string }; const testPath = path.join(getBaseTestPath(), test_name); await createDirectory(testPath); return { content: [ { type: 'text', text: `Test folder created: ${testPath}`, }, ], }; },
  • Defines the tool metadata including name, description, and inputSchema requiring a 'test_name' string parameter.
    { name: 'create_test_folder', description: 'Create a test folder with the specified name', inputSchema: { type: 'object', properties: { test_name: { type: 'string', description: 'Name of the test folder to create', }, }, required: ['test_name'], }, },
  • src/index.ts:26-30 (registration)
    Registers the list of tool definitions, including create_test_folder, for the ListTools MCP request.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: toolDefinitions, }; });
  • src/index.ts:32-46 (registration)
    Registers the tool handlers object for CallTool MCP requests, dynamically dispatching to the handler for the specified tool name like create_test_folder.
    server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { const handler = toolHandlers[name as keyof typeof toolHandlers]; if (!handler) { throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`); } return await handler(args); } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); throw new McpError(ErrorCode.InternalError, `Tool execution failed: ${errorMessage}`); } });
  • Cross-platform helper function used by the handler to create the test directory.
    export async function createDirectory(dirPath: string): Promise<void> { const platform = os.platform(); if (platform === 'win32') { execSync(`mkdir "${dirPath}"`, { encoding: 'utf8' }); } else { execSync(`mkdir -p "${dirPath}"`, { encoding: 'utf8' }); } }

Other Tools

Related Tools

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/TiagoDanin/Android-Debug-Bridge-MCP'

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