Skip to main content
Glama
VaruniAlwis

plsql-test-mcp

by VaruniAlwis

PL/SQL Test MCP

MCP server for IFS Cloud PL/SQL unit testing — mirrors the architecture of integration-testing-mcp and delegates deploy/run steps to ifs-f1-codegen-dev.

Develop MCP to identify if a function/procedure is unit testable and generate the test.

Workflow

flowchart TD
    A[checkUnitTestability] --> B{Testable?}
    B -->|No| C[annotateIgnoreUnitTest]
    B -->|Yes| D[generateUnitTest]
    D --> E[generate_code / generate_and_deploy via ifs-f1-codegen-dev]
    E --> F[Verify test passes]
    C --> E

Related MCP server: mcp-playwright-test

Tools

Tool

Description

checkUnitTestability

Parse .plsql/.plsvc and assess pltst testability

annotateIgnoreUnitTest

Add @IgnoreUnitTest <reason> before a method

generateUnitTest

Analyze method body, generate deploy-safe mocks, data-driven FOR loops, and assertions

processUnitTestCoverage

Batch: annotate all non-testable methods + generate all missing auto-safe tests for one file

runUnitTest

Return generate_and_deploy instructions for ifs-f1-codegen-dev

runPlsqlTestWorkflow

End-to-end: check → annotate OR generate → run prep

getIgnoreUnitTestRules

List supported ignore reasons

Supported @IgnoreUnitTest reasons

Reason

When to use

TrivialFunction

Simple getter/pass-through

MethodOverride

@Override CRUD/framework methods

DMLOperation

INSERT/UPDATE/DELETE/MERGE in body

NoOutParams

Procedure with no OUT/IN OUT params

DynamicStatement

EXECUTE IMMEDIATE / dynamic SQL

BLOBDataType / CLOBDataType

Large object types

PLSQLInSQL

PL/SQL embedded in SQL views

PipelinedFunction

Pipelined table functions

Cursor integration

The server is published to npm as @vaallk/plsql-test-mcp. Add this to your Cursor MCP settings — no local clone or build required:

{
  "mcpServers": {
    "plsql-test": {
      "command": "npx",
      "args": ["-y", "@vaallk/plsql-test-mcp@0.1.12"],
      "env": {
        "IFS_WORKSPACE": "C:\\path\\to\\your\\workspace"
      }
    }
  }
}

IFS_WORKSPACE is machine-specific — point it at your own IFS workspace root. Use @latest instead of a pinned version to always pick up the newest release on restart.

Local development config

To run against a local build instead of the published package:

{
  "mcpServers": {
    "plsql-test": {
      "command": "node",
      "args": ["C:/ifsapps-new/plsql-test-mcp/dist/index.js"],
      "env": {
        "IFS_WORKSPACE": "C:\\path\\to\\your\\workspace"
      }
    }
  }
}

Development

cd c:/ifsapps-new/plsql-test-mcp
npm install
npm run build
npm start

Deploy-safe generation (v0.1.4)

The generator avoids patterns that break AV_*_TST compilation:

  • No UTF-8 BOM on written .pltst files

  • VARCHAR2(2000) for all generated IS-section locals (bare VARCHAR2 causes PLS-00215)

  • Pre-write validation rejects bare VARCHAR2, BOM, and post-loop generated tests

  • Skips %ROWTYPE return types and SELECT * INTO %ROWTYPE (manual test required)

  • Skips CRUD modify methods using Get_Object_By_Id___ + Unpack___

  • Expression SELECT columns (round(cast(...))) mapped to safe mock column names

  • FOR loop column order matches IFS convention: expected_ | input_param_

  • Not-found cases stay inside the FOR loop (no post-loop statements)

  • Skips @IgnoreUnitTest when the method already has a UNITTEST block

  • Special mocks for Get_Wp_Id, Has_Skills_Assigned_In_Turn, Get_Fault_Id_From_Record_Id, Get_AOS_Days, Get_Hm_Contract_Id_By_Barcode

Derived value mapping (v0.1.12)

Getters that fetch a value but return a derived label/status via a post-fetch IF/ELSE are detected so the test asserts the mapped result, not the raw fetched value:

  • Column null-checkSELECT col then IF col IS NULL THEN 'A' ELSE 'B' (e.g. Get_Measurment_Status'Pending'/'Signed'). The mock uses one non-null row and one NULL row.

  • Count positiveSELECT COUNT(*) then IF cnt > 0 THEN 'A' ELSE 'B' (e.g. Is_Part_Warnings_Exist'TRUE'/'FALSE'). The mock provides matching rows for the "present" key and a missing key for the "absent" case.

Both direct-RETURN and result-variable assignment styles are supported; ELSIF multi-branch mappings are left for manual tests.

Batch coverage example

processUnitTestCoverage({
  sourceFile: "C:/ifsapps-new/workspace/adcom/source/adcom/database/AvFault.plsql",
  workspace: "C:/ifsapps-new/workspace",
  jiraKey: "PJZ-12345",
  confirmed: true
})

