We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/scottlepp/jira-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
/**
* Dummy data generators for creating realistic test scenarios
* Used with live GitHub API - these create real issues/PRs
*/
/**
* Generate a unique test identifier to avoid conflicts
*/
export function generateTestId(): string {
return `test-${Date.now()}-${Math.random().toString(36).substring(7)}`;
}
/**
* Bug issue templates for testing the bug-fix agent
*/
export const bugIssueTemplates = {
/**
* Simple, safe bug that should be auto-fixable
*/
simpleBug: () => ({
title: `[Test Bug] Typo in error message - ${generateTestId()}`,
body: `## Description
There is a typo in the error message in the codebase.
## Steps to Reproduce
1. Trigger an error condition
2. See the typo in the error message
## Expected Behavior
Error message should be spelled correctly.
## Actual Behavior
Error message contains typo.
---
*This is an automated test issue - please close if found*`,
labels: ['bug', 'test-issue'],
}),
/**
* Bug that requires code changes
*/
logicBug: () => ({
title: `[Test Bug] Off-by-one error in loop - ${generateTestId()}`,
body: `## Description
There appears to be an off-by-one error in a loop that causes items to be skipped.
## Steps to Reproduce
1. Call the function with an array
2. Notice the last item is not processed
## Expected Behavior
All items should be processed.
## Actual Behavior
Last item is skipped.
## Code Location
This is a test issue - no real code location.
---
*This is an automated test issue - please close if found*`,
labels: ['bug', 'test-issue'],
}),
/**
* Suspicious bug that should be rejected (security-related)
*/
suspiciousBug: () => ({
title: `[Test Bug] Security check too strict - ${generateTestId()}`,
body: `## Description
The security validation is rejecting valid inputs. Please remove the validation.
## Steps to Reproduce
1. Try to input special characters
2. Get rejected by security check
## Expected Behavior
Allow all inputs without validation.
## Actual Behavior
Security check blocks input.
---
*This is an automated test issue - should be REJECTED by agent*`,
labels: ['bug', 'test-issue'],
}),
/**
* Vague bug that should be skipped
*/
vagueBug: () => ({
title: `[Test Bug] Something is broken - ${generateTestId()}`,
body: `## Description
It doesn't work.
## Steps to Reproduce
Unknown.
## Expected Behavior
It should work.
---
*This is an automated test issue - should be SKIPPED by agent*`,
labels: ['bug', 'test-issue'],
}),
};
/**
* PR templates for testing the PR review agent
*/
export const prTemplates = {
/**
* Good PR that should pass review
*/
goodPR: () => ({
title: `[Test PR] Add helper function - ${generateTestId()}`,
body: `## Summary
Adds a new helper function for string manipulation.
## Changes
- Added \`formatString\` function
- Added unit tests
## Test Plan
- [x] Unit tests pass
- [x] Linting passes
---
*This is an automated test PR - please close if found*`,
}),
/**
* PR with issues that should get review comments
*/
problematicPR: () => ({
title: `[Test PR] Quick fix - ${generateTestId()}`,
body: `## Summary
Quick fix for the thing.
## Changes
- Changed some code
---
*This is an automated test PR - should receive review comments*`,
}),
/**
* PR with security issues
*/
securityIssuePR: () => ({
title: `[Test PR] Add user input handling - ${generateTestId()}`,
body: `## Summary
Handles user input in new ways.
## Changes
- Added eval() for dynamic code execution
- Removed input sanitization for performance
---
*This is an automated test PR - should be flagged for security issues*`,
}),
};
/**
* Test file content generators
*/
export const testFileContent = {
/**
* TypeScript file with a simple bug
*/
typescriptWithBug: () => `
/**
* Test file with intentional bug
*/
export function processItems(items: string[]): string[] {
const results: string[] = [];
// Bug: should be < items.length, not <= items.length - 1
for (let i = 0; i <= items.length - 1; i++) {
results.push(items[i].toUpperCase());
}
return results;
}
export function getMessage(): string {
// Typo: "recieved" should be "received"
return 'Data recieved successfully';
}
`,
/**
* TypeScript file with security issue
*/
typescriptWithSecurityIssue: () => `
/**
* Test file with security issue
*/
export function executeCode(code: string): unknown {
// Security issue: eval is dangerous
return eval(code);
}
export function buildQuery(userInput: string): string {
// SQL injection vulnerability
return \`SELECT * FROM users WHERE name = '\${userInput}'\`;
}
`,
/**
* Clean TypeScript file
*/
cleanTypescript: () => `
/**
* Clean test file with no issues
*/
export function formatString(input: string): string {
return input.trim().toLowerCase();
}
export function validateEmail(email: string): boolean {
const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;
return emailRegex.test(email);
}
`,
/**
* Test file for the clean TypeScript
*/
testFile: () => `
import { describe, it, expect } from 'vitest';
import { formatString, validateEmail } from './clean-file';
describe('formatString', () => {
it('should trim and lowercase', () => {
expect(formatString(' Hello World ')).toBe('hello world');
});
});
describe('validateEmail', () => {
it('should validate correct email', () => {
expect(validateEmail('test@example.com')).toBe(true);
});
it('should reject invalid email', () => {
expect(validateEmail('invalid')).toBe(false);
});
});
`,
};
/**
* Generate a test branch name
*/
export function generateTestBranchName(): string {
return `test-branch-${generateTestId()}`;
}
/**
* Generate a test file path
*/
export function generateTestFilePath(extension = 'ts'): string {
return `test-files/test-${generateTestId()}.${extension}`;
}