Skip to main content
Glama
SLdragon

MCP User Profile Management Server

by SLdragon

create_job_details

Create job postings with guided prompts to fill missing required fields, ensuring complete and accurate listings.

Instructions

Create a new job posting with elicitation support for missing fields

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main execution handler for the 'create_job_details' tool. It processes inputs, elicits missing job fields, validates, creates the job, and returns success or error response.
    async (inputs, context) => {
      try {
        let jobData = { ...inputs };
        const missingFields = JobService.getMissingFields(jobData);
    
        if (missingFields.all.length > 0) {
          const { properties, required } = SchemaBuilder.buildJobSchema(missingFields.all);
          
          const elicitationResult = await elicitationHelper.elicitWithProgress(
            "Please provide job posting details",
            { 
              type: "object", 
              properties, 
              required: missingFields.required  // 只有必填字段是真正required的
            },
            inputs
          );
    
          if (elicitationResult.action === "accept" && elicitationResult.content) {
            Object.assign(jobData, elicitationResult.content);
          } else if (elicitationResult.action === "decline") {
            return utils.createErrorResponse("User declined to provide job information. No job posting was created.");
          } else {
            return utils.createErrorResponse("User cancelled the job creation process.");
          }
        }
    
        JobService.validateJob(jobData);
        const newJob = JobService.createJob(jobData);
    
        return utils.createSuccessResponse(
          `Successfully created job posting:\n${JSON.stringify(newJob, null, 2)}`
        );
      } catch (error) {
        return utils.createErrorResponse(`Error creating job posting: ${error.message}`);
      }
    }
  • tools/jobTools.js:5-48 (registration)
    The registration function that adds the 'create_job_details' tool to the MCP server, specifying name, description, input schema, and handler. Called from index.js.
    export function createJobTool(server, elicitationHelper) {
      return server.tool(
        "create_job_details",
        "Create a new job posting with elicitation support for missing fields",
        SchemaBuilder.getJobToolParams(),
        async (inputs, context) => {
          try {
            let jobData = { ...inputs };
            const missingFields = JobService.getMissingFields(jobData);
    
            if (missingFields.all.length > 0) {
              const { properties, required } = SchemaBuilder.buildJobSchema(missingFields.all);
              
              const elicitationResult = await elicitationHelper.elicitWithProgress(
                "Please provide job posting details",
                { 
                  type: "object", 
                  properties, 
                  required: missingFields.required  // 只有必填字段是真正required的
                },
                inputs
              );
    
              if (elicitationResult.action === "accept" && elicitationResult.content) {
                Object.assign(jobData, elicitationResult.content);
              } else if (elicitationResult.action === "decline") {
                return utils.createErrorResponse("User declined to provide job information. No job posting was created.");
              } else {
                return utils.createErrorResponse("User cancelled the job creation process.");
              }
            }
    
            JobService.validateJob(jobData);
            const newJob = JobService.createJob(jobData);
    
            return utils.createSuccessResponse(
              `Successfully created job posting:\n${JSON.stringify(newJob, null, 2)}`
            );
          } catch (error) {
            return utils.createErrorResponse(`Error creating job posting: ${error.message}`);
          }
        }
      );
    }
  • index.js:20-20 (registration)
    Invocation of the tool registration function in the main server setup.
    createJobTool(server, elicitationHelper);
  • Generates the input parameter schema for the create_job_details tool based on JOB_FIELD_SCHEMAS.
    static getJobToolParams() {
      const toolParams = {};
      for (const [key, schema] of Object.entries(this.JOB_FIELD_SCHEMAS)) {
        toolParams[key] = {
          type: schema.type,
          description: schema.description
        };
      }
      
      return toolParams;
    }
  • Static schema definitions for all job fields used in input schema and dynamic elicitation schema for the tool.
    static JOB_FIELD_SCHEMAS = {
      jobTitle: {
        type: "string",
        title: "Job Title",
        description: "The job title or position name",
        minLength: 2,
        maxLength: 100
      },
      description: {
        type: "string",
        title: "Job Description", 
        description: "Detailed description of the job responsibilities",
        minLength: 10,
        maxLength: 1000
      },
      company_email: {
        type: "string",
        title: "Company Email",
        description: "Contact email for the company",
        format: "email"
      },
      company_website: {
        type: "string", 
        title: "Company Website",
        description: "Company website URL",
        format: "uri"
      },
      salary: {
        type: "number",
        title: "Salary",
        description: "Annual salary in USD",
        minimum: 0,
        maximum: 1000000
      },
      experience_years: {
        type: "integer",
        title: "Required Experience",
        description: "Minimum years of experience required (optional)",
        minimum: 0,
        maximum: 50,
        default: 3
      },
      is_remote: {
        type: "boolean", 
        title: "Remote Work",
        description: "Is this a remote position?",
        default: false
      },
      is_active: {
        type: "boolean",
        title: "Active Posting",
        description: "Is this job posting currently active?",
        default: true
      },
      start_date: {
        type: "string",
        title: "Start Date", 
        description: "Expected start date (YYYY-MM-DD)",
        format: "date"
      },
      application_deadline: {
        type: "string",
        title: "Application Deadline",
        description: "Application deadline date and time",
        format: "date-time"
      },
      job_type: {
        type: "string",
        title: "Job Type",
        description: "Type of employment",
        enum: Object.keys(CONFIG.JOB_TYPES),
        enumNames: Object.values(CONFIG.JOB_TYPES)
      },
      priority: {
        type: "string",
        title: "Priority Level",
        description: "Hiring priority for this position", 
        enum: Object.keys(CONFIG.PRIORITIES),
        enumNames: Object.values(CONFIG.PRIORITIES)
      }
    };
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states this is a creation tool with elicitation support, implying mutation and interactive behavior, but doesn't disclose permissions needed, whether changes are permanent, error handling, or what 'elicitation support' entails operationally. For a write tool with zero annotation coverage, this is insufficient.

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, efficient sentence that front-loads the core purpose ('Create a new job posting') and adds a key feature ('with elicitation support for missing fields'). Every word earns its place with zero waste.

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

Completeness3/5

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

Given the tool has 0 parameters (schema coverage 100%) and no output schema, the description is minimally adequate. It covers the purpose and a behavioral hint, but as a mutation tool with no annotations, it should ideally disclose more about side effects, permissions, or output expectations to be fully complete.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description adds value by hinting at 'elicitation support for missing fields', suggesting the tool may prompt for additional input beyond a static schema. This goes beyond the empty schema, earning a baseline 4.

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 clearly states the verb ('Create') and resource ('new job posting'), and adds the specific feature of 'elicitation support for missing fields'. It distinguishes from siblings like list_jobs (read vs write) and create_user_profile (different resource). However, it doesn't explicitly differentiate from all siblings in a crowded namespace.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, when-not scenarios, or compare with other job-related tools (though none exist in siblings). The 'elicitation support' hint implies interactive use but isn't explicit guidance.

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/SLdragon/mcp-elicitation-server'

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