Example

Analyze McprActivityRelation.plsql:

checkUnitTestability({
  sourceFile: "C:/ifsapps-new/workspace/prjrep/source/prjrep/database/McprActivityRelation.plsql",
  methodName: "Is_Circular_Link___"
})

Generate test:

generateUnitTest({
  sourceFile: ".../McprActivityRelation.plsql",
  methodName: "Is_Circular_Link___",
  workspace: "C:/ifsapps-new/workspace",
  jiraKey: "PJZ-12345",
  confirmed: true
})

Run via ifs-f1-codegen-dev:

generate_and_deploy({
  input_files: [".../McprActivityRelation.plsql", ".../McprActivityRelation.pltst"],
  environment_key: "26r1-dev-lkp",
  workspace: "C:/ifsapps-new/workspace",
  confirmed: true
})

Note on plvst

IFS uses .pltst files for both .plsql and .plsvc unit tests. No separate .plvst extension exists in the codebase — this MCP targets .pltst.

  • integration-testing-mcp — reference MCP architecture

  • ifs-f1-codegen-dev — code generation, SQLcl deploy, live DB inspect

Available Tools

6 tools
annotateIgnoreUnitTestA

Insert @IgnoreUnitTest immediately before a method in a .plsql/.plsvc file. Call with confirmed=false first to preview, then confirmed=true to write.

ParametersJSON Schema
NameRequiredDescriptionDefault
reasonYesIgnore reason, e.g. DMLOperation, NoOutParams, TrivialFunction
confirmedNo
methodNameYes
sourceFileYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses the preview/write workflow and file types, but lacks details on side effects (e.g., file overwrite, rollback, permissions, error behavior). Partial transparency with gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, 37 words, no redundancy. Front-loaded with action and file type, immediately followed by usage pattern. Efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers core functionality (insert annotation, preview/write) and file type. However, lacks explanation of return values, error conditions, and any formatting constraints. For a mutation tool with no output schema, additional completeness would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 25% coverage (only reason has description). Description adds value by explaining the workflow for 'confirmed' and implicitly covers sourceFile and methodName. It does not repeat schema details for reason but provides context beyond the schema for the two-step process.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool inserts @IgnoreUnitTest before a method in .plsql/.plsvc files. It specifies the action (insert), the target (method before), and the file type. This distinguishes it from siblings like checkUnitTestability, generateUnitTest, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly provides a two-step usage pattern: call with confirmed=false first to preview, then confirmed=true to write. This is clear guidance on how to use the tool safely. However, it does not mention when not to use it or alternatives among sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

checkUnitTestabilityA

Analyze an IFS .plsql or .plsvc source file and determine whether each function/procedure is unit testable with pltst. Returns suggested @IgnoreUnitTest annotations when not testable.

ParametersJSON Schema
NameRequiredDescriptionDefault
methodNameNoOptional single method to analyze
sourceFileYesAbsolute path to the .plsql or .plsvc source file

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. It states the tool analyzes and returns suggestions, but does not clarify whether it modifies files, the nature of analysis (e.g., static), or side effects. The transparency is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It is front-loaded with the action and resource, making it immediately informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains the return value (suggested annotations) which is helpful given no output schema. However, it omits what happens when all functions are testable and error handling details. Still, it covers the core behavior for a simple analysis tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds no additional meaning beyond the schema's parameter descriptions (sourceFile and methodName). It does not enhance understanding of parameter usage or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool analyzes IFS .plsql or .plsvc files to determine unit testability with pltst and returns suggested @IgnoreUnitTest annotations. It uses specific verbs ('Analyze', 'determine') and resource ('source file'), and the purpose is distinct from siblings like annotateIgnoreUnitTest or generateUnitTest.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what the tool does but does not explicitly state when to use it over alternatives. An agent might infer it is useful before generating unit tests, but no direct guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generateUnitTestB

Generate or append a pltst unit test block for a testable method. Follows IFS Developer Studio pltst conventions with @MockTable/@MockPackage placeholders.

ParametersJSON Schema
NameRequiredDescriptionDefault
jiraKeyNo
confirmedNo
workspaceNoIFS workspace root, e.g. C:/ifsapps-new/workspace
methodNameYes
sourceFileYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Reveals 'generate or append' behavior and mentions specific conventions, but lacks details on side effects (file modification), permissions needed, or error conditions. With no annotations, more behavioral context would be beneficial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with key information. Efficient but could be slightly more structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Missing critical context: no output schema, no annotation fallback, and only 20% parameter coverage. Does not explain return values, when to set confirmed, or how jiraKey affects behavior. Incomplete for a 5-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 20% (workspace described). The description does not explain any parameters (jiraKey, confirmed, sourceFile, methodName) beyond what the schema provides. Parameter semantics are largely undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the action (generate or append) and the resource (pltst unit test block for a testable method). Distinguishes from siblings like checkUnitTestability and runUnitTest by focusing on generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implied usage through reference to pltst conventions, but does not explicitly state when to use vs alternatives like annotateIgnoreUnitTest or runUnitTest. No when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

