# PromptEasy Server

This server provides access to the PromptEasy prompt management system.
Use this server to list vaults, search prompts, and retrieve specific prompt templates. For general setup see [documentation](https://prompteasy.eu/docs/features/mcp-server).

Version: 1.0.0

## list_vaults

`TOOL list_vaults`

List all vaults the current user has access to.

Authentication: no security requirement declared for this operation.

Returns:

Type: object

- `vaults` (required)
  Type: array
  
  A list of accessible vaults.
  
  Items:
    Type: object
    
    - `id` (required)
      Type: integer
      
      The vault ID.
    
    - `name` (required)
      Type: string
      
      The vault name.

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_vaults",
    "arguments": {}
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "list_vaults",
  "arguments": {}
});
```

### Python

```python
result = await session.call_tool("list_vaults", arguments={})
```


## search_prompts

`TOOL search_prompts`

Search for prompts within accessible vaults.

Authentication: no security requirement declared for this operation.

Parameters:

- `query` (argument, string, required) - The search query string.
  Type: string
  
  The search query string.

- `vault_id` (argument, integer, optional) - Optional vault ID to filter by.
  Type: integer
  
  Optional vault ID to filter by.

Returns:

Type: object

- `prompts` (required)
  Type: array
  
  A list of matching prompts.
  
  Items:
    Type: object
    
    - `id` (required)
      Type: integer
      
      The prompt ID.
    
    - `title` (required)
      Type: string
      
      The prompt title.
    
    - `keywords` (required)
      Type: string
      
      Keywords associated with the prompt.
    
    - `categories` (required)
      Type: string
      
      Comma-separated list of category names.
    
    - `vault` (required)
      Type: object
      
      - `id` (required)
        Type: integer
        
        The vault ID.
      
      - `name` (required)
        Type: string
        
        The vault name.

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_prompts",
    "arguments": {
        "query": "string",
        "vault_id": 0
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "search_prompts",
  "arguments": {
    "query": "string",
    "vault_id": 0
  }
});
```

### Python

```python
result = await session.call_tool("search_prompts", arguments={
  "query": "string",
  "vault_id": 0
})
```


## get_prompt

`TOOL get_prompt`

Get details of a specific prompt by its ID.

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, required) - The UUID of the prompt to retrieve.
  Type: string
  
  The UUID of the prompt to retrieve.

- `parameters` (argument, object, optional) - Optional key-value parameters to replace in the prompt template on-the-fly.
  Type: object
  
  Optional key-value parameters to replace in the prompt template on-the-fly.

- `prompt_version` (argument, integer, optional) - Optional version number of the prompt template to retrieve.
  Type: integer
  
  Optional version number of the prompt template to retrieve.

- `team_id` (argument, integer, optional) - Optional team ID override for execution telemetry.
  Type: integer
  
  Optional team ID override for execution telemetry.

- `expected_llm_model` (argument, string, optional) - Optional expected LLM model override for execution telemetry.
  Type: string
  
  Optional expected LLM model override for execution telemetry.

Returns:

Type: object

- `execution_id` (optional)
  Type: string
  
  The execution UUID for telemetry tracking.

- `id` (required)
  Type: string
  
  The prompt ID.

- `title` (required)
  Type: string
  
  The prompt title.

- `prompt` (required)
  Type: string
  
  The prompt content.

- `llm_model` (required)
  Type: string
  
  The LLM model used.

- `llm_system_message` (required)
  Type: string
  
  The system message for the LLM.

- `llm_settings` (required)
  Type: object
  
  Settings for the LLM.

- `parameters` (required)
  Type: array
  
  Parameters for the prompt.
  
  Items:
    Type: string

- `prompt_version` (required)
  Type: integer
  
  The version number of the prompt.

- `categories` (required)
  Type: string
  
  Comma-separated list of category names.

- `created_at` (required)
  Type: string
  
  Creation timestamp.

- `vault` (required)
  Type: object
  
  - `id` (required)
    Type: integer
    
    The vault ID.
  
  - `name` (required)
    Type: string
    
    The vault name.

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_prompt",
    "arguments": {
        "id": "string",
        "parameters": {},
        "prompt_version": 0,
        "team_id": 0,
        "expected_llm_model": "string"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_prompt",
  "arguments": {
    "id": "string",
    "parameters": {},
    "prompt_version": 0,
    "team_id": 0,
    "expected_llm_model": "string"
  }
});
```

### Python

```python
result = await session.call_tool("get_prompt", arguments={
  "id": "string",
  "parameters": {},
  "prompt_version": 0,
  "team_id": 0,
  "expected_llm_model": "string"
})
```


## report_execution_telemetry

`TOOL report_execution_telemetry`

Report execution telemetry metrics (token usage, latency, finish reason, and status) for a completed prompt execution.

Authentication: no security requirement declared for this operation.

Parameters:

- `execution_id` (argument, string, required) - The UUID of the prompt execution returned by get_prompt.
  Type: string
  
  The UUID of the prompt execution returned by get_prompt.

- `actual_llm_model` (argument, string, optional) - Optional actual LLM model string executed (e.g. claude-3-5-sonnet-20241022).
  Type: string
  
  Optional actual LLM model string executed (e.g. claude-3-5-sonnet-20241022).

- `prompt_tokens` (argument, integer, optional) - Optional count of prompt/input tokens used.
  Type: integer
  
  Optional count of prompt/input tokens used.

- `completion_tokens` (argument, integer, optional) - Optional count of completion/output tokens used.
  Type: integer
  
  Optional count of completion/output tokens used.

- `cached_prompt_tokens` (argument, integer, optional) - Optional count of cached prompt tokens used.
  Type: integer
  
  Optional count of cached prompt tokens used.

- `reasoning_tokens` (argument, integer, optional) - Optional count of reasoning/thinking tokens used.
  Type: integer
  
  Optional count of reasoning/thinking tokens used.

- `latency_ms` (argument, integer, optional) - Optional execution latency in milliseconds.
  Type: integer
  
  Optional execution latency in milliseconds.

- `ttft_ms` (argument, integer, optional) - Optional time-to-first-token in milliseconds.
  Type: integer
  
  Optional time-to-first-token in milliseconds.

- `finish_reason` (argument, string, optional) - Optional execution finish reason (e.g. stop, length).
  Type: string
  
  Optional execution finish reason (e.g. stop, length).

- `status` (argument, integer, optional) - Optional execution status code: 1 = COMPLETED (default), 2 = FAILED, 3 = TIMEOUT/CANCELLED.
  Type: integer
  
  Optional execution status code: 1 = COMPLETED (default), 2 = FAILED, 3 = TIMEOUT/CANCELLED.

Returns:

Type: object

- `message` (required)
  Type: string
  
  Confirmation message.

- `execution_id` (required)
  Type: string
  
  The execution UUID.

- `has_telemetry` (required)
  Type: boolean
  
  Flag indicating telemetry was saved.

- `status` (required)
  Type: integer
  
  Execution status code.

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "report_execution_telemetry",
    "arguments": {
        "execution_id": "string",
        "actual_llm_model": "string",
        "prompt_tokens": 0,
        "completion_tokens": 0,
        "cached_prompt_tokens": 0,
        "reasoning_tokens": 0,
        "latency_ms": 0,
        "ttft_ms": 0,
        "finish_reason": "string",
        "status": 0
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "report_execution_telemetry",
  "arguments": {
    "execution_id": "string",
    "actual_llm_model": "string",
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "cached_prompt_tokens": 0,
    "reasoning_tokens": 0,
    "latency_ms": 0,
    "ttft_ms": 0,
    "finish_reason": "string",
    "status": 0
  }
});
```

### Python

```python
result = await session.call_tool("report_execution_telemetry", arguments={
  "execution_id": "string",
  "actual_llm_model": "string",
  "prompt_tokens": 0,
  "completion_tokens": 0,
  "cached_prompt_tokens": 0,
  "reasoning_tokens": 0,
  "latency_ms": 0,
  "ttft_ms": 0,
  "finish_reason": "string",
  "status": 0
})
```
