Skip to main content
Glama
josemachado-vp

SF Assistant MCP Server

generate_rule_spec

Generates a complete business rule specification from natural language, including IF/THEN/ELSE logic, field validation, and best practice recommendations.

Instructions

Generate a complete Business Rule specification from a natural language requirement.

This tool:

  1. Queries the SF instance metadata to identify relevant fields

  2. Validates all referenced fields and picklist values exist

  3. Builds IF/THEN/ELSE condition logic

  4. Generates naming, execution notes, and best practice recommendations

The output can be passed to generate_rule_doc (documentation) and generate_rule_test (test cases).

Example requirement: "When saving Job Information, if the employee's country is Peru and employee class is Full-Time, set pay group to PG_PE_FT. If Part-Time, set to PG_PE_PT."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rule_nameNo
event_typeYesEvent type: 'onSave', 'onChange', 'onInit', or 'validate'
base_objectYesBase object (e.g., 'JobInformationModel', 'CompInfoModel')
data_centerNo
requirementYesNatural language description of the business rule requirement
auth_user_idNo
auth_passwordNo
country_scopeNo
rule_scenarioYesRule scenario (e.g., 'Rules for Employee Central', 'Event Reason Derivation')
conditions_hintNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description covers the process: queries metadata, validates fields, builds logic. It omits details on authentication or rate limits, but the steps are transparent enough for an agent to understand the tool's behavior.

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 concise, with a clear opening statement and a bulleted list of steps. Every sentence adds value, and the example requirement illustrates usage without extra fluff.

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?

Given the tool's complexity (10 params, 4 required) and presence of an output schema, the description covers the core workflow and link to other tools. It could mention when auth params are needed and handling of edge cases, but it is largely complete.

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 40%, and the description adds context via an example but does not detail individual parameters beyond existing schema descriptions. Parameters like 'conditions_hint' and 'data_center' remain under-explained, requiring the agent to infer their usage.

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 defines the tool's purpose: generating a Business Rule specification from natural language. It lists specific steps (queries metadata, validates fields, builds logic) and distinguishes from siblings by focusing on rule spec creation, with an example.

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?

The description explains the output can be used with generate_rule_doc and generate_rule_test, providing a workflow context. However, it does not explicitly state when to use this tool versus other generation tools like generate_functional_spec, though the purpose is distinct enough.

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

Install Server

Other 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/josemachado-vp/MCP-SF'

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