getIgnoreUnitTestRulesB

Return the catalog of supported @IgnoreUnitTest annotation reasons used in IFS.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only says 'Return the catalog,' lacking details about whether it is read-only, what the catalog contains, or any behavioral traits like authentication requirements or rate limiting.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no unnecessary words. It is front-loaded and concise, earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema, the description fails to describe the return format or structure. It only says 'catalog' without details, leaving the agent uncertain about what to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters with 100% schema coverage. The description adds no parameter information beyond the schema, which is acceptable since none exist. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it returns the catalog of supported @IgnoreUnitTest annotation reasons. The verb 'Return' and resource 'catalog of supported @IgnoreUnitTest annotation reasons' are specific, and the tool is distinct from siblings like annotateIgnoreUnitTest or generateUnitTest.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. It is implied that it might be used to see available reasons before annotating, but the description does not explicitly state this or provide any exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

runPlsqlTestWorkflowC

End-to-end workflow: check testability → annotate if needed OR generate pltst → optionally prepare test run via ifs-f1-codegen-dev.

ParametersJSON Schema
NameRequiredDescriptionDefault
jiraKeyNo
confirmedNo
workspaceNo
methodNameNo
sourceFileYes
environmentKeyNo

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of disclosure. It mentions the workflow steps but fails to disclose behavioral traits such as whether the tool creates or modifies files, required permissions, side effects, or output specifics. The phrase 'optionally prepare test run' is vague.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that uses a bullet-like list structure (→) which aids readability, but it is somewhat lengthy and not front-loaded with the primary action. It could be more concise without losing essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a workflow tool with 6 parameters and no output schema, the description is incomplete. It outlines steps but does not explain the workflow's outcome, return value, or how to interpret results. Critical context for agent decision-making is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 6 parameters (3 required) and 0% description coverage. The description does not explain the purpose or expected values for any parameter (e.g., sourceFile, jiraKey, confirmed). This leaves the agent without vital usage context, making correct invocation difficult.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description outlines a multi-step workflow (check testability, annotate or generate, optionally prepare test run) which clearly specifies the tool's purpose and distinguishes it from siblings like checkUnitTestability or generateUnitTest. However, it lacks a concise single-sentence summary of the tool's main function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for an end-to-end workflow, but it does not provide explicit guidance on when to use it versus alternative tools (e.g., when to use runPlsqlTestWorkflow instead of runUnitTest). No when-not-to-use or prerequisite information is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

runUnitTestC

Prepare PL/SQL unit test execution by returning ifs-f1-codegen-dev generate_and_deploy instructions for the source + pltst files.

ParametersJSON Schema
NameRequiredDescriptionDefault
confirmedNo
workspaceNo
methodNameNo
sourceFileYes
environmentKeyNoTarget DB profile key, e.g. 26r1-dev-lkp

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. It states it 'returns instructions' but does not mention side effects, authentication needs, or that it does not execute tests directly. Minimal disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, but it is somewhat convoluted and could be clearer. It is adequately concise but not optimally structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters, no output schema, and a preparation/instruction-returning role, the description is incomplete. It does not explain what the returned instructions look like, how to proceed after receiving them, or prerequisites.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 20% (1 of 5 parameters have descriptions). The description mentions 'source + pltst files' but does not explain the roles of 'workspace', 'methodName', 'confirmed', or 'environmentKey' beyond what schema provides. Fails to compensate for low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies a verb ('prepare') and resource ('PL/SQL unit test execution'), and mentions returning instructions. It distinguishes itself from sibling tools like 'generateUnitTest' and 'runPlsqlTestWorkflow' by implying it is a preparation step, though it could be more direct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus its siblings (e.g., checkUnitTestability, generateUnitTest). The context hints at a workflow but does not provide usage rules or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv0.1.0
    • First observedannotateIgnoreUnitTest
    • First observedcheckUnitTestability
    • First observedgenerateUnitTest
    • First observedgetIgnoreUnitTestRules
    • First observedrunPlsqlTestWorkflow
    • First observedrunUnitTest

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a distinct, non-overlapping purpose: annotation insertion, testability analysis, test generation, rule retrieval, workflow orchestration, and test execution preparation. No two tools could be confused.

Naming Consistency5/5

All names follow a consistent camelCase verb_noun pattern, with clear verbs (annotate, check, generate, get, run) and specific nouns. The pattern is uniform and predictable.

Tool Count5/5

Six tools is ideal for this domain. Each tool covers a necessary step in the testing workflow without unnecessary redundancy or gaps, making the set well-scoped.

Completeness5/5

The tools cover the entire lifecycle: checking testability, annotating non-testable methods, generating tests, retrieving rules, and preparing for execution. The workflow tool ties it together, leaving no dead ends.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/VaruniAlwis/plsql-test-mcp'

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