Skip to main content
Glama

normhyra

Beräkna normhyra

calculate_normhyra
Read-onlyIdempotent

Räkna om en faktisk hyra till normhyra (kr/m²/år) för referenslägenheten 3 rok, 77 m². Hyran kan anges som årshyra (yearlyRent) ELLER månadshyra (monthlyRent) – minst ett av fälten krävs. Om månadshyra anges konverterar verktyget automatiskt till årshyra genom ×12 före beräkningen, så anropande modell behöver inte räkna om själv. Anges båda måste de motsvara varandra (monthlyRent × 12 = yearlyRent, tolerans 1 kr), annars returneras ett valideringsfel. Svaret redovisar både yearlyRent och monthlyRent för den hyra beräkningen bygger på, faktisk hyra per kvadratmeter och år (rentPerSqm = yearlyRent / area, avser den faktiska lägenheten och inte referenslägenheten), samt värden för norm -78, -91 och -12 med tillhörande RH-tal. Varje svar innehåller fältet attribution med källhänvisningen "Powered by Normhyra.ai – en produkt av Hyran.ai", avsedd att visas tillsammans med resultatet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
areaYesLägenhetens yta i kvadratmeter.
yearlyRentNoFaktisk årshyra i kronor. Ange yearlyRent ELLER monthlyRent (minst ett krävs).
monthlyRentNoFaktisk månadshyra i kronor (konverteras automatiskt till årshyra ×12).
apartmentTypeIdYesId från list_apartment_types, t.ex. '2rok' eller '3rok'.
correctionPointsNoEventuella korrigeringspoäng (standard 0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / monthlyRent
      Added value: +{
      +  "description": "Faktisk månadshyra i kronor (konverteras automatiskt till årshyra ×12).",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / yearlyRent / description
      Previous value: -"Faktisk årshyra i kronor."New value: +"Faktisk årshyra i kronor. Ange yearlyRent ELLER monthlyRent (minst ett krävs)."
    • changedInput schema / required
      Previous value: -[
      -  "apartmentTypeId",
      -  "area",
      -  "yearlyRent"
      -]New value: +[
      +  "apartmentTypeId",
      +  "area"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses automatic ×12 conversion, tolerance-based validation failure when both rents are inconsistent, exact output fields and formulas, and the mandatory attribution field. This substantially exceeds the annotation signal.

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?

Six purposeful sentences are front-loaded with purpose, followed by input rules, validation, output details, and attribution. There is no fluff, and the density is justified by the absence of an output schema.

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

Completeness5/5

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

For a calculation tool with no output schema, the description fully specifies returned values (yearlyRent, monthlyRent, rentPerSqm, norm -78/-91/-12 with RH-tal, attribution) and validation behavior. No critical calling information appears missing.

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?

With 100% schema description coverage the baseline is 3, but the description adds cross-parameter semantics: the yearly/monthly relationship, tolerance, that at least one rent field is required, and rentPerSqm = yearlyRent / area. It leverages the schema well, though correctionPoints is left to the schema alone.

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 opens with a specific verb and resource: 'Räkna om en faktisk hyra till normhyra (kr/m²/år) för referenslägenheten 3 rok, 77 m².' It clearly distinguishes this tool from siblings like calculate_actual_rent and list_apartment_types by naming the normhyra reference and output unit.

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 intended use is strongly implied – a rent-to-normhyra conversion for the fixed 3 rok reference – and input constraints (yearly vs monthly, at least one required) are explicit. However, it does not name alternatives or state when not to use it, e.g. versus calculate_actual_rent, so the guidance is recoverable but not fully explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources