Skip to main content
Glama

School Attendance MCP Server

by Sadaf987
test-direct.jsโ€ข2.07 kB
// Direct function call testing (bypasses MCP protocol) import { markAttendance } from './src/tools/attendanceTools.js'; import { commitChanges, getRepoInfo } from './src/tools/githubTools.js'; import 'dotenv/config'; // Test mark_attendance async function testMarkAttendance() { console.log('๐Ÿงช Testing mark_attendance...'); try { const result = await markAttendance({ studentId: '12345', date: '2024-01-15', status: 'present' }); console.log('โœ… Success:', JSON.stringify(result, null, 2)); } catch (error) { console.error('โŒ Error:', error.message); } } // Test get_repo_info async function testGetRepoInfo() { console.log('\n๐Ÿงช Testing get_repo_info...'); try { const result = await getRepoInfo({ repoOwner: 'sadaf987', repoName: 'test_MCP' }); console.log('โœ… Success:', JSON.stringify(result, null, 2)); } catch (error) { console.error('โŒ Error:', error.message); } } // Test commit_changes async function testCommitChanges() { console.log('\n๐Ÿงช Testing commit_changes...'); try { const result = await commitChanges({ repoOwner: 'sadaf987', repoName: 'github_sdk', branchName: 'main', commitMessage: 'Test commit from direct function call', filesToCommit: [ { path: 'test-direct.txt', content: 'This file was created via direct function call\nTimestamp: ' + new Date().toISOString() } ] }); console.log('โœ… Success:', JSON.stringify(result, null, 2)); } catch (error) { console.error('โŒ Error:', error.message); } } // Run all tests async function runTests() { console.log('='.repeat(50)); console.log('Direct Function Call Testing'); console.log('='.repeat(50)); await testMarkAttendance(); await testGetRepoInfo(); // Uncomment to test commit (requires valid GitHub token) // await testCommitChanges(); console.log('\n' + '='.repeat(50)); console.log('Testing Complete'); console.log('='.repeat(50)); } runTests().catch(console.error);

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/Sadaf987/github_sdk'

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