Skip to main content
Glama

search_users

Find users by name, email, department, or position in the JSON database server to manage user information and access.

Instructions

Kullanıcıları ad, email, departman veya pozisyona göre arar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesArama terimi

Implementation Reference

  • Handler for the 'search_users' tool. Extracts query from arguments, calls searchUsers helper on database users, strips passwords from results, and returns JSON-formatted list.
    case 'search_users': { const { query } = args; const results = searchUsers(db.users, query); const resultsWithoutPasswords = results.map(user => { const { password, ...userWithoutPassword } = user; return userWithoutPassword; }); return { content: [{ type: 'text', text: JSON.stringify(resultsWithoutPasswords, null, 2) }] }; }
  • src/index.js:244-254 (registration)
    Registration of the 'search_users' tool in the ListToolsRequestSchema handler, including name, description, and inputSchema.
    { name: 'search_users', description: 'Kullanıcıları ad, email, departman veya pozisyona göre arar', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Arama terimi' } }, required: ['query'] } },
  • Input schema for 'search_users' tool: requires a 'query' string parameter.
    inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Arama terimi' } }, required: ['query']
  • Helper function searchUsers that filters users array by lowercase query matching name, email, department, or position.
    export function searchUsers(users, query) { const searchTerm = query.toLowerCase(); return users.filter(user => user.name.toLowerCase().includes(searchTerm) || user.email.toLowerCase().includes(searchTerm) || user.department.toLowerCase().includes(searchTerm) || user.position.toLowerCase().includes(searchTerm) ); }

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/yusuferenkt/mcp-database'

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