Skip to main content
Glama
ahopo

json-promptor-mcp

by ahopo
README.md
# json-promptor-mcp

An MCP server that converts raw text prompts into structured JSON prompts using heuristic keyword extraction — no API keys required.

## Tools

### `convert_prompt_to_json`

Takes a raw text prompt and returns a structured JSON object with extracted fields:

- `purpose` — what the prompt is trying to achieve
- `goal` — the specific desired outcome
- `audience` — who the output is for
- `context` — background information or constraints
- `tone` — desired tone/style (formal, casual, technical, etc.)
- `instructions` — step-by-step directions found in the prompt
- `format` — desired output format (list, paragraph, code, etc.)
- `original_prompt` — the raw input preserved as-is

### `edit_prompt_json`

Takes an existing structured JSON prompt, a field name, and a new value. Returns the updated JSON.

## Build

```bash
npm install
npm run build
```

## MCP Config for Kiro

Add to your `mcp.json`:

```json
{
  "mcpServers": {
    "json-promptor": {
      "command": "node",
      "args": ["json-promptor-mcp/dist/index.js"]
    }
  }
}
```

## Example

Input prompt:
> Write a formal blog post for developers explaining how to use Docker, as a numbered list.

Output:
```json
{
  "purpose": "write a formal blog post for developers explaining how to use docker, as a numbered list",
  "goal": "",
  "audience": "developers",
  "context": "",
  "tone": "formal",
  "instructions": "",
  "format": "numbered list",
  "original_prompt": "Write a formal blog post for developers explaining how to use Docker, as a numbered list."
}
```

TDQS

A3.8/5.0

Scored across 2 tools

Disambiguation5/5

The two tools are clearly distinct: one converts raw text to a structured JSON prompt, the other edits an existing JSON prompt. There is no ambiguity or overlap.

Naming Consistency5/5

Both tools follow the verb_noun pattern consistently: convert_prompt_to_json and edit_prompt_json. The naming is clear and predictable.

Tool Count4/5

With only 2 tools, the server is minimal but appropriately scoped for its narrow purpose of converting and editing JSON prompts. However, it could benefit from a few more tools like validation.

Completeness4/5

The tools cover the core workflow of converting raw prompts to JSON and editing them. Missing operations like validation or export are minor gaps but do not severely hinder the stated purